package cn.iocoder.yudao.module.system.controller.admin.holiday.holidaysetting.vo;

import cn.iocoder.yudao.module.system.controller.admin.holiday.holidaybalancesetting.vo.HolidayBalanceSettingRespVO;
import cn.iocoder.yudao.module.system.controller.admin.holiday.holidaysettingrange.vo.HolidaySettingRangeRespVO;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

@Schema(description = "管理后台 - 假期设置 Response VO")
@Data
@ExcelIgnoreUnannotated
public class HolidaySettingRespVO {

    @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "24863")
    @ExcelProperty("编号")
    private Long id;

    @Schema(description = "假期规则名称", example = "赵六")
    @ExcelProperty("假期规则名称")
    private String name;

    @Schema(description = "应用范围 0全公司 1指定(记录在kq_holiday_setting_range 表中)", example = "赵六")
    @ExcelProperty("应用范围 0全公司 1指定(记录在kq_holiday_setting_range 表中)")
    private Integer applicationScope;

    @Schema(description = "新员工请假类型 1入职即可请假 2转正后才可请假", example = "2")
    @ExcelProperty("新员工请假类型 1入职即可请假 2转正后才可请假")
    private Integer newEmployeeLeaveType;

    @Schema(description = "是否带薪 0否 1是")
    @ExcelProperty("是否带薪 0否 1是")
    private Integer salaryFlag;

    @Schema(description = "请假最小单位 1按天 2按半天 3按小时")
    @ExcelProperty("请假最小单位 1按天 2按半天 3按小时")
    private Integer minUnit;

    @Schema(description = "请假取整 0否 1是")
    @ExcelProperty("请假取整 0否 1是")
    private Integer roundFlag;

    @Schema(description = "取整方向 0向下 1向上 (需要取整才有意义)")
    @ExcelProperty("取整方向 0向下 1向上 (需要取整才有意义)")
    private Integer roundDirection;

    @Schema(description = "取整单位 0按半小时 1按小时  (需要取整才有意义)")
    @ExcelProperty("取整单位 0按半小时 1按小时  (需要取整才有意义)")
    private Integer roundUnit;

    @Schema(description = "请假计算方式 0按自然日计算（休息日也会记录请假） 1按工作日计算（请假时段中不包含员工的休息日）")
    @ExcelProperty("请假计算方式 0按自然日计算（休息日也会记录请假） 1按工作日计算（请假时段中不包含员工的休息日）")
    private Integer calculationMethod;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

    @Schema(description = "假期规则人员范围")
    private List<HolidaySettingRangeRespVO> holidaySettingRangeRespVOS;

    @Schema(description = "假期余额设置")
    private HolidayBalanceSettingRespVO holidayBalanceSettingRespVO;

    @Schema(description = "余额规则 发放方式 1每月自动发放 2每年自动发放 3手动发放 4加班时长自动计入余额 null 表示不限制余额")
    private Integer balanceRule;

    @Schema(description = "假期余额余额")
    private BigDecimal holidayBalance;;
}
