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:
@@ -11,39 +11,34 @@ import (
|
||||
"entgo.io/ent/schema/index"
|
||||
)
|
||||
|
||||
// EquipmentSlot 设备槽�,��设备下的具体工�
|
||||
// EquipmentSlot 设备槽位
|
||||
type EquipmentSlot struct {
|
||||
ent.Schema
|
||||
}
|
||||
|
||||
func (EquipmentSlot) Annotations() []schema.Annotation {
|
||||
return []schema.Annotation{
|
||||
entsql.Annotation{
|
||||
Table: "equipment_slot",
|
||||
Options: "COMMENT='设备槽ä½�表,记录æ¯�å�°è®¾å¤‡ä¸‹å�„æ§½ä½�的状æ€�ã€�å� 用的工件å�ŠFIFO排åº�ä¿¡æ�¯'",
|
||||
},
|
||||
entsql.WithComments(true),
|
||||
entsql.Annotation{Table: "equipment_slot"},
|
||||
}
|
||||
}
|
||||
|
||||
func (EquipmentSlot) Fields() []ent.Field {
|
||||
return []ent.Field{
|
||||
field.Int("id").Positive().Comment("主键ID"),
|
||||
field.Int("equipmentId").Optional().Nillable().Comment("所属设备ID"),
|
||||
field.Int("slotNo").Comment("槽���,从1开始递增"),
|
||||
field.Int("id").Positive(),
|
||||
field.Int("equipmentId").Optional().Nillable().Comment("设备ID"),
|
||||
field.Int("slotNo").Comment("槽位序号(1-based)"),
|
||||
field.Enum("status").
|
||||
GoType(constants.SlotStatus("")).
|
||||
Default(string(constants.SlotStatus_Empty)).
|
||||
Comment("æ§½ä½�状æ€�:Empty/Occupiedæ�¬è¿�ä¸?ProcessingåŠ å·¥ä¸?Completed"),
|
||||
field.Int("currentJobId").Optional().Nillable().Comment("当å‰�å� 用的工件ID"),
|
||||
field.Time("occupiedAt").Optional().Nillable().Comment("å� 用时间,用于FIFO排åº�,先å� 用的优先出é˜?),
|
||||
Comment("槽位状态"),
|
||||
field.Int("currentJobId").Optional().Nillable().Comment("当前工件ID"),
|
||||
field.Time("occupiedAt").Optional().Nillable().Comment("占用时间(FIFO排序参考)"),
|
||||
}
|
||||
}
|
||||
|
||||
func (EquipmentSlot) Edges() []ent.Edge {
|
||||
return []ent.Edge{
|
||||
edge.From("equipment", Equipment.Type).Ref("slots").Field("equipmentId").Unique().Comment("所属设�),
|
||||
edge.To("currentJob", Job.Type).Field("currentJobId").Unique().Comment("当å‰�å� 用的工ä»?),
|
||||
edge.From("equipment", Equipment.Type).Ref("slots").Field("equipmentId").Unique(),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user