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

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.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 BpmOASealCreateReqVO {

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

    @Schema(description = "印章类型-参见 bpm_oa_seal_type 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "印章类型不能为空")
    private Integer type;

    @Schema(description = "文件名称", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "文件名称不能为空")
    private String fileName;

    @Schema(description = "文件数量", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "文件份数不能为空")
    private Long fileNumber;

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

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