cooperation_contract_change_log.go 1.3 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 TransformToCooperationContractChangeLogDomainModelFromPgModels(cooperationContractChangeLogModel *models.CooperationContractChangeLog) (*domain.CooperationContractChangeLog, error) {
	return &domain.CooperationContractChangeLog{
		IncentivesRule:            cooperationContractChangeLogModel.IncentivesRule,
		IncentivesRuleDetail:      cooperationContractChangeLogModel.IncentivesRuleDetail,
		OperationType:             cooperationContractChangeLogModel.OperationType,
		CooperationContractNumber: cooperationContractChangeLogModel.CooperationContractNumber,
		Undertakers:               cooperationContractChangeLogModel.Undertakers,
		Company:                   cooperationContractChangeLogModel.Company,
		Org:                       cooperationContractChangeLogModel.Org,
		Operator:                  cooperationContractChangeLogModel.Operator,
		OperatorTime:              cooperationContractChangeLogModel.OperatorTime,
		UpdatedAt:                 cooperationContractChangeLogModel.UpdatedAt,
		DeletedAt:                 cooperationContractChangeLogModel.DeletedAt,
		CreatedAt:                 cooperationContractChangeLogModel.CreatedAt,
	}, nil
}