cooperation_projects_dto.go 871 字节
package dto

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

type CooperationProjectsDto struct {
	*domain.CooperationProject
	CooperationMode *CooperationMode `json:"cooperationMode"`
}

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) {
	dto.CooperationProject = project
	dto.CooperationMode = &CooperationMode{
		CooperationModeId:     mode.CooperationModeId,
		CooperationModeName:   mode.CooperationModeName,
		CooperationModeNumber: mode.CooperationModeNumber,
	}
}