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

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

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

    @Schema(description = "支出金额", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "申请金额不能为空")
    private BigDecimal totalMoney;

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

    @Schema(description = "备注说明", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    private String notes;

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