credit_account.go
1.5 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 TransformToCreditAccountDomainModelFromPgModels(creditAccountModel *models.CreditAccount) (*domain.CreditAccount, error) {
return &domain.CreditAccount{
CreditAccountId: creditAccountModel.CreditAccountId,
ActuallyPaidAmount: creditAccountModel.ActuallyPaidAmount,
CreditAccountOrderNum: creditAccountModel.CreditAccountOrderNum,
PaymentStatus: creditAccountModel.PaymentStatus,
PaymentTime: creditAccountModel.PaymentTime,
SettlementAmount: creditAccountModel.SettlementAmount,
SettlementTime: creditAccountModel.SettlementTime,
CooperationContractNumber: creditAccountModel.CooperationContractNumber,
Participator: creditAccountModel.Participator,
ParticipateType: creditAccountModel.ParticipateType,
AccountDetail: creditAccountModel.AccountDetail,
PaymentDocumentAttachment: creditAccountModel.PaymentDocumentAttachment,
Org: creditAccountModel.Org,
Company: creditAccountModel.Company,
Operator: creditAccountModel.Operator,
OperateTime: creditAccountModel.OperateTime,
CreatedAt: creditAccountModel.CreatedAt,
DeletedAt: creditAccountModel.DeletedAt,
UpdatedAt: creditAccountModel.UpdatedAt,
}, nil
}