package cn.iocoder.yudao.module.finance.controller.admin.voucher.vo; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.Valid; import jakarta.validation.constraints.NotEmpty; import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.Size; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; import java.time.LocalDate; import java.util.List; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY; @Schema(description = "管理后台 - 记账凭证新增/修改 Request VO") @Data public class FinVoucherSaveReqVO { @Schema(description = "凭证编号", example = "1024") private Long id; @Schema(description = "凭证字号;为空时由系统按【凭证字+年月+序号】自动生成", example = "记2026090001") @Size(max = 64, message = "凭证字号长度不能超过 64 个字符") private String voucherNo; @Schema(description = "凭证日期", requiredMode = Schema.RequiredMode.REQUIRED) @NotNull(message = "凭证日期不能为空") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY) private LocalDate voucherDate; @Schema(description = "摘要", example = "销售收入") @Size(max = 500, message = "摘要长度不能超过 500 个字符") private String summary; @Schema(description = "附件张数", example = "0") private Integer attachmentCount; @Schema(description = "备注", example = "备注") @Size(max = 500, message = "备注长度不能超过 500 个字符") private String remark; @Schema(description = "凭证分录", requiredMode = Schema.RequiredMode.REQUIRED) @NotEmpty(message = "凭证分录不能为空") @Valid private List entries; @Schema(description = "附件编号数组", example = "[]") private List blobIds; }