feat:完善项目
This commit is contained in:
@ -3,12 +3,36 @@ 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"`
|
||||
OrderNo string `gorm:"column:order_no;type:varchar(30);default:null;comment:维修单号" json:"order_no"`
|
||||
WorkID uint64 `gorm:"column:work_id;type:int(11);default:0;comment:工单ID" json:"-"`
|
||||
Status WorkRepairStatus `gorm:"column:status;type:tinyint(1);default:0;comment:维修工单状态" json:"status"`
|
||||
IsEvaluate WorkRepairStatusEvaluate `gorm:"column:is_evaluate;type:tinyint(1);default:0;comment:评价状态" json:"is_evaluate"`
|
||||
EvaluateScore int `gorm:"column:evaluate_score;type:decimal(10,2);default:0;comment:评价分数" json:"evaluate_score"`
|
||||
ModelDeleted
|
||||
ModelAt
|
||||
}
|
||||
|
||||
// WorkRepairStatus 工单状态
|
||||
type WorkRepairStatus int
|
||||
|
||||
const (
|
||||
// WorkRepairStatusForNotBegin 未开始
|
||||
WorkRepairStatusForNotBegin WorkRepairStatus = iota
|
||||
// WorkRepairStatusForOngoing 进行中
|
||||
WorkRepairStatusForOngoing
|
||||
// WorkRepairStatusForFinished 已结束
|
||||
WorkRepairStatusForFinished
|
||||
)
|
||||
|
||||
type WorkRepairStatusEvaluate int
|
||||
|
||||
const (
|
||||
// WorkRepairStatusEvaluateForNot 未评价
|
||||
WorkRepairStatusEvaluateForNot WorkRepairStatusEvaluate = iota
|
||||
// WorkRepairStatusEvaluateForYes 已评价
|
||||
WorkRepairStatusEvaluateForYes
|
||||
)
|
||||
|
||||
func (m *WorkRepair) TableName() string {
|
||||
return "work_repair"
|
||||
}
|
||||
|
Reference in New Issue
Block a user