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 ; }