作者 陈志颖

feat:共创项目增加发起部门

... ... @@ -18,6 +18,8 @@ type CooperationProject struct {
CooperationProjectPublisher *User `json:"cooperationProjectPublisher"`
// 共创项目发起人
CooperationProjectSponsor *User `json:"cooperationProjectSponsor"`
// 共创项目发起部门
Department *Department `json:"department"`
// 共创项目承接对象,1员工,2共创用户,3公开,可以多选
CooperationProjectUndertakerType []int32 `json:"cooperationProjectUndertakerType"`
// 数据所属组织机构
... ...
... ... @@ -21,6 +21,8 @@ type CooperationProject struct {
CooperationProjectPublisher *domain.User `comment:"共创项目发布人"`
// 共创项目发起人
CooperationProjectSponsor *domain.User `comment:"共创项目发起人"`
// 共创项目发起部门
Department *domain.Department `comment:"共创项目发起部门"`
// 共创项目承接对象,1员工,2共创用户,3公开,可以多选
CooperationProjectUndertakerType []int32 `comment:"共创项目承接对象,1员工,2共创用户,3公开,可以多选" pg:",array"`
// 数据所属组织机构
... ...
... ... @@ -14,6 +14,7 @@ func TransformToCooperationProjectDomainModelFromPgModels(cooperationProjectMode
CooperationProjectPublishTime: cooperationProjectModel.CooperationProjectPublishTime,
CooperationProjectPublisher: cooperationProjectModel.CooperationProjectPublisher,
CooperationProjectSponsor: cooperationProjectModel.CooperationProjectSponsor,
Department: cooperationProjectModel.Department,
CooperationProjectUndertakerType: cooperationProjectModel.CooperationProjectUndertakerType,
Org: cooperationProjectModel.Org,
Company: cooperationProjectModel.Company,
... ...
... ... @@ -33,6 +33,7 @@ func (repository *CooperationProjectRepository) Save(cooperationProject *domain.
"cooperation_project_publish_time",
"cooperation_project_publisher",
"cooperation_project_sponsor",
"department",
"cooperation_project_undertaker_type",
"org",
"company",
... ... @@ -65,6 +66,7 @@ func (repository *CooperationProjectRepository) Save(cooperationProject *domain.
&cooperationProject.CooperationProjectPublishTime,
&cooperationProject.CooperationProjectPublisher,
&cooperationProject.CooperationProjectSponsor,
&cooperationProject.Department,
pg.Array(&cooperationProject.CooperationProjectUndertakerType),
&cooperationProject.Org,
&cooperationProject.Company,
... ... @@ -83,6 +85,7 @@ func (repository *CooperationProjectRepository) Save(cooperationProject *domain.
cooperationProject.CooperationProjectPublishTime,
cooperationProject.CooperationProjectPublisher,
cooperationProject.CooperationProjectSponsor,
cooperationProject.Department,
pg.Array(cooperationProject.CooperationProjectUndertakerType),
cooperationProject.Org,
cooperationProject.Company,
... ... @@ -105,6 +108,7 @@ func (repository *CooperationProjectRepository) Save(cooperationProject *domain.
&cooperationProject.CooperationProjectPublishTime,
&cooperationProject.CooperationProjectPublisher,
&cooperationProject.CooperationProjectSponsor,
&cooperationProject.Department,
pg.Array(&cooperationProject.CooperationProjectUndertakerType),
&cooperationProject.Org,
&cooperationProject.Company,
... ... @@ -123,6 +127,7 @@ func (repository *CooperationProjectRepository) Save(cooperationProject *domain.
cooperationProject.CooperationProjectPublishTime,
cooperationProject.CooperationProjectPublisher,
cooperationProject.CooperationProjectSponsor,
cooperationProject.Department,
pg.Array(cooperationProject.CooperationProjectUndertakerType),
cooperationProject.Org,
cooperationProject.Company,
... ...