feat:完善项目

This commit is contained in:
henry
2021-11-11 14:05:52 +08:00
parent d331a682b7
commit 3b09ec1efc
12 changed files with 341 additions and 49 deletions

View 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{}
}