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.mybatis.envm.Deleted; 
 | 
import com.dy.common.po.BaseEntity; 
 | 
import jakarta.validation.constraints.Max; 
 | 
import jakarta.validation.constraints.Min; 
 | 
import jakarta.validation.constraints.NotEmpty; 
 | 
import lombok.*; 
 | 
import io.swagger.v3.oas.annotations.media.Schema; 
 | 
import org.hibernate.validator.constraints.Length; 
 | 
/** 
 | 
 * 片区划实体 
 | 
 */ 
 | 
@TableName(value="ba_district", autoResultMap = true) 
 | 
@Data 
 | 
@Builder 
 | 
@ToString 
 | 
@NoArgsConstructor 
 | 
@AllArgsConstructor 
 | 
@Schema(name = "片区实体") 
 | 
public class BaBlock implements BaseEntity { 
 | 
  
 | 
    public static final long serialVersionUID = 20231191728001L; 
 | 
  
 | 
    @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; 
 | 
  
 | 
    /** 
 | 
     * 负责人 
 | 
     */ 
 | 
    @Schema(description = "片区负责人", requiredMode = Schema.RequiredMode.NOT_REQUIRED) 
 | 
    @Length(message = "片区负责人姓名不大于{max}字,不小于{min}字", min = 1, max = 25) 
 | 
    public String header; 
 | 
  
 | 
    /** 
 | 
     * 负责人电话 
 | 
     */ 
 | 
    @Schema(description = "片区负责人手机号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) 
 | 
    @Length(message = "片区负责人手机号必须{max}位数据", min = 11, max = 11) 
 | 
    public String phone; 
 | 
  
 | 
    /** 
 | 
     * 种植面积 
 | 
     */ 
 | 
    @Schema(description = "片区面积", requiredMode = Schema.RequiredMode.NOT_REQUIRED) 
 | 
    @Max(message = "片区面积不正确", value = 100000000) 
 | 
    @Min(message = "片区面积不正确",value = 0) 
 | 
    public Integer area; 
 | 
  
 | 
    /** 
 | 
     * 电子地图区域着色 
 | 
     */ 
 | 
    @Schema(description = "区域着色", requiredMode = Schema.RequiredMode.NOT_REQUIRED) 
 | 
    @Length(message = "区域着色长度小于{max}字", min = 1, max = 6) 
 | 
    public String color; 
 | 
  
 | 
    /** 
 | 
     * 备注 
 | 
     */ 
 | 
    @Schema(description = "备注", requiredMode = Schema.RequiredMode.NOT_REQUIRED) 
 | 
    @Length(message = "备注长度小于{max}字", min = 1, max = 50) 
 | 
    public String remark; 
 | 
  
 | 
    /** 
 | 
     * 是否删除: 0表示未删除  1表示删除. 
 | 
     */ 
 | 
    @Schema(description = "片区删除标志,表单不用填写", requiredMode = Schema.RequiredMode.NOT_REQUIRED) 
 | 
    public Deleted deleted; 
 | 
  
 | 
} 
 |