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:
@@ -10,32 +10,30 @@ import (
|
||||
"entgo.io/ent/schema/index"
|
||||
)
|
||||
|
||||
// InspectionImage 检测图片,内窥镜等检测设备拍摄的工件检测照片
|
||||
// InspectionImage 检测图片——内窥镜设备推送的检测照片,绑定工件
|
||||
type InspectionImage struct {
|
||||
ent.Schema
|
||||
}
|
||||
|
||||
func (InspectionImage) Annotations() []schema.Annotation {
|
||||
return []schema.Annotation{
|
||||
entsql.Annotation{
|
||||
Table: "inspection_image",
|
||||
Options: "COMMENT='检测图片表,存储内窥镜等检测设备推送的工件检测照片,绑定工件、工单'",
|
||||
},
|
||||
entsql.WithComments(true),
|
||||
entsql.Annotation{Table: "inspection_image"},
|
||||
}
|
||||
}
|
||||
|
||||
func (InspectionImage) Fields() []ent.Field {
|
||||
return []ent.Field{
|
||||
field.Int("id").Positive().Comment("主键ID"),
|
||||
field.Int("id").Positive(),
|
||||
field.Int("jobId").Comment("关联工件ID"),
|
||||
field.String("workpieceNo").Default("").Comment("工件编号"),
|
||||
field.Int("workOrderId").Comment("关联工单ID"),
|
||||
field.String("workOrderNo").Default("").Comment("工单号"),
|
||||
field.String("deviceId").Optional().Comment("拍摄设备ID,如内窥镜设备编号"),
|
||||
field.String("fileName").Default("").Comment("原始文件名,设备推送时的文件名称"),
|
||||
field.String("filePath").Comment("磁盘相对路径,图片在服务器上的存储位置"),
|
||||
field.String("palletCode").Default("").Comment("托盘码"),
|
||||
field.String("deviceId").Optional().Comment("拍摄设备ID"),
|
||||
field.String("fileName").Default("").Comment("原始文件名"),
|
||||
field.String("filePath").Comment("磁盘相对路径"),
|
||||
field.Int64("fileSize").Default(0).Comment("文件大小(字节)"),
|
||||
field.Time("capturedAt").Default(time.Now).Optional().Nillable().Comment("拍照时间,设备实际拍摄的时刻"),
|
||||
field.Time("capturedAt").Default(time.Now).Optional().Nillable().Comment("拍照时间"),
|
||||
field.Time("createdAt").Default(time.Now).Immutable().Comment("记录创建时间"),
|
||||
}
|
||||
}
|
||||
@@ -48,6 +46,7 @@ func (InspectionImage) Indexes() []ent.Index {
|
||||
return []ent.Index{
|
||||
index.Fields("jobId"),
|
||||
index.Fields("workOrderId"),
|
||||
index.Fields("palletCode"),
|
||||
index.Fields("capturedAt"),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user