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

import cn.iocoder.yudao.module.bpm.controller.admin.upload.UploadUserFile;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotEmpty;
import java.time.LocalDateTime;
import java.util.List;

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

@Schema(description = "管理后台 - OA 采购申请新增/修改 Request VO")
@Data
public class BpmOAProcureSaveReqVO {

    @Schema(description = "报销表单主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "25971")
    private Long id;

    @Schema(description = "申请人的用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "26976")
    private Long userId;

    @Schema(description = "申请事由", example = "不喜欢")
    private String reason;

    @Schema(description = "采购类型 （根据字典的来）", example = "2")
    private Integer procureType;

    @Schema(description = "期望交付日期")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime expectedDeliveryDate;

    @Schema(description = "采购明细数据JSON", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "采购明细数据JSON不能为空")
    private List<ProcureDetail> procureDetailJson;

    @Schema(description = "备注")
    private String remarks;

    @Schema(description = "采购总金额")
    private String totalMoney;

    @Schema(description = "采购总金额大写")
    private String totalMoneyChinese;

    @Schema(description = "报销结果")
    private Integer result;

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

    @Schema(description = "是否已支付 0否 1是 2进行中")
    private Integer payFlag;

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

}
