2022-01-22 16:55:10 +08:00
|
|
|
|
package model
|
|
|
|
|
|
|
|
|
|
// TechnologyDemandService 技术需求服务信息
|
|
|
|
|
type TechnologyDemandService struct {
|
|
|
|
|
Model
|
2022-01-24 15:35:43 +08:00
|
|
|
|
AgentID uint64 `gorm:"column:agent_id;type:int(11);default:0;comment:经纪人模型ID" json:"-"`
|
2022-01-22 16:55:10 +08:00
|
|
|
|
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"`
|
2022-01-23 22:59:11 +08:00
|
|
|
|
Status TechnologyDemandServiceStatus `gorm:"column:status;type:tinyint(1);default:0;comment:进度状态(0:进行中,1:已结题,2:未结题)" json:"status"`
|
2022-01-22 16:55:10 +08:00
|
|
|
|
ModelDeleted
|
|
|
|
|
ModelAt
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TechnologyDemandServiceProgressKind 技术需求服务进度类型
|
|
|
|
|
type TechnologyDemandServiceProgressKind int
|
|
|
|
|
|
2022-01-23 22:59:11 +08:00
|
|
|
|
const (
|
|
|
|
|
// TechnologyDemandServiceProgressKindForMemorandum 合作备忘录
|
|
|
|
|
TechnologyDemandServiceProgressKindForMemorandum TechnologyDemandServiceProgressKind = iota + 101
|
|
|
|
|
// TechnologyDemandServiceProgressKindForConfirmation 确认解决方案
|
|
|
|
|
TechnologyDemandServiceProgressKindForConfirmation
|
|
|
|
|
// TechnologyDemandServiceProgressKindForSign 签署合同
|
|
|
|
|
TechnologyDemandServiceProgressKindForSign
|
|
|
|
|
// TechnologyDemandServiceProgressKindForComplete 流程结束
|
|
|
|
|
TechnologyDemandServiceProgressKindForComplete
|
|
|
|
|
)
|
|
|
|
|
|
2022-01-22 16:55:10 +08:00
|
|
|
|
type TechnologyDemandServiceStatus int
|
|
|
|
|
|
|
|
|
|
const (
|
|
|
|
|
// TechnologyDemandServiceStatusForOngoing 进行中
|
|
|
|
|
TechnologyDemandServiceStatusForOngoing TechnologyDemandServiceStatus = iota
|
2022-01-23 22:59:11 +08:00
|
|
|
|
// TechnologyDemandServiceStatusForClosedQuestions 已结题
|
|
|
|
|
TechnologyDemandServiceStatusForClosedQuestions
|
|
|
|
|
// TechnologyDemandServiceStatusForOpenQuestions 未结题
|
|
|
|
|
TechnologyDemandServiceStatusForOpenQuestions
|
2022-01-22 16:55:10 +08:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func (m *TechnologyDemandService) TableName() string {
|
|
|
|
|
return "technology_demand_service"
|
|
|
|
|
}
|
|
|
|
|
|
2022-01-23 22:59:11 +08:00
|
|
|
|
func (m *TechnologyDemandService) NextProgress() TechnologyDemandServiceProgressKind {
|
|
|
|
|
if m.Progress == TechnologyDemandServiceProgressKindForMemorandum {
|
|
|
|
|
return TechnologyDemandServiceProgressKindForConfirmation
|
|
|
|
|
} else if m.Progress == TechnologyDemandServiceProgressKindForConfirmation {
|
|
|
|
|
return TechnologyDemandServiceProgressKindForSign
|
|
|
|
|
}
|
|
|
|
|
return TechnologyDemandServiceProgressKindForComplete
|
|
|
|
|
}
|
|
|
|
|
|
2022-01-22 16:55:10 +08:00
|
|
|
|
func NewTechnologyDemandService() *TechnologyDemandService {
|
|
|
|
|
return &TechnologyDemandService{}
|
|
|
|
|
}
|