Files
cas_tt_cloud_backend/app/common/model/technology_demand_service.go

55 lines
2.3 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package model
// TechnologyDemandService 技术需求服务信息
type TechnologyDemandService struct {
Model
AgentID uint64 `gorm:"column:agent_id;type:int(11);default:0;comment:经纪人模型ID" 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 TechnologyDemandServiceStatus `gorm:"column:status;type:tinyint(1);default:0;comment:进度状态0进行中1已结题2未结题" json:"status"`
ModelDeleted
ModelAt
}
// TechnologyDemandServiceProgressKind 技术需求服务进度类型
type TechnologyDemandServiceProgressKind int
const (
// TechnologyDemandServiceProgressKindForMemorandum 合作备忘录
TechnologyDemandServiceProgressKindForMemorandum TechnologyDemandServiceProgressKind = iota + 101
// TechnologyDemandServiceProgressKindForConfirmation 确认解决方案
TechnologyDemandServiceProgressKindForConfirmation
// TechnologyDemandServiceProgressKindForSign 签署合同
TechnologyDemandServiceProgressKindForSign
// TechnologyDemandServiceProgressKindForComplete 流程结束
TechnologyDemandServiceProgressKindForComplete
)
type TechnologyDemandServiceStatus int
const (
// TechnologyDemandServiceStatusForOngoing 进行中
TechnologyDemandServiceStatusForOngoing TechnologyDemandServiceStatus = iota
// 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{}
}