dividends_incentives_rule.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 TransformToDividendsIncentivesRuleDomainModelFromPgModels(dividendsIncentivesRuleModel *models.DividendsIncentivesRule) (*domain.DividendsIncentivesRule, error) {
return &domain.DividendsIncentivesRule{
DividendsIncentivesRuleId: dividendsIncentivesRuleModel.DividendsIncentivesRuleId,
CooperationContractNumber: dividendsIncentivesRuleModel.CooperationContractNumber,
ReferrerPercentage: dividendsIncentivesRuleModel.ReferrerPercentage,
SalesmanPercentage: dividendsIncentivesRuleModel.SalesmanPercentage,
DividendsIncentivesPercentage: dividendsIncentivesRuleModel.DividendsIncentivesPercentage,
DividendsIncentivesStage: dividendsIncentivesRuleModel.DividendsIncentivesStage,
DividendsIncentivesStageEnd: dividendsIncentivesRuleModel.DividendsIncentivesStageEnd,
DividendsIncentivesStageStart: dividendsIncentivesRuleModel.DividendsIncentivesStageStart,
Org: dividendsIncentivesRuleModel.Org,
Company: dividendsIncentivesRuleModel.Company,
UpdatedAt: dividendsIncentivesRuleModel.UpdatedAt,
DeletedAt: dividendsIncentivesRuleModel.DeletedAt,
CreatedAt: dividendsIncentivesRuleModel.CreatedAt,
}, nil
}