9 小时以前 9bad721754fe8bbe2e5f459d0706e0fefac569f3
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
52
53
54
55
56
57
package cn.iocoder.yudao.module.qcreport.controller.admin.template.vo;
 
import cn.iocoder.yudao.framework.common.validation.InEnum;
import cn.iocoder.yudao.module.qcreport.enums.QcReportEnums.OrientationEnum;
import cn.iocoder.yudao.module.qcreport.enums.QcReportEnums.PageSizeEnum;
import cn.iocoder.yudao.module.qcreport.enums.QcReportEnums.TemplateStatusEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import lombok.Data;
 
@Schema(description = "管理后台 - 智能质检报告模板 创建/修改 Request VO")
@Data
public class QcReportTemplateSaveReqVO {
 
    @Schema(description = "模板编号", example = "1024")
    private Long id;
 
    @Schema(description = "模板编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "QC_REPORT_IQC_A4")
    @NotEmpty(message = "模板编码不能为空")
    @Size(max = 64, message = "模板编码长度不能超过 64 个字符")
    @Pattern(regexp = "^[A-Za-z0-9_-]+$", message = "模板编码只能包含字母、数字、下划线和短横线")
    private String templateCode;
 
    @Schema(description = "模板名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "来料检验报告")
    @NotEmpty(message = "模板名称不能为空")
    @Size(max = 128, message = "模板名称长度不能超过 128 个字符")
    private String templateName;
 
    @Schema(description = "所属行业", example = "manufacturing")
    @Size(max = 32, message = "所属行业长度不能超过 32 个字符")
    private String industry;
 
    @Schema(description = "报告类型", example = "IQC")
    @Size(max = 32, message = "报告类型长度不能超过 32 个字符")
    private String reportType;
 
    @Schema(description = "纸张尺寸", requiredMode = Schema.RequiredMode.REQUIRED, example = "A4")
    @NotEmpty(message = "纸张尺寸不能为空")
    @InEnum(PageSizeEnum.class)
    private String pageSize;
 
    @Schema(description = "纸张方向", requiredMode = Schema.RequiredMode.REQUIRED, example = "portrait")
    @NotEmpty(message = "纸张方向不能为空")
    @InEnum(OrientationEnum.class)
    private String orientation;
 
    @Schema(description = "模板状态:0启用 1停用", example = "0")
    @InEnum(TemplateStatusEnum.class)
    private Integer status;
 
    @Schema(description = "模板描述", example = "用于来料检验单的 A4 报告模板")
    @Size(max = 512, message = "模板描述长度不能超过 512 个字符")
    private String description;
 
}