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;
|
|
/**
|
* 控制器实体,RTU阀控一体机
|
*/
|
@TableName(value = "ba_intake", autoResultMap = true)
|
@Data
|
@Builder
|
@ToString
|
@NoArgsConstructor
|
@AllArgsConstructor
|
@Schema(name = "RTU阀控一体机实体")
|
public class BaRTU implements BaseEntity {
|
|
public static final long serialVersionUID = 202312011021001L;
|
|
@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 num;
|
|
/**
|
* 外键,指向取水口
|
*/
|
@JSONField(serializeUsing = ObjectWriterImplToString.class)
|
@Schema(description = "所在取水口ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
@NotNull(message = "所在取水口不能为空") //不能为null
|
public Long intakeId;
|
|
/**
|
* 外键,指向农户(用水户)
|
*/
|
@JSONField(serializeUsing = ObjectWriterImplToString.class)
|
@Schema(description = "所属农户ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
@NotNull(message = "所属农户不能为空") //不能为null
|
public Long clientId;
|
|
/**
|
* 负责人
|
*/
|
@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;
|
|
/**
|
* 开关阀
|
*/
|
@Schema(description = "开关阀", requiredMode = Schema.RequiredMode.REQUIRED)
|
@NotEmpty(message = "0关阀,1开阀") //不能为空也不能为null
|
@Length(message = "联系电话必须{max}位数据", min = 1, max = 1)
|
public Byte isOpen;
|
|
/**
|
* 控制器名称
|
*/
|
@Schema(description = "控制器名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
@NotEmpty(message = "控制器名称非必填") //不能为空也不能为null
|
@Length(message = "控制器名称不大于{max}字,不小于{min}字", min = 1, max = 25)
|
public String name;
|
|
/**
|
* 厂家名称
|
*/
|
@Schema(description = "厂家名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
@NotEmpty(message = "厂家名称非必填") //不能为空也不能为null
|
@Length(message = "厂家名称不大于{max}字,不小于{min}字", min = 1, max = 25)
|
public String manufacturer;
|
|
/**
|
* 备注
|
*/
|
@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;
|
}
|