package cn.iocoder.yudao.module.bpm.controller.admin.oa.vo.salaryadjustment;

import cn.iocoder.yudao.framework.common.pojo.UploadUserFile;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.time.LocalDate;
import java.util.List;

import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY;

/**
 * 薪资付款申请 创建 Request VO
 *
 * @author 符溶馨
 */
@Schema(description = "管理后台 - 薪资付款申请创建 Request VO")
@Data
@EqualsAndHashCode()
@ToString(callSuper = true)
public class BpmOASalaryAdjustmentCreateReqVO {

    @Schema(description = "调整类型 | 1:涨薪 2:降薪", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "调整类型不能为空")
    private Integer type;

    @Schema(description = "调整人用户编号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "调整人用户编号不能为空")
    private Long adjustmentUserId;

    @Schema(description = "调整人部门编号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "调整人部门编号不能为空")
    private Long adjustmentDeptId;

    @Schema(description = "调整日期", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "调整日期不能为空")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
    private LocalDate adjustmentDate;

    @Schema(description = "调整前薪资", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "调整前薪资不能为空")
    private Integer salaryBefore;

    @Schema(description = "调整后薪资", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "调整后薪资不能为空")
    private Integer salaryAfter;

    @Schema(description = "调整原因", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "调整原因不能为空")
    private String reason;

    @Schema(description = "调整原因描述")
    private String description;

    @Schema(description = "流程实例编号")
    private String processInstanceId;

    @Schema(description = "状态-参见 bpm_process_instance_result 枚举")
    private Integer result;

    @Schema(description = "上传文件")
    private List<UploadUserFile> fileItems;
}