New file |
| | |
| | | package com.dy.pipIrrGlobal.voUg; |
| | | |
| | | import com.alibaba.fastjson2.annotation.JSONField; |
| | | import com.alibaba.fastjson2.writer.ObjectWriterImplToString; |
| | | import com.dy.common.po.BaseEntity; |
| | | import com.dy.pipIrrGlobal.pojoUg.UgRtuProgram; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | import org.hibernate.validator.constraints.Length; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | /** |
| | | * @Author: liurunyu |
| | | * @Date: 2024/11/5 11:24 |
| | | * @Description |
| | | */ |
| | | @Data |
| | | @Schema(title = "RTU程序视图对象") |
| | | public class VoRtuProgram implements BaseEntity { |
| | | |
| | | private static final long serialVersionUID = 202411061126001L; |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | public Long id; |
| | | |
| | | |
| | | /** |
| | | * 升级程序存放地址(4字节,8位十六进制字符) |
| | | */ |
| | | @Schema(description = "升级程序存放地址", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | public String storeRamAddr; |
| | | |
| | | /** |
| | | * 程序覆盖起始地址(4字节,8位十六进制字符) |
| | | */ |
| | | @Schema(description = "程序覆盖起始地址", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | public String startRamAddr; |
| | | |
| | | /** |
| | | * 升级程序内容(程序文件内容字节数组) |
| | | */ |
| | | @Schema(description = "程序文件", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | public MultipartFile file; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @Schema(description = "备注", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Length(message = "备注不大于{max}字,不小于{min}字", min = 1, max = 100) |
| | | public String remark; |
| | | |
| | | public void toPo(UgRtuProgram po){ |
| | | po.storeRamAddr = this.storeRamAddr ; |
| | | po.startRamAddr = this.startRamAddr ; |
| | | po.remark = this.remark ; |
| | | } |
| | | |
| | | } |