feat:完善项目
This commit is contained in:
@ -52,7 +52,7 @@ func initModel() {
|
||||
&synchronized{iModel: model.NewManageEquipment()}, &synchronized{iModel: model.NewManageEquipmentMaterial()},
|
||||
&synchronized{iModel: model.NewManageMaterial()}, &synchronized{iModel: model.NewManageMaterialSupplier()},
|
||||
&synchronized{iModel: model.NewManageMaterialPurchase()}, &synchronized{iModel: model.NewManageMaterialWarehouse()},
|
||||
&synchronized{iModel: model.NewWorkInstance()}, &synchronized{iModel: model.NewWorkProgress()},
|
||||
&synchronized{iModel: model.NewWorkInstance()}, &synchronized{iModel: model.NewWorkMaterial()}, &synchronized{iModel: model.NewWorkProgress()},
|
||||
&synchronized{iModel: model.NewWorkSchedule()}, &synchronized{iModel: model.NewWorkRepair()},
|
||||
)
|
||||
}
|
||||
|
@ -1,16 +0,0 @@
|
||||
package model
|
||||
|
||||
// WorkDetail 工单详细信息
|
||||
type WorkDetail struct {
|
||||
Model
|
||||
ModelDeleted
|
||||
ModelAt
|
||||
}
|
||||
|
||||
func (m *WorkDetail) TableName() string {
|
||||
return "work_detail"
|
||||
}
|
||||
|
||||
func NewWorkDetail() *WorkDetail {
|
||||
return &WorkDetail{}
|
||||
}
|
@ -18,9 +18,9 @@ type WorkInstance struct {
|
||||
Priority WorkInstancePriority `gorm:"column:priority;type:tinyint(1);default:1;comment:工单优先级" json:"priority"`
|
||||
Schedule uint64 `gorm:"column:schedule;type:int(11);default:1;comment:工单进度" json:"schedule"`
|
||||
IsAssist WorkInstanceAssist `gorm:"column:is_assist;type:tinyint(1);default:0;comment:协助状态" json:"is_assist"` // 当前阶段协助状态,确认是否需要下一阶段协助
|
||||
Status WorkInstanceStatus `gorm:"column:status;type:tinyint(1);default:0;comment:工单状态" json:"status"`
|
||||
Remark string `gorm:"column:remark;type:varchar(255);default:null;comment:备注信息" json:"remark"`
|
||||
Distribution string `gorm:"column:distribution;type:varchar(255);default:null;comment:配送信息" json:"-"`
|
||||
Status WorkInstanceStatus `gorm:"column:status;type:tinyint(1);default:0;comment:工单状态" json:"status"`
|
||||
ModelDeleted
|
||||
ModelAt
|
||||
}
|
||||
|
20
app/common/model/work_material.go
Normal file
20
app/common/model/work_material.go
Normal file
@ -0,0 +1,20 @@
|
||||
package model
|
||||
|
||||
// WorkMaterial 工单器材数据模型
|
||||
type WorkMaterial struct {
|
||||
Model
|
||||
WorkID uint64 `gorm:"column:work_id;type:int(11);default:0;comment:工单ID" json:"-"`
|
||||
MaterialID uint64 `gorm:"column:material_id;type:int(11);default:0;comment:器材ID" json:"-"`
|
||||
MaterialSupplierID uint64 `gorm:"column:material_supplier_id;type:int(11);default:0;comment:器材供应商ID" json:"-"`
|
||||
MaterialNumber float64 `gorm:"column:material_number;type:decimal(10,2);default:0;comment:所需器材数量" json:"material_number"`
|
||||
ModelDeleted
|
||||
ModelAt
|
||||
}
|
||||
|
||||
func (m *WorkMaterial) TableName() string {
|
||||
return "work_material"
|
||||
}
|
||||
|
||||
func NewWorkMaterial() *WorkMaterial {
|
||||
return &WorkMaterial{}
|
||||
}
|
Reference in New Issue
Block a user