1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
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 ;
    }
 
}