feat:完善项目

This commit is contained in:
henry
2021-11-10 16:52:25 +08:00
parent 5ffb79b4fa
commit d331a682b7
7 changed files with 364 additions and 5 deletions

View File

@ -3,10 +3,10 @@ package model
// ManageMaterialSupplier 器材供应商数据模型
type ManageMaterialSupplier struct {
Model
MaterialID uint64 `gorm:"column:material_id;type:int(11);default:0;comment:器材ID" json:"material_id"`
SupplierID uint64 `gorm:"column:supplier_id;type:int;default:0;comment:供应商ID" json:"-"`
Stock int `gorm:"column:stock;type:int(8);default:0;comment:库存数" json:"stock"`
FrozenStock int `gorm:"column:frozen_stock;type:int(8);default:0;comment:冻结的库存数" json:"-"`
MaterialID uint64 `gorm:"column:material_id;type:int(11);default:0;comment:器材ID" json:"material_id"`
SupplierID uint64 `gorm:"column:supplier_id;type:int;default:0;comment:供应商ID" json:"-"`
Stock float64 `gorm:"column:stock;type:decimal(10,2);default:0;comment:库存数" json:"stock"`
FrozenStock float64 `gorm:"column:frozen_stock;type:decimal(10,2);default:0;comment:冻结的库存数" json:"-"`
ModelDeleted
ModelAt
}

View File

@ -0,0 +1,18 @@
package model
// WorkRepair 工单维修数据模型
type WorkRepair struct {
Model
WorkID uint64 `gorm:"column:work_id;type:int(11);default:0;comment:工单ID" json:"-"`
Status int `json:"status"`
ModelDeleted
ModelAt
}
func (m *WorkRepair) TableName() string {
return "work_repair"
}
func NewWorkRepair() *WorkRepair {
return &WorkRepair{}
}