refactor(mes): 移除工位接驳台绑定逻辑,改为独立dock主数据
- 移除station表的hasDock、dockCode字段及相关代码 - 新增dock表注释及关联逻辑,支持一个工位绑定多个接驳台 - 更新工位相关的seed、logic、schema及前端代码,适配新的接驳台管理方式 - 新增SQL注释固化脚本,完善MES表注释
This commit is contained in:
@@ -96,34 +96,6 @@ func (_c *StationCreate) SetNillableIsBuiltin(v *bool) *StationCreate {
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetHasDock sets the "hasDock" field.
|
||||
func (_c *StationCreate) SetHasDock(v bool) *StationCreate {
|
||||
_c.mutation.SetHasDock(v)
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetNillableHasDock sets the "hasDock" field if the given value is not nil.
|
||||
func (_c *StationCreate) SetNillableHasDock(v *bool) *StationCreate {
|
||||
if v != nil {
|
||||
_c.SetHasDock(*v)
|
||||
}
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetDockCode sets the "dockCode" field.
|
||||
func (_c *StationCreate) SetDockCode(v string) *StationCreate {
|
||||
_c.mutation.SetDockCode(v)
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetNillableDockCode sets the "dockCode" field if the given value is not nil.
|
||||
func (_c *StationCreate) SetNillableDockCode(v *string) *StationCreate {
|
||||
if v != nil {
|
||||
_c.SetDockCode(*v)
|
||||
}
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetVisibleTabs sets the "visibleTabs" field.
|
||||
func (_c *StationCreate) SetVisibleTabs(v []string) *StationCreate {
|
||||
_c.mutation.SetVisibleTabs(v)
|
||||
@@ -201,14 +173,6 @@ func (_c *StationCreate) defaults() {
|
||||
v := station.DefaultIsBuiltin
|
||||
_c.mutation.SetIsBuiltin(v)
|
||||
}
|
||||
if _, ok := _c.mutation.HasDock(); !ok {
|
||||
v := station.DefaultHasDock
|
||||
_c.mutation.SetHasDock(v)
|
||||
}
|
||||
if _, ok := _c.mutation.DockCode(); !ok {
|
||||
v := station.DefaultDockCode
|
||||
_c.mutation.SetDockCode(v)
|
||||
}
|
||||
if _, ok := _c.mutation.CreatedAt(); !ok {
|
||||
v := station.DefaultCreatedAt()
|
||||
_c.mutation.SetCreatedAt(v)
|
||||
@@ -247,17 +211,6 @@ func (_c *StationCreate) check() error {
|
||||
if _, ok := _c.mutation.IsBuiltin(); !ok {
|
||||
return &ValidationError{Name: "isBuiltin", err: errors.New(`ent: missing required field "Station.isBuiltin"`)}
|
||||
}
|
||||
if _, ok := _c.mutation.HasDock(); !ok {
|
||||
return &ValidationError{Name: "hasDock", err: errors.New(`ent: missing required field "Station.hasDock"`)}
|
||||
}
|
||||
if _, ok := _c.mutation.DockCode(); !ok {
|
||||
return &ValidationError{Name: "dockCode", err: errors.New(`ent: missing required field "Station.dockCode"`)}
|
||||
}
|
||||
if v, ok := _c.mutation.DockCode(); ok {
|
||||
if err := station.DockCodeValidator(v); err != nil {
|
||||
return &ValidationError{Name: "dockCode", err: fmt.Errorf(`ent: validator failed for field "Station.dockCode": %w`, err)}
|
||||
}
|
||||
}
|
||||
if _, ok := _c.mutation.CreatedAt(); !ok {
|
||||
return &ValidationError{Name: "createdAt", err: errors.New(`ent: missing required field "Station.createdAt"`)}
|
||||
}
|
||||
@@ -322,14 +275,6 @@ func (_c *StationCreate) createSpec() (*Station, *sqlgraph.CreateSpec) {
|
||||
_spec.SetField(station.FieldIsBuiltin, field.TypeBool, value)
|
||||
_node.IsBuiltin = value
|
||||
}
|
||||
if value, ok := _c.mutation.HasDock(); ok {
|
||||
_spec.SetField(station.FieldHasDock, field.TypeBool, value)
|
||||
_node.HasDock = value
|
||||
}
|
||||
if value, ok := _c.mutation.DockCode(); ok {
|
||||
_spec.SetField(station.FieldDockCode, field.TypeString, value)
|
||||
_node.DockCode = value
|
||||
}
|
||||
if value, ok := _c.mutation.VisibleTabs(); ok {
|
||||
_spec.SetField(station.FieldVisibleTabs, field.TypeJSON, value)
|
||||
_node.VisibleTabs = value
|
||||
|
||||
Reference in New Issue
Block a user