gaoluyang
昨天 90b3ad820eea45d021835197eac5bc3ad55b12ed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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<FinVoucherEntrySaveReqVO> entries;
 
    @Schema(description = "附件编号数组", example = "[]")
    private List<Long> blobIds;
 
}