Files
SunYF 37f10d3a13 refactor: 重构产线工位与备料流程,移除冗余字段
1. 移除工单、工件、日排产中的冗余工位组合/接驳台字段
2. 新增工位接驳台编码字段与唯一约束,关联WMS接驳台主数据
3. 重构日排产为工位产量分配模式,替代原接驳台列表
4. 新增备料单工位级字段与分批出库支持
5. 移除定时同步可生产数量,改为WMS实时拉取接口
6. 过滤操作日志,排除登录/退出相关日志
7. 调整仪表盘工序展示逻辑为今日派工路线
8. 新增接驳台维护菜单与基础数据
2026-09-19 07:50:21 +08:00

141 lines
4.9 KiB
Go

// Code generated by ent, DO NOT EDIT.
package station
import (
"time"
"entgo.io/ent/dialect/sql"
)
const (
// Label holds the string label denoting the station type in the database.
Label = "station"
// FieldID holds the string denoting the id field in the database.
FieldID = "id"
// FieldStationNo holds the string denoting the stationno field in the database.
FieldStationNo = "station_no"
// FieldName holds the string denoting the name field in the database.
FieldName = "name"
// FieldFlowId holds the string denoting the flowid field in the database.
FieldFlowId = "flow_id"
// FieldStationType holds the string denoting the stationtype field in the database.
FieldStationType = "station_type"
// FieldStatus holds the string denoting the status field in the database.
FieldStatus = "status"
// FieldIsBuiltin holds the string denoting the isbuiltin field in the database.
FieldIsBuiltin = "is_builtin"
// FieldHasDock holds the string denoting the hasdock field in the database.
FieldHasDock = "has_dock"
// FieldDockCode holds the string denoting the dockcode field in the database.
FieldDockCode = "dock_code"
// FieldCreatedAt holds the string denoting the createdat field in the database.
FieldCreatedAt = "created_at"
// Table holds the table name of the station in the database.
Table = "station"
)
// Columns holds all SQL columns for station fields.
var Columns = []string{
FieldID,
FieldStationNo,
FieldName,
FieldFlowId,
FieldStationType,
FieldStatus,
FieldIsBuiltin,
FieldHasDock,
FieldDockCode,
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 (
// DefaultName holds the default value on creation for the "name" field.
DefaultName string
// NameValidator is a validator for the "name" field. It is called by the builders before save.
NameValidator func(string) error
// DefaultStationType holds the default value on creation for the "stationType" field.
DefaultStationType string
// StationTypeValidator is a validator for the "stationType" field. It is called by the builders before save.
StationTypeValidator func(string) error
// DefaultStatus holds the default value on creation for the "status" field.
DefaultStatus string
// StatusValidator is a validator for the "status" field. It is called by the builders before save.
StatusValidator func(string) error
// DefaultIsBuiltin holds the default value on creation for the "isBuiltin" field.
DefaultIsBuiltin bool
// DefaultHasDock holds the default value on creation for the "hasDock" field.
DefaultHasDock bool
// DefaultDockCode holds the default value on creation for the "dockCode" field.
DefaultDockCode string
// DockCodeValidator is a validator for the "dockCode" field. It is called by the builders before save.
DockCodeValidator 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 Station 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()
}
// ByStationNo orders the results by the stationNo field.
func ByStationNo(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldStationNo, opts...).ToFunc()
}
// ByName orders the results by the name field.
func ByName(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldName, opts...).ToFunc()
}
// ByFlowId orders the results by the flowId field.
func ByFlowId(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldFlowId, opts...).ToFunc()
}
// ByStationType orders the results by the stationType field.
func ByStationType(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldStationType, opts...).ToFunc()
}
// ByStatus orders the results by the status field.
func ByStatus(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldStatus, opts...).ToFunc()
}
// ByIsBuiltin orders the results by the isBuiltin field.
func ByIsBuiltin(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldIsBuiltin, opts...).ToFunc()
}
// ByHasDock orders the results by the hasDock field.
func ByHasDock(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldHasDock, opts...).ToFunc()
}
// ByDockCode orders the results by the dockCode field.
func ByDockCode(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldDockCode, opts...).ToFunc()
}
// ByCreatedAt orders the results by the createdAt field.
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
}