order_good.go
1.0 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 TransformToOrderGoodDomainModelFromPgModels(orderGoodModel *models.OrderGood) (*domain.OrderGood, error) {
return &domain.OrderGood{
OrderGoodId: orderGoodModel.OrderGoodId,
OrderGoodAmount: orderGoodModel.OrderGoodAmount,
OrderGoodName: orderGoodModel.OrderGoodName,
OrderGoodPrice: orderGoodModel.OrderGoodPrice,
OrderGoodQuantity: orderGoodModel.OrderGoodQuantity,
DividendsOrderNumber: orderGoodModel.DividendsOrderNumber,
CooperationContractNumber: orderGoodModel.CooperationContractNumber,
OrderGoodExpense: orderGoodModel.OrderGoodExpense,
CreatedAt: orderGoodModel.CreatedAt,
DeletedAt: orderGoodModel.DeletedAt,
UpdatedAt: orderGoodModel.UpdatedAt,
}, nil
}