cooperation_application.go 1.8 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 TransformToCooperationApplicationDomainModelFromPgModels(cooperationApplicationModel *models.CooperationApplication) (*domain.CooperationApplication, error) {
	return &domain.CooperationApplication{
		CooperationApplicationId:                cooperationApplicationModel.CooperationApplicationId,
		CooperationApplicationApplicant:         cooperationApplicationModel.CooperationApplicationApplicant,
		CooperationApplicationAttachment:        cooperationApplicationModel.CooperationApplicationAttachment,
		CooperationApplicationDescription:       cooperationApplicationModel.CooperationApplicationDescription,
		CooperationApplicationStatus:            cooperationApplicationModel.CooperationApplicationStatus,
		CooperationApplicationVerifier:          cooperationApplicationModel.CooperationApplicationVerifier,
		CooperationApplicationVerifyDescription: cooperationApplicationModel.CooperationApplicationVerifyDescription,
		CooperationApplicationVerifyTime:        cooperationApplicationModel.CooperationApplicationVerifyTime,
		CooperationApplyTime:                    cooperationApplicationModel.CooperationApplyTime,
		CooperationProject:                      cooperationApplicationModel.CooperationProject,
		Org:                                     cooperationApplicationModel.Org,
		Company:                                 cooperationApplicationModel.Company,
		CreatedAt:                               cooperationApplicationModel.CreatedAt,
		DeletedAt:                               cooperationApplicationModel.DeletedAt,
		UpdatedAt:                               cooperationApplicationModel.UpdatedAt,
	}, nil
}