fix: rebuild MES as compilable go-zero+ent backend (renamed bj_power_mes), restore 3 workstation projects from pristine original, align naming; all Go projects go build clean

This commit is contained in:
SunYF
2026-08-27 10:56:41 +08:00
parent 380715f8a9
commit 371b494c54
523 changed files with 67923 additions and 24758 deletions
+7 -10
View File
@@ -16,22 +16,19 @@ type Department struct {
func (Department) Annotations() []schema.Annotation {
return []schema.Annotation{
entsql.Annotation{
Table: "department",
Options: "COMMENT='部门表,用于存储组织架构中的部门信息'",
},
entsql.Annotation{Table: "department"},
entsql.WithComments(true),
}
}
func (Department) Fields() []ent.Field {
return []ent.Field{
field.Int("id").Positive().Comment("部门ID"),
field.String("name").MaxLen(20).NotEmpty().Unique().Comment("部门名称,唯一且不超过20个字符"),
field.Int("parentId").Optional().Comment("父部门ID,用于构建部门层级树"),
field.Int("order").Optional().Positive().Comment("同级排序序号,正数,越小越靠前"),
field.Time("createdAt").Default(time.Now).Immutable().Comment("创建时间,记录不可变"),
field.Time("updatedAt").Default(time.Now).UpdateDefault(time.Now).Comment("更新时间,每次修改自动更新"),
field.Int("id").Positive(),
field.String("name").MaxLen(20).NotEmpty().Unique().Comment("部门名称"),
field.Int("parentId").Optional(),
field.Int("order").Optional().Positive(),
field.Time("createdAt").Default(time.Now).Immutable().Comment("创建时间"), // 创建时间
field.Time("updatedAt").Default(time.Now).UpdateDefault(time.Now).Comment("更新时间"), // 更新时间
}
}