cooperation_projects_dto.go 1.3 KB
package dto

import "gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/domain"

type CooperationProjectsDto struct {
	*domain.CooperationProject
	//CooperationMode                   *CooperationMode `json:"cooperationMode"`
	// 可以去除勾选的共创项目承接对象列表
	UndertakerTypesUncheckedAvailable []int32 `json:"undertakerTypesUncheckedAvailable"`
	//	 承接人
	Applicants []*domain.User `json:"applicants"`
}

type CooperationMode struct {
	// 共创模式ID
	CooperationModeId int64 `json:"cooperationModeId,string"`
	// 共创模式编码,唯一确定
	CooperationModeNumber string `json:"cooperationModeNumber"`
	// 模式名称,唯一确定
	CooperationModeName string `json:"cooperationModeName"`
}

func (dto *CooperationProjectsDto) LoadDto(project *domain.CooperationProject, mode *domain.CooperationMode, undertakerTypesUncheckedAvailable []int32, applicants []*domain.User) error {
	dto.CooperationProject = project
	dto.UndertakerTypesUncheckedAvailable = undertakerTypesUncheckedAvailable
	//dto.CooperationMode = &CooperationMode{
	//	CooperationModeId:     mode.CooperationModeId,
	//	CooperationModeName:   mode.CooperationModeName,
	//	CooperationModeNumber: mode.CooperationModeNumber,
	//}
	dto.Applicants = applicants
	return nil
}