refactor(mes): 移除工位接驳台绑定逻辑,改为独立dock主数据

- 移除station表的hasDock、dockCode字段及相关代码
- 新增dock表注释及关联逻辑,支持一个工位绑定多个接驳台
- 更新工位相关的seed、logic、schema及前端代码,适配新的接驳台管理方式
- 新增SQL注释固化脚本,完善MES表注释
This commit is contained in:
SunYF
2026-10-08 13:09:53 +08:00
parent 7c7c16ee6d
commit 1f7a42fc38
132 changed files with 2799 additions and 1090 deletions
-22
View File
@@ -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()