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

import cn.iocoder.yudao.module.bpm.controller.admin.upload.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.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Set;

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

@Schema(description = "管理后台 - 奖惩申请创建 Request VO")
@Data
@EqualsAndHashCode()
@ToString(callSuper = true)
public class BpmOAIncentiveCreateReqVO {

    @Schema(description = "奖惩类型 字典值参考 bpm_oa_incentive_type", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "奖惩类型不能为空")
    private Integer type;

    @Schema(description = "奖惩人编号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "奖惩人编号不能为空")
    private Set<Long> incentiveUserIds;

    @Schema(description = "奖惩人部门编号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "奖惩人部门编号不能为空")
    private Set<Long> incentiveDeptIds;

    @Schema(description = "奖惩时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "奖惩时间不能为空")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime time;

    @Schema(description = "奖惩金额", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "奖惩金额不能为空")
    private BigDecimal amount;

    @Schema(description = "奖惩事由", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "奖惩事由不能为空")
    private String reason;

    @Schema(description = "上传文件", requiredMode = Schema.RequiredMode.REQUIRED)
    private List<UploadUserFile> fileItems ;
}
