feat:完善项目

This commit is contained in:
henry
2021-11-19 11:53:20 +08:00
parent 5ff6164295
commit 7efe403bf0
9 changed files with 64 additions and 46 deletions

View File

@ -6,7 +6,7 @@ type WorkProgress struct {
UID uint64 `gorm:"column:uid;type:int;default:0;comment:用户uuid" json:"-"`
WorkID uint64 `gorm:"column:work_id;type:int(11);default:0;comment:工单ID" json:"-"`
ScheduleID uint64 `gorm:"column:schedule_id;type:int(11);default:0;comment:工单流程ID" json:"-"`
Status WorkProgressStatus `gorm:"column:status;type:tinyint(1);default:1;comment:状态" json:"-"`
Status WorkProgressStatus `gorm:"column:status;type:tinyint(1);default:0;comment:状态" json:"-"`
Remark string `gorm:"column:remark;type:varchar(255);default:null;comment:备注信息" json:"remark"`
ModelDeleted
ModelAt
@ -18,8 +18,10 @@ type WorkProgressStatus int
const (
// WorkProgressStatusForRefuse 拒绝
WorkProgressStatusForRefuse WorkProgressStatus = iota - 1
// WorkProgressStatusForCreate 新建
WorkProgressStatusForCreate
// WorkProgressStatusForAgree 同意
WorkProgressStatusForAgree WorkProgressStatus = iota
WorkProgressStatusForAgree
)
func (m *WorkProgress) TableName() string {

View File

@ -0,0 +1,18 @@
package model
// WorkPurchase 工单采购数据模型
type WorkPurchase struct {
Model
WorkID uint64 `gorm:"column:work_id;type:int(11);default:0;comment:工单ID" json:"-"`
MaterialPurchaseID uint64 `gorm:"column:material_purchase_id;type:int(11);default:0;comment:器材采购ID" json:"-"`
ModelDeleted
ModelAt
}
func (m *WorkPurchase) TableName() string {
return "work_purchase"
}
func NewWorkPurchase() *WorkPurchase {
return &WorkPurchase{}
}