feat:完善信息
This commit is contained in:
@ -6,7 +6,7 @@ type TechnologyDemandService struct {
|
||||
UID uint64 `gorm:"column:uid;type:int;default:0;comment:用户uuid" json:"-"`
|
||||
DemandID uint64 `gorm:"column:demand_id;type:int(11);default:0;comment:需求ID" json:"-"`
|
||||
Progress TechnologyDemandServiceProgressKind `gorm:"column:progress;type:tinyint(1);default:0;comment:进度类型" json:"progress"`
|
||||
Status int `gorm:"column:status;type:tinyint(1);default:0;comment:进度状态(0:进行中,1:已完成)" json:"status"`
|
||||
Status TechnologyDemandServiceStatus `gorm:"column:status;type:tinyint(1);default:0;comment:进度状态(0:进行中,1:已结题,2:未结题)" json:"status"`
|
||||
ModelDeleted
|
||||
ModelAt
|
||||
}
|
||||
@ -14,19 +14,41 @@ type TechnologyDemandService struct {
|
||||
// TechnologyDemandServiceProgressKind 技术需求服务进度类型
|
||||
type TechnologyDemandServiceProgressKind int
|
||||
|
||||
const (
|
||||
// TechnologyDemandServiceProgressKindForMemorandum 合作备忘录
|
||||
TechnologyDemandServiceProgressKindForMemorandum TechnologyDemandServiceProgressKind = iota + 101
|
||||
// TechnologyDemandServiceProgressKindForConfirmation 确认解决方案
|
||||
TechnologyDemandServiceProgressKindForConfirmation
|
||||
// TechnologyDemandServiceProgressKindForSign 签署合同
|
||||
TechnologyDemandServiceProgressKindForSign
|
||||
// TechnologyDemandServiceProgressKindForComplete 流程结束
|
||||
TechnologyDemandServiceProgressKindForComplete
|
||||
)
|
||||
|
||||
type TechnologyDemandServiceStatus int
|
||||
|
||||
const (
|
||||
// TechnologyDemandServiceStatusForOngoing 进行中
|
||||
TechnologyDemandServiceStatusForOngoing TechnologyDemandServiceStatus = iota
|
||||
// TechnologyDemandServiceStatusForComplete 已完成
|
||||
TechnologyDemandServiceStatusForComplete
|
||||
// TechnologyDemandServiceStatusForClosedQuestions 已结题
|
||||
TechnologyDemandServiceStatusForClosedQuestions
|
||||
// TechnologyDemandServiceStatusForOpenQuestions 未结题
|
||||
TechnologyDemandServiceStatusForOpenQuestions
|
||||
)
|
||||
|
||||
func (m *TechnologyDemandService) TableName() string {
|
||||
return "technology_demand_service"
|
||||
}
|
||||
|
||||
func (m *TechnologyDemandService) NextProgress() TechnologyDemandServiceProgressKind {
|
||||
if m.Progress == TechnologyDemandServiceProgressKindForMemorandum {
|
||||
return TechnologyDemandServiceProgressKindForConfirmation
|
||||
} else if m.Progress == TechnologyDemandServiceProgressKindForConfirmation {
|
||||
return TechnologyDemandServiceProgressKindForSign
|
||||
}
|
||||
return TechnologyDemandServiceProgressKindForComplete
|
||||
}
|
||||
|
||||
func NewTechnologyDemandService() *TechnologyDemandService {
|
||||
return &TechnologyDemandService{}
|
||||
}
|
||||
|
@ -3,9 +3,9 @@ package model
|
||||
// TechnologyDemandServiceProgress 技术需求服务进度信息
|
||||
type TechnologyDemandServiceProgress struct {
|
||||
Model
|
||||
UID uint64 `gorm:"column:uid;type:int;default:0;comment:用户uuid" json:"-"`
|
||||
Progress TechnologyDemandServiceProgressKind `gorm:"column:progress;type:tinyint(1);default:0;comment:进度类型" json:"progress"`
|
||||
Config string `gorm:"column:config;type:text;comment:详细信息" json:"config"`
|
||||
ServiceID uint64 `gorm:"column:service_id;type:int(11);default:服务ID;comment:用户uuid" json:"-"`
|
||||
Progress TechnologyDemandServiceProgressKind `gorm:"column:progress;type:tinyint(1);default:0;comment:进度类型" json:"progress"`
|
||||
Config string `gorm:"column:config;type:text;comment:详细信息" json:"config"`
|
||||
ModelDeleted
|
||||
ModelAt
|
||||
}
|
||||
|
Reference in New Issue
Block a user