| New file | 
 |  |  | 
 |  |  | package com.dy.pipIrrGlobal.pojoRm; | 
 |  |  | /** | 
 |  |  |  * @author ZhuBaoMin | 
 |  |  |  * @date 2024-05-24 10:46 | 
 |  |  |  * @LastEditTime 2024-05-24 10:46 | 
 |  |  |  * @Description | 
 |  |  |  */ | 
 |  |  |  | 
 |  |  | import com.alibaba.fastjson2.JSONObject; | 
 |  |  | import com.alibaba.fastjson2.annotation.JSONField; | 
 |  |  | import com.alibaba.fastjson2.writer.ObjectWriterImplToString; | 
 |  |  | import com.baomidou.mybatisplus.annotation.IdType; | 
 |  |  | import com.baomidou.mybatisplus.annotation.TableField; | 
 |  |  | import com.baomidou.mybatisplus.annotation.TableId; | 
 |  |  | import com.baomidou.mybatisplus.annotation.TableName; | 
 |  |  | import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler; | 
 |  |  | import com.dy.common.po.BaseEntity; | 
 |  |  | import com.fasterxml.jackson.annotation.JsonFormat; | 
 |  |  | import jakarta.validation.constraints.NotBlank; | 
 |  |  | import jakarta.validation.constraints.NotNull; | 
 |  |  | import lombok.*; | 
 |  |  |  | 
 |  |  | import java.util.Date; | 
 |  |  |  | 
 |  |  | /** | 
 |  |  |  * 命令日志表 | 
 |  |  |  */ | 
 |  |  | @TableName(value = "rm_command_history", autoResultMap = true) | 
 |  |  | @Data | 
 |  |  | @Builder | 
 |  |  | @ToString | 
 |  |  | @NoArgsConstructor | 
 |  |  | @AllArgsConstructor | 
 |  |  | public class RmCommandHistory implements BaseEntity { | 
 |  |  |     public static final long serialVersionUID = 202401151517005L; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 主键 | 
 |  |  |      */ | 
 |  |  |     @JSONField(serializeUsing = ObjectWriterImplToString.class) | 
 |  |  |     @TableId(type = IdType.INPUT) | 
 |  |  |     private Long comId; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 功能码 | 
 |  |  |      */ | 
 |  |  |     @JSONField(serializeUsing = ObjectWriterImplToString.class) | 
 |  |  |     @NotBlank(message = "功能码不能为空") | 
 |  |  |     private String commandCode; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 操作内容 | 
 |  |  |      */ | 
 |  |  |     private String commandName; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 取水口ID | 
 |  |  |      */ | 
 |  |  |     @JSONField(serializeUsing= ObjectWriterImplToString.class) | 
 |  |  |     @NotNull(message = "取水口ID不能为空") | 
 |  |  |     private Long intakeId; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 阀控器地址 | 
 |  |  |      */ | 
 |  |  |     @NotBlank(message = "阀控器地址不能为空") | 
 |  |  |     private String rtuAddr; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 通讯协议 | 
 |  |  |      */ | 
 |  |  |     @NotBlank(message = "通讯协议不能为空") | 
 |  |  |     private String protocol; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 参数数据 | 
 |  |  |      */ | 
 |  |  |     @TableField(typeHandler = JacksonTypeHandler.class) | 
 |  |  |     private JSONObject param; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 发送命令时间 | 
 |  |  |      */ | 
 |  |  |     @NotNull(message = "发送命令时间不能为空") | 
 |  |  |     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | 
 |  |  |     private Date sendTime; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 操作人 | 
 |  |  |      */ | 
 |  |  |     @JSONField(serializeUsing = ObjectWriterImplToString.class) | 
 |  |  |     @NotNull(message = "操作人不能为空") | 
 |  |  |     private Long operator; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 命令结果;0-失败,1-成功 | 
 |  |  |      */ | 
 |  |  |  | 
 |  |  |     private Byte result; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 收到命令结果时间 | 
 |  |  |      */ | 
 |  |  |     private Date resultTime; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 命令结果内容 | 
 |  |  |      */ | 
 |  |  |     private String resultText; | 
 |  |  |  | 
 |  |  | } |