cooperation_contract.go
1.7 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 TransformToCooperationContractDomainModelFromPgModels(cooperationContractModel *models.CooperationContract) (*domain.CooperationContract, error) {
return &domain.CooperationContract{
CooperationContractId: cooperationContractModel.CooperationContractId,
CooperationContractDescription: cooperationContractModel.CooperationContractDescription,
CooperationContractName: cooperationContractModel.CooperationContractName,
CooperationContractNumber: cooperationContractModel.CooperationContractNumber,
CooperationContractReferrer: cooperationContractModel.CooperationContractReferrer,
CooperationContractSalesman: cooperationContractModel.CooperationContractSalesman,
CooperationContractUndertakerType: cooperationContractModel.CooperationContractUndertakerType,
CooperationContractSponsor: cooperationContractModel.CooperationContractSponsor,
CooperationMode: cooperationContractModel.CooperationMode,
Status: cooperationContractModel.Status,
Org: cooperationContractModel.Org,
Company: cooperationContractModel.Company,
Operator: cooperationContractModel.Operator,
OperateTime: cooperationContractModel.OperateTime,
CreatedAt: cooperationContractModel.CreatedAt,
DeletedAt: cooperationContractModel.DeletedAt,
UpdatedAt: cooperationContractModel.UpdatedAt,
}, nil
}