money_incentives_rule.go
1.4 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 TransformToMoneyIncentivesRuleDomainModelFromPgModels(moneyIncentivesRuleModel *models.MoneyIncentivesRule) (*domain.MoneyIncentivesRule, error) {
return &domain.MoneyIncentivesRule{
MoneyIncentivesRuleId: moneyIncentivesRuleModel.MoneyIncentivesRuleId,
CooperationContractNumber: moneyIncentivesRuleModel.CooperationContractNumber,
MoneyIncentivesAmount: moneyIncentivesRuleModel.MoneyIncentivesAmount,
MoneyIncentivesStage: moneyIncentivesRuleModel.MoneyIncentivesStage,
MoneyIncentivesStageEnd: moneyIncentivesRuleModel.MoneyIncentivesStageEnd,
MoneyIncentivesStageStart: moneyIncentivesRuleModel.MoneyIncentivesStageStart,
MoneyIncentivesTime: moneyIncentivesRuleModel.MoneyIncentivesTime,
ReferrerPercentage: moneyIncentivesRuleModel.ReferrerPercentage,
SalesmanPercentage: moneyIncentivesRuleModel.SalesmanPercentage,
Org: moneyIncentivesRuleModel.Org,
Company: moneyIncentivesRuleModel.Company,
UpdatedAt: moneyIncentivesRuleModel.UpdatedAt,
DeletedAt: moneyIncentivesRuleModel.DeletedAt,
CreatedAt: moneyIncentivesRuleModel.CreatedAt,
}, nil
}