cooperation_contract_undertaker.go 985 字节
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 TransformToCooperationContractUndertakerDomainModelFromPgModels(cooperationContractUndertakerModel *models.CooperationContractUndertaker) (*domain.CooperationContractUndertaker, error) {
	return &domain.CooperationContractUndertaker{
		CooperationContractUndertakerId: cooperationContractUndertakerModel.CooperationContractUndertakerId,
		CooperationContractNumber:       cooperationContractUndertakerModel.CooperationContractNumber,
		Undertaker:                      cooperationContractUndertakerModel.Undertaker,
		CreatedAt:                       cooperationContractUndertakerModel.CreatedAt,
		UpdatedAt:                       cooperationContractUndertakerModel.UpdatedAt,
		DeletedAt:                       cooperationContractUndertakerModel.DeletedAt,
	}, nil
}