| | |
| | | */ |
| | | @Schema(description = "片区名称", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @NotEmpty(message = "片区名称不能为空") //不能为空也不能为null |
| | | @Length(message = "片区名称小于{max}字", min = 1, max = 25) |
| | | @Length(message = "片区名称不大于{max}字符,不小于{min}字符", min = 1, max = 25) |
| | | public String name; |
| | | |
| | | /** |
| | | * 负责人 |
| | | */ |
| | | @Schema(description = "片区负责人", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Length(message = "片区负责人姓名小于{max}字", min = 1, max = 25) |
| | | @Length(message = "片区负责人姓名不大于{max}字符,不小于{min}字符", min = 1, max = 25) |
| | | public String header; |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 是否删除: 0表示未删除 1表示删除. |
| | | */ |
| | | @Schema(description = "片区删除标志", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Schema(description = "片区删除标志,表单不用填写", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Deleted deleted; |
| | | |
| | | } |
| | |
| | | */ |
| | | @Schema(description = "行政区名称", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @NotEmpty(message = "行政区名称不能为空") //不能为空也不能为null |
| | | @Length(message = "行政区名称小于{max}字", min = 1, max = 25) |
| | | @Length(message = "行政区名称不大于{max}字符,不小于{min}字符", min = 1, max = 25) |
| | | public String name; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Schema(description = "行政区级别", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @NotNull(message = "行政区级别不能为空") //不能为空也不能为null |
| | | @Max(message = "行政区级别不正确", value = 10) |
| | | @Min(message = "行政区级别不正确",value = 0) |
| | | @Max(message = "行政区级别不大于10", value = 10) |
| | | @Min(message = "行政区级别不小于0",value = 0) |
| | | public DistrictLevel level; |
| | | |
| | | /** |
| | | * 是否删除: 0表示未删除 1表示删除. |
| | | */ |
| | | @Schema(description = "行政区删除标志", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Schema(description = "删除标识,表单不用填写", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Deleted deleted; |
| | | |
| | | /** |
| | |
| | | import com.dy.common.mybatis.envm.Deleted; |
| | | import com.dy.common.mybatis.envm.Disabled; |
| | | import com.dy.common.po.BaseEntity; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import jakarta.validation.constraints.Max; |
| | | import jakarta.validation.constraints.Min; |
| | | import jakarta.validation.constraints.NotEmpty; |
| | | import lombok.*; |
| | | import org.hibernate.validator.constraints.Length; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | @TableId(type = IdType.INPUT) |
| | | @Schema(description = "实体id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Long id; |
| | | |
| | | /** |
| | | * 用户姓名 |
| | | */ |
| | | @Schema(description = "姓名", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @NotEmpty(message = "姓名不能为空") //不能为空也不能为null |
| | | @Length(message = "姓名不大于{max}字符,不小于{min}字符", min = 2, max = 25) |
| | | public String name; |
| | | |
| | | /** |
| | | * 手机号,手机号用于登录系统 |
| | | */ |
| | | @Schema(description = "手机号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Length(message = "手机号必须{max}位数据", min = 11, max = 11) |
| | | public String phone; |
| | | |
| | | /** |
| | | * 密码,密码的MD5加密 |
| | | */ |
| | | @Schema(description = "密码", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @Length(message = "密码必须{max}位数据", min = 6, max = 6) |
| | | public String password; |
| | | |
| | | /** |
| | | * 供水机构标签 |
| | | */ |
| | | @TableField(value = "orgTag") |
| | | @JSONField(serialize = false) |
| | | public String orgTag; |
| | | |
| | | /** |
| | | * 是否超级管理员 1:是,0:否 |
| | | */ |
| | | @TableField(value = "supperAdmin") |
| | | @JSONField(serialize = false) |
| | | public Byte supperAdmin; |
| | | |
| | | /** |
| | | * 是否禁用 0:否,1:是 |
| | | */ |
| | | @Schema(description = "是否禁用", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Max(message = "是否禁用只能0或1", value = 1) |
| | | @Min(message = "是否禁用只能0或1",value = 0) |
| | | public Disabled disabled; |
| | | |
| | | /** |
| | | * 是否删除: 0表示未删除 1表示删除. |
| | | */ |
| | | @Schema(description = "删除标识,表单不用填写", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Deleted deleted; |
| | | |
| | | |