| | |
| | | package com.dy.pipIrrBase.district; |
| | | |
| | | import jakarta.validation.constraints.Max; |
| | | import jakarta.validation.constraints.Min; |
| | | import lombok.*; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import jakarta.validation.constraints.NotNull; |
| | | import jakarta.validation.constraints.NotEmpty; |
| | | import org.hibernate.validator.constraints.Length; |
| | | |
| | |
| | | @Schema(description = "行政区实体id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Long id; |
| | | |
| | | @Schema(description = "上级行政区ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Schema(description = "上级行政区ID", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | public Long supperId ; |
| | | |
| | | @Schema(description = "行政区名称", requiredMode = Schema.RequiredMode.REQUIRED) |
| | |
| | | @Length(message = "行政区编号是一位或两位数", min = 1, max = 2) |
| | | public String num ; |
| | | |
| | | @Schema(description = "行政区级别", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @NotNull(message = "行政区级别不能为空") //不能为空也不能为null |
| | | @Max(message = "行政区级别不正确", value = 10) |
| | | @Min(message = "行政区级别不正确",value = 0) |
| | | @Schema(description = "行政区级别", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Byte level ; |
| | | |
| | | @Schema(description = "行政区删除标志", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |