feat: 完成MES工位终端系统全量功能迭代
本次提交包含以下核心变更: 1. 新增按钮级权限控制框架与前端权限校验 2. 新增工位管理、工艺流程、巡检终端等核心业务模块 3. 完善用户体系,支持工位终端专属登录权限 4. 新增文件上传下载、报表查询等配套功能 5. 修复多系统兼容性与交互体验问题 6. 完成所有文档与配置项的规范化更新
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
package schema
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"entgo.io/ent"
|
||||
"entgo.io/ent/dialect/entsql"
|
||||
"entgo.io/ent/schema"
|
||||
"entgo.io/ent/schema/field"
|
||||
"entgo.io/ent/schema/index"
|
||||
)
|
||||
|
||||
// ProcessFlow 工艺流程图:一个流程只绑定一个工序编号(1~12),可多版本;
|
||||
// 工位绑定其中一个流程(一个工位同时只绑一个)。流程承载:工序号 + 工艺图纸PDF + 步骤模板。
|
||||
type ProcessFlow struct {
|
||||
ent.Schema
|
||||
}
|
||||
|
||||
func (ProcessFlow) Annotations() []schema.Annotation {
|
||||
return []schema.Annotation{entsql.Annotation{Table: "process_flow"}}
|
||||
}
|
||||
|
||||
func (ProcessFlow) Fields() []ent.Field {
|
||||
return []ent.Field{
|
||||
field.Int("id").Positive(),
|
||||
field.String("name").MaxLen(128).Comment("流程名称,如 工序3_2026版"),
|
||||
field.Int("processCode").Comment("工序编号 1..12"),
|
||||
field.String("pdfFile").Default("").MaxLen(255).Comment("工艺图纸文件名"),
|
||||
// ACTIVE / INACTIVE
|
||||
field.String("status").Default("ACTIVE").MaxLen(20),
|
||||
field.String("remark").Default("").MaxLen(255),
|
||||
field.Time("createdAt").Default(time.Now).Immutable(),
|
||||
field.Time("updatedAt").Default(time.Now).UpdateDefault(time.Now).Optional().Nillable(),
|
||||
}
|
||||
}
|
||||
|
||||
func (ProcessFlow) Indexes() []ent.Index {
|
||||
return []ent.Index{
|
||||
index.Fields("processCode"),
|
||||
index.Fields("status"),
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user