package com.engine.salary.entity.salarysob.param;

import com.engine.salary.enums.salarysob.SalarySobAdjustRuleTypeEnum;
import com.engine.salary.util.valid.DataCheck;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @description: 调薪计薪规则保存参数
 * @author: xiajun
 * @modified By: xiajun
 * @date: Created in 12/31/21 11:03 AM
 * @version:v1.0
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class SalarySobAdjustRuleSaveParam {

    //薪资账套的id
    @DataCheck(require = true, message = "薪资账套的ID不允许为空")
    private Long salarySobId;

    //规则参数
    private List<RuleParam> ruleParams;

    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    public static class RuleParam {

        //薪资项目的id
        private Long salaryItemId;

        //生效日期
        private Integer dayOfMonth;

        /**
         * 在生效日期之前调薪如何调整
         *
         * @see SalarySobAdjustRuleTypeEnum
         */
        private Integer beforeAdjustmentType;

        /**
         * 在生效日期之后调薪如何调整
         *
         * @see SalarySobAdjustRuleTypeEnum
         */
        private Integer afterAdjustmentType;
    }
}
