wuzeyu
2023-11-27 7c98e347015e96a7683dbb08b36495c75c54bea5
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
package com.dy.pipIrrBase.district;
 
import lombok.*;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import org.hibernate.validator.constraints.Length;
 
@Data
@ToString
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Schema(name = "行政区划值对象")
public class DistrictVo {
    @Schema(description = "行政区实体id", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Long id;
 
    @Schema(description = "上级行政区ID", requiredMode = Schema.RequiredMode.REQUIRED)
    public Long supperId ;
 
    @Schema(description = "行政区名称", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "行政区名称不能为空") //不能为空也不能为null
    @Length(message = "行政区名称小于{max}字", min = 1, max = 25)
    public String name ;
 
    @Schema(description = "行政区编号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "行政区编号不能为空") //不能为空也不能为null
    @Length(message = "行政区编号是一位或两位数", min = 1, max = 2)
    public String num ;
 
    @Schema(description = "行政区级别", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Byte level ;
 
    @Schema(description = "行政区删除标志", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Byte deleted ;
 
}