liurunyu
5 天以前 e8937f27fce194d015ce6c27d286e7fc89f5e580
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
package com.dy.pipIrrGlobal.pojoUg;
 
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 com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import org.hibernate.validator.constraints.Length;
 
import java.util.Date;
 
/**
 * @Author: liurunyu
 * @Date: 2024/11/5 9:09
 * @Description
 */
@TableName(value="ug_rtu_task", autoResultMap = true)
@Data
@Builder
@ToString
@NoArgsConstructor
@AllArgsConstructor
@Schema(name = "RTU远程升级任务")
public class UgRtuTask implements BaseEntity {
 
    public static final long serialVersionUID = 202411050926001L;
    /**
     * 主键
     */
    @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED)
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    @TableId(type = IdType.INPUT)
    public Long id;
 
    /**
    * 外键,指向升级程序
    */
    @Schema(description = "外键,指向升级程序", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    public Long programId;
 
    /**
    * 创建人
    */
    @Schema(description = "创建人", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @Length(message = "备注不大于{max}字,不小于{min}字", min = 1, max = 50)
    public String creator;
 
    /**
    * 备注
    */
    @Schema(description = "备注", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @Length(message = "备注不大于{max}字,不小于{min}字", min = 1, max = 100)
    public String remark;
 
    /**
    * 创建时间
    */
    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:SS")
    public Date dt;
 
    /**
    * 是否执行(1是,0否)
    */
    @Schema(description = "是否执行(1是,0否)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Byte isExecute;
 
    /**
    * 是否执行
    */
    @Schema(description = "是否执行", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public String isExecuteStr;
 
    /**
    * 是否结束(1是,0否)
    */
    @Schema(description = "是否结束(1是,0否)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Byte isOver;
 
    /**
    * 是否结束
    */
    @Schema(description = "是否结束", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public String isOverStr;
 
    /**
     * 删除标识
     */
    @Schema(hidden=true)
    @JSONField(serialize=false)
    public Byte deleted;
 
    public void init(){
        this.dt = new Date();
        this.isExecute = 0 ;
        this.isOver = 0 ;
        this.deleted = 0 ;
    }
 
}