package cn.iocoder.yudao.module.expense.controller.admin.expenseinfo.vo;

import cn.iocoder.yudao.module.expense.dal.dataobject.expenseinfo.ExpenseInfoObjDO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.List;

@Schema(description = "管理后台 - 报销信息新增/修改 Request VO")
@Data
public class ExpenseInfoSaveReqVO {

    @Schema(description = "表单主键")
    private Long id;

    @Schema(description = "报销申请人id", example = "1")
    @NotNull(message = "报销申请人id不能为空")
    private Long employeeId;

    @Schema(description = "报销类型主键id", example = "1")
    @NotNull(message = "报销类型主键id不能为空")
    private Long expenseTypeId;

    @Schema(description = "费用所属区间", requiredMode = Schema.RequiredMode.REQUIRED, example = "2024-08")
    @NotBlank(message = "费用所属区间不能为空")
    private String expenseMonth;

    @Schema(description = "总预算金额，单位（元）", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "总预算金额，单位（元）不能为空")
    @Min(value = 0, message = "总预算金额，单位（元）不能为负数")
    private BigDecimal totalMoney;

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

    @Schema(description = "数据来源，0流程添加、1手动添加")
    private String infoSource;

    @Schema(description = "附件主键id", example = "[1, 2]")
    private List<Long> fileIdList;

    @Schema(description = "报销信息子列表", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "报销信息子列表不能为空")
    private List<ExpenseInfoObjDO> expenseInfoObjs;

}