cooperation_project.go 1.6 KB
package transform

import (
	"gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/domain"
	"gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/infrastructure/pg/models"
)

func TransformToCooperationProjectDomainModelFromPgModels(cooperationProjectModel *models.CooperationProject) (*domain.CooperationProject, error) {
	return &domain.CooperationProject{
		CooperationProjectId:             cooperationProjectModel.CooperationProjectId,
		CooperationProjectNumber:         cooperationProjectModel.CooperationProjectNumber,
		CooperationProjectDescription:    cooperationProjectModel.CooperationProjectDescription,
		CooperationProjectName:           cooperationProjectModel.CooperationProjectName,
		CooperationProjectPublishTime:    cooperationProjectModel.CooperationProjectPublishTime,
		CooperationProjectPublisher:      cooperationProjectModel.CooperationProjectPublisher,
		CooperationProjectSponsor:        cooperationProjectModel.CooperationProjectSponsor,
		CooperationProjectUndertakerType: cooperationProjectModel.CooperationProjectUndertakerType,
		Org:                              cooperationProjectModel.Org,
		Company:                          cooperationProjectModel.Company,
		Operator:                         cooperationProjectModel.Operator,
		OperateTime:                      cooperationProjectModel.OperateTime,
		Status:                           cooperationProjectModel.Status,
		UpdatedAt:                        cooperationProjectModel.UpdatedAt,
		DeletedAt:                        cooperationProjectModel.DeletedAt,
		CreatedAt:                        cooperationProjectModel.CreatedAt,
	}, nil
}