| New file | 
|  |  |  | 
|---|
|  |  |  | package com.dy.pipIrrGlobal.pojoBa; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.alibaba.fastjson2.annotation.JSONField; | 
|---|
|  |  |  | import com.alibaba.fastjson2.writer.ObjectWriterImplToString; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.annotation.IdType; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.annotation.TableId; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.annotation.TableName; | 
|---|
|  |  |  | import com.dy.common.po.BaseEntity; | 
|---|
|  |  |  | import io.swagger.v3.oas.annotations.media.Schema; | 
|---|
|  |  |  | import jakarta.validation.constraints.NotEmpty; | 
|---|
|  |  |  | import jakarta.validation.constraints.NotNull; | 
|---|
|  |  |  | import lombok.*; | 
|---|
|  |  |  | import org.hibernate.validator.constraints.Length; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * @author wuzeyu | 
|---|
|  |  |  | * @date 2023/12/26 11:12 | 
|---|
|  |  |  | * @LastEditTime 2023/12/26 11:12 | 
|---|
|  |  |  | * @Description 取水口 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 取水口实体 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @TableName(value = "ba_intake", autoResultMap = true) | 
|---|
|  |  |  | @Data | 
|---|
|  |  |  | @Builder | 
|---|
|  |  |  | @ToString | 
|---|
|  |  |  | @NoArgsConstructor | 
|---|
|  |  |  | @AllArgsConstructor | 
|---|
|  |  |  | @Schema(name = "取水口实体") | 
|---|
|  |  |  | public class BaIntake implements BaseEntity { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public static final long serialVersionUID = 202312010953001L; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @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 = 1, max = 25) | 
|---|
|  |  |  | public String name; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 外键,指向片区 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @JSONField(serializeUsing = ObjectWriterImplToString.class) | 
|---|
|  |  |  | @Schema(description = "所在片区ID", requiredMode = Schema.RequiredMode.REQUIRED) | 
|---|
|  |  |  | @NotNull(message = "所在片区不能为空") //不能为null | 
|---|
|  |  |  | public Long blockId; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 外键,指向分水口 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @JSONField(serializeUsing = ObjectWriterImplToString.class) | 
|---|
|  |  |  | @Schema(description = "所在分水口ID", requiredMode = Schema.RequiredMode.REQUIRED) | 
|---|
|  |  |  | @NotNull(message = "所在分水口不能为空") //不能为null | 
|---|
|  |  |  | public Long divideId; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 负责人 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Schema(description = "负责人", requiredMode = Schema.RequiredMode.NOT_REQUIRED) | 
|---|
|  |  |  | @Length(message = "负责人不大于{max}字,不小于{min}字", min = 1, max = 25) | 
|---|
|  |  |  | public String header; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 联系电话 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Schema(description = "联系电话", requiredMode = Schema.RequiredMode.REQUIRED) | 
|---|
|  |  |  | @NotEmpty(message = "联系电话不能为空") //不能为空也不能为null | 
|---|
|  |  |  | @Length(message = "联系电话必须{max}位数据", min = 11, max = 11) | 
|---|
|  |  |  | public String phone; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 外键,指向行政区 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @JSONField(serializeUsing = ObjectWriterImplToString.class) | 
|---|
|  |  |  | @Schema(description = "所在县ID", requiredMode = Schema.RequiredMode.REQUIRED) | 
|---|
|  |  |  | @NotNull(message = "所在县不能为空") //不能为空也不能为null | 
|---|
|  |  |  | public Long countyId; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 外键,指向行政区 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @JSONField(serializeUsing = ObjectWriterImplToString.class) | 
|---|
|  |  |  | @Schema(description = "所在镇ID", requiredMode = Schema.RequiredMode.REQUIRED) | 
|---|
|  |  |  | @NotNull(message = "所在镇不能为空") //不能为空也不能为null | 
|---|
|  |  |  | public Long townId; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 外键,指向行政区 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @JSONField(serializeUsing = ObjectWriterImplToString.class) | 
|---|
|  |  |  | @Schema(description = "所在村ID", requiredMode = Schema.RequiredMode.REQUIRED) | 
|---|
|  |  |  | @NotNull(message = "所在村不能为空") //不能为空也不能为null | 
|---|
|  |  |  | public Long villageId; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 经度 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Schema(description = "经度", requiredMode = Schema.RequiredMode.NOT_REQUIRED) | 
|---|
|  |  |  | public Double lng; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 纬度 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Schema(description = "纬度", requiredMode = Schema.RequiredMode.NOT_REQUIRED) | 
|---|
|  |  |  | public Double lat; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 备注 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Schema(description = "备注", requiredMode = Schema.RequiredMode.NOT_REQUIRED) | 
|---|
|  |  |  | @Length(message = "备注不大于{max}字,不小于{min}字", min = 1, max = 50) | 
|---|
|  |  |  | public String remark; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 删除标志 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Schema(description = "删除标识,表单不用填写", requiredMode = Schema.RequiredMode.NOT_REQUIRED) | 
|---|
|  |  |  | public Byte deleted; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|