Files
bj_power/bj_power_mes/ent/semiflow/semiflow.go
T
SunYF d3eda6b588 feat&refactor: 2026-09-22 半成品业务模型重构与功能完善
- 重构半成品流转逻辑:进度权威源改为 workpiece.currentStationNo,新增 completedText 快照字段,废除 doneProcessCodes
- 清理物料品类中半成品类型,存量数据幂等清理,调整物料管理方式文案为批次/序列号
- 新增日排产状态专用更新接口,修复工单工艺校验逻辑
- 新增物料档案代理接口、深路径文件下载接口
- 优化前端界面文案与工位选择逻辑,补充追溯页半成品流转展示
- 调整WMS端物料品类校验与入库接口契约
- 新增/更新数据库表结构与实体类代码
2026-09-22 14:42:52 +08:00

130 lines
4.7 KiB
Go

// Code generated by ent, DO NOT EDIT.
package semiflow
import (
"time"
"entgo.io/ent/dialect/sql"
)
const (
// Label holds the string label denoting the semiflow type in the database.
Label = "semi_flow"
// FieldID holds the string denoting the id field in the database.
FieldID = "id"
// FieldSn holds the string denoting the sn field in the database.
FieldSn = "sn"
// FieldOrderNo holds the string denoting the orderno field in the database.
FieldOrderNo = "order_no"
// FieldDoneProcessCodes holds the string denoting the doneprocesscodes field in the database.
FieldDoneProcessCodes = "done_process_codes"
// FieldCompletedText holds the string denoting the completedtext field in the database.
FieldCompletedText = "completed_text"
// FieldAction holds the string denoting the action field in the database.
FieldAction = "action"
// FieldTargetDock holds the string denoting the targetdock field in the database.
FieldTargetDock = "target_dock"
// FieldOperator holds the string denoting the operator field in the database.
FieldOperator = "operator"
// FieldCreatedAt holds the string denoting the createdat field in the database.
FieldCreatedAt = "created_at"
// Table holds the table name of the semiflow in the database.
Table = "semi_flow"
)
// Columns holds all SQL columns for semiflow fields.
var Columns = []string{
FieldID,
FieldSn,
FieldOrderNo,
FieldDoneProcessCodes,
FieldCompletedText,
FieldAction,
FieldTargetDock,
FieldOperator,
FieldCreatedAt,
}
// ValidColumn reports if the column name is valid (part of the table columns).
func ValidColumn(column string) bool {
for i := range Columns {
if column == Columns[i] {
return true
}
}
return false
}
var (
// SnValidator is a validator for the "sn" field. It is called by the builders before save.
SnValidator func(string) error
// DefaultOrderNo holds the default value on creation for the "orderNo" field.
DefaultOrderNo string
// OrderNoValidator is a validator for the "orderNo" field. It is called by the builders before save.
OrderNoValidator func(string) error
// DefaultCompletedText holds the default value on creation for the "completedText" field.
DefaultCompletedText string
// CompletedTextValidator is a validator for the "completedText" field. It is called by the builders before save.
CompletedTextValidator func(string) error
// DefaultAction holds the default value on creation for the "action" field.
DefaultAction string
// ActionValidator is a validator for the "action" field. It is called by the builders before save.
ActionValidator func(string) error
// DefaultTargetDock holds the default value on creation for the "targetDock" field.
DefaultTargetDock string
// TargetDockValidator is a validator for the "targetDock" field. It is called by the builders before save.
TargetDockValidator func(string) error
// DefaultOperator holds the default value on creation for the "operator" field.
DefaultOperator string
// OperatorValidator is a validator for the "operator" field. It is called by the builders before save.
OperatorValidator func(string) error
// DefaultCreatedAt holds the default value on creation for the "createdAt" field.
DefaultCreatedAt func() time.Time
// IDValidator is a validator for the "id" field. It is called by the builders before save.
IDValidator func(int) error
)
// OrderOption defines the ordering options for the SemiFlow queries.
type OrderOption func(*sql.Selector)
// ByID orders the results by the id field.
func ByID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldID, opts...).ToFunc()
}
// BySn orders the results by the sn field.
func BySn(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldSn, opts...).ToFunc()
}
// ByOrderNo orders the results by the orderNo field.
func ByOrderNo(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldOrderNo, opts...).ToFunc()
}
// ByCompletedText orders the results by the completedText field.
func ByCompletedText(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldCompletedText, opts...).ToFunc()
}
// ByAction orders the results by the action field.
func ByAction(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldAction, opts...).ToFunc()
}
// ByTargetDock orders the results by the targetDock field.
func ByTargetDock(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldTargetDock, opts...).ToFunc()
}
// ByOperator orders the results by the operator field.
func ByOperator(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldOperator, opts...).ToFunc()
}
// ByCreatedAt orders the results by the createdAt field.
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
}