| 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 lombok.*; | 
|---|
|  |  |  | import org.hibernate.validator.constraints.Length; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 农户类型实体 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @TableName(value="ba_client", autoResultMap = true) | 
|---|
|  |  |  | @Data | 
|---|
|  |  |  | @Builder | 
|---|
|  |  |  | @ToString | 
|---|
|  |  |  | @NoArgsConstructor | 
|---|
|  |  |  | @AllArgsConstructor | 
|---|
|  |  |  | @Schema(name = "农户类型实体") | 
|---|
|  |  |  | public class BaClientType implements BaseEntity { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public static final long serialVersionUID = 202311141553001L; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @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; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|