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