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

import com.engine.hrmelog.annotation.ElogTransform;
import com.engine.salary.enums.salarysob.SalaryEmployeeStatusEnum;
import com.engine.salary.enums.salarysob.TargetTypeEnum;
import com.engine.salary.util.valid.DataCheck;
import com.engine.salary.util.valid.ValidTypeEnum;
import lombok.Data;

import java.util.List;

/**
 * 薪资账套人员范围保存参数
 * <p>Copyright: Copyright (c) 2022</p>
 * <p>Company: 泛微软件</p>
 *
 * @author qiantao
 * @version 1.0
 **/
@Data
@ElogTransform( name = "薪资账套人员范围" )
//薪资账套人员范围保存参数")
public class SalarySobRangeSaveParam {

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

    //是包含还是排除。0：排除、1：包含")
    @DataCheck(require = true, type = ValidTypeEnum.NUMBER, max = 1, min = 0, message = "只能选择 关联人员范围/从范围中排除")
    @ElogTransform( name = "关联人员范围/从范围中排除" )
    private Integer includeType;

    //对象
    @DataCheck(require = true, message = "对象不能为空")
    @ElogTransform( name = "对象" )
    private List<SalarySobRangeTargetParam> targetParams;

    //员工状态
    @DataCheck(require = true, message = "员工状态不允许为空")
    @ElogTransform( name="员工状态" )
    private SalaryEmployeeStatusEnum[] employeeStatus;

    @Data
    //薪资账套人员范围保存参数中的对象
    public static class SalarySobRangeTargetParam {

        //对象类型
        @DataCheck(require = true, message = "对象类型不能为空")
        @ElogTransform( name="对象类型" )
        private TargetTypeEnum targetType;

        //对象id
        //@DataCheck(require = true, message = "对象不能为空")
        @ElogTransform( name="对象id" )
        private Long targetId;

        //员工状态 -- 导入使用
//        @DataCheck(require = true, message = "员工状态不允许为空")
        private SalaryEmployeeStatusEnum[] employeeStatus;

        // 安全级别最小值
//        private Long minSecLevel;

        // 安全级别最大值
//        private Long maxSecLevel;
    }
}
