...
|
...
|
@@ -167,7 +167,6 @@ func (repository *CooperationContractRepository) Save(cooperationContract *domai |
|
|
var dividendsIncentivesRulesModel []*models.DividendsIncentivesRule
|
|
|
for _, rule := range cooperationContract.DividendsIncentivesRules {
|
|
|
dividendsIncentivesRulesModel = append(dividendsIncentivesRulesModel, &models.DividendsIncentivesRule{
|
|
|
DividendsIncentivesRuleId: 0,
|
|
|
CooperationContractNumber: cooperationContract.CooperationContractNumber,
|
|
|
ReferrerPercentage: rule.ReferrerPercentage,
|
|
|
SalesmanPercentage: rule.SalesmanPercentage,
|
...
|
...
|
@@ -193,7 +192,6 @@ func (repository *CooperationContractRepository) Save(cooperationContract *domai |
|
|
var moneyIncentivesRulesModel []*models.MoneyIncentivesRule
|
|
|
for _, rule := range cooperationContract.MoneyIncentivesRules {
|
|
|
moneyIncentivesRulesModel = append(moneyIncentivesRulesModel, &models.MoneyIncentivesRule{
|
|
|
MoneyIncentivesRuleId: 0,
|
|
|
CooperationContractNumber: cooperationContract.CooperationContractNumber,
|
|
|
MoneyIncentivesAmount: rule.MoneyIncentivesAmount,
|
|
|
MoneyIncentivesStage: rule.MoneyIncentivesStage,
|
...
|
...
|
@@ -292,21 +290,20 @@ func (repository *CooperationContractRepository) Save(cooperationContract *domai |
|
|
var cooperationContractRelevantPeopleToAddModels []*models.CooperationContractRelevant
|
|
|
for _, relevantDomain := range cooperationContractRelevantPeopleToAdd {
|
|
|
cooperationContractRelevantPeopleToAddModels = append(cooperationContractRelevantPeopleToAddModels, &models.CooperationContractRelevant{
|
|
|
CooperationContractRelevantId: 0,
|
|
|
CooperationContractNumber: relevantDomain.CooperationContractNumber,
|
|
|
UserId: relevantDomain.UserId,
|
|
|
UserBaseId: relevantDomain.UserBaseId,
|
|
|
Org: relevantDomain.Org,
|
|
|
Orgs: relevantDomain.Orgs,
|
|
|
Department: relevantDomain.Department,
|
|
|
Roles: relevantDomain.Roles,
|
|
|
UserInfo: relevantDomain.UserInfo,
|
|
|
UserType: relevantDomain.UserType,
|
|
|
Status: relevantDomain.Status,
|
|
|
Company: relevantDomain.Company,
|
|
|
UpdatedAt: time.Time{},
|
|
|
DeletedAt: time.Time{},
|
|
|
CreatedAt: time.Now(),
|
|
|
CooperationContractNumber: relevantDomain.CooperationContractNumber,
|
|
|
UserId: relevantDomain.UserId,
|
|
|
UserBaseId: relevantDomain.UserBaseId,
|
|
|
Org: relevantDomain.Org,
|
|
|
Orgs: relevantDomain.Orgs,
|
|
|
Department: relevantDomain.Department,
|
|
|
Roles: relevantDomain.Roles,
|
|
|
UserInfo: relevantDomain.UserInfo,
|
|
|
UserType: relevantDomain.UserType,
|
|
|
Status: relevantDomain.Status,
|
|
|
Company: relevantDomain.Company,
|
|
|
UpdatedAt: time.Time{},
|
|
|
DeletedAt: time.Time{},
|
|
|
CreatedAt: time.Now(),
|
|
|
})
|
|
|
}
|
|
|
|
...
|
...
|
|