refactor(mes): 移除工位接驳台绑定逻辑,改为独立dock主数据
- 移除station表的hasDock、dockCode字段及相关代码 - 新增dock表注释及关联逻辑,支持一个工位绑定多个接驳台 - 更新工位相关的seed、logic、schema及前端代码,适配新的接驳台管理方式 - 新增SQL注释固化脚本,完善MES表注释
This commit is contained in:
@@ -25,10 +25,6 @@ const (
|
||||
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"
|
||||
// FieldVisibleTabs holds the string denoting the visibletabs field in the database.
|
||||
FieldVisibleTabs = "visible_tabs"
|
||||
// FieldCreatedAt holds the string denoting the createdat field in the database.
|
||||
@@ -46,8 +42,6 @@ var Columns = []string{
|
||||
FieldStationType,
|
||||
FieldStatus,
|
||||
FieldIsBuiltin,
|
||||
FieldHasDock,
|
||||
FieldDockCode,
|
||||
FieldVisibleTabs,
|
||||
FieldCreatedAt,
|
||||
}
|
||||
@@ -77,12 +71,6 @@ var (
|
||||
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.
|
||||
@@ -127,16 +115,6 @@ 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()
|
||||
|
||||
@@ -84,16 +84,6 @@ func IsBuiltin(v bool) predicate.Station {
|
||||
return predicate.Station(sql.FieldEQ(FieldIsBuiltin, v))
|
||||
}
|
||||
|
||||
// HasDock applies equality check predicate on the "hasDock" field. It's identical to HasDockEQ.
|
||||
func HasDock(v bool) predicate.Station {
|
||||
return predicate.Station(sql.FieldEQ(FieldHasDock, v))
|
||||
}
|
||||
|
||||
// DockCode applies equality check predicate on the "dockCode" field. It's identical to DockCodeEQ.
|
||||
func DockCode(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldEQ(FieldDockCode, v))
|
||||
}
|
||||
|
||||
// CreatedAt applies equality check predicate on the "createdAt" field. It's identical to CreatedAtEQ.
|
||||
func CreatedAt(v time.Time) predicate.Station {
|
||||
return predicate.Station(sql.FieldEQ(FieldCreatedAt, v))
|
||||
@@ -394,81 +384,6 @@ func IsBuiltinNEQ(v bool) predicate.Station {
|
||||
return predicate.Station(sql.FieldNEQ(FieldIsBuiltin, v))
|
||||
}
|
||||
|
||||
// HasDockEQ applies the EQ predicate on the "hasDock" field.
|
||||
func HasDockEQ(v bool) predicate.Station {
|
||||
return predicate.Station(sql.FieldEQ(FieldHasDock, v))
|
||||
}
|
||||
|
||||
// HasDockNEQ applies the NEQ predicate on the "hasDock" field.
|
||||
func HasDockNEQ(v bool) predicate.Station {
|
||||
return predicate.Station(sql.FieldNEQ(FieldHasDock, v))
|
||||
}
|
||||
|
||||
// DockCodeEQ applies the EQ predicate on the "dockCode" field.
|
||||
func DockCodeEQ(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldEQ(FieldDockCode, v))
|
||||
}
|
||||
|
||||
// DockCodeNEQ applies the NEQ predicate on the "dockCode" field.
|
||||
func DockCodeNEQ(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldNEQ(FieldDockCode, v))
|
||||
}
|
||||
|
||||
// DockCodeIn applies the In predicate on the "dockCode" field.
|
||||
func DockCodeIn(vs ...string) predicate.Station {
|
||||
return predicate.Station(sql.FieldIn(FieldDockCode, vs...))
|
||||
}
|
||||
|
||||
// DockCodeNotIn applies the NotIn predicate on the "dockCode" field.
|
||||
func DockCodeNotIn(vs ...string) predicate.Station {
|
||||
return predicate.Station(sql.FieldNotIn(FieldDockCode, vs...))
|
||||
}
|
||||
|
||||
// DockCodeGT applies the GT predicate on the "dockCode" field.
|
||||
func DockCodeGT(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldGT(FieldDockCode, v))
|
||||
}
|
||||
|
||||
// DockCodeGTE applies the GTE predicate on the "dockCode" field.
|
||||
func DockCodeGTE(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldGTE(FieldDockCode, v))
|
||||
}
|
||||
|
||||
// DockCodeLT applies the LT predicate on the "dockCode" field.
|
||||
func DockCodeLT(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldLT(FieldDockCode, v))
|
||||
}
|
||||
|
||||
// DockCodeLTE applies the LTE predicate on the "dockCode" field.
|
||||
func DockCodeLTE(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldLTE(FieldDockCode, v))
|
||||
}
|
||||
|
||||
// DockCodeContains applies the Contains predicate on the "dockCode" field.
|
||||
func DockCodeContains(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldContains(FieldDockCode, v))
|
||||
}
|
||||
|
||||
// DockCodeHasPrefix applies the HasPrefix predicate on the "dockCode" field.
|
||||
func DockCodeHasPrefix(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldHasPrefix(FieldDockCode, v))
|
||||
}
|
||||
|
||||
// DockCodeHasSuffix applies the HasSuffix predicate on the "dockCode" field.
|
||||
func DockCodeHasSuffix(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldHasSuffix(FieldDockCode, v))
|
||||
}
|
||||
|
||||
// DockCodeEqualFold applies the EqualFold predicate on the "dockCode" field.
|
||||
func DockCodeEqualFold(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldEqualFold(FieldDockCode, v))
|
||||
}
|
||||
|
||||
// DockCodeContainsFold applies the ContainsFold predicate on the "dockCode" field.
|
||||
func DockCodeContainsFold(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldContainsFold(FieldDockCode, v))
|
||||
}
|
||||
|
||||
// VisibleTabsIsNil applies the IsNil predicate on the "visibleTabs" field.
|
||||
func VisibleTabsIsNil() predicate.Station {
|
||||
return predicate.Station(sql.FieldIsNull(FieldVisibleTabs))
|
||||
|
||||
Reference in New Issue
Block a user