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

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDate;

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

/**
 * 功能描述 现金支出项目明细
 */
@Data
public class Cash {

    @Schema(description = "id")
    private Long id;

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

    @Schema(description = "费用类型 | 字典值参照bpm_oa_cash_type", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "费用类型不能为空")
    private Integer type;

    @Schema(description = "费用产生部门", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "费用产生部门不能为空")
    private Long deptId;

    @Schema(description = "费用产生部门名称")
    private String deptName;

    @Schema(description = "采购申请编号")
    private Long procureId;

    @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 = "备注")
    private String notes;
}
