huang
2025-11-20 366ba040d2447bacd3455299425e3166f1f992bb
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
package com.mes.device.entity;
 
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
 
import java.util.Date;
 
/**
 * 设备组配置实体类
 * 对应数据库表:device_group_config
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("device_group_config")
@ApiModel(value = "DeviceGroupConfig", description = "设备组配置信息")
public class DeviceGroupConfig {
 
    @ApiModelProperty(value = "设备组ID", example = "1")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
 
    @ApiModelProperty(value = "设备组名称", example = "生产线A")
    @TableField("group_name")
    private String groupName;
 
    @ApiModelProperty(value = "设备组编号", example = "GROUP_001")
    @TableField("group_code")
    private String groupCode;
 
    @ApiModelProperty(value = "设备组类型:1-生产线,2-测试线,3-辅助设备组", example = "1")
    @TableField("group_type")
    private Integer groupType;
 
    @ApiModelProperty(value = "所属项目ID", example = "1")
    @TableField("project_id")
    private Long projectId;
 
    @ApiModelProperty(value = "设备组状态:0-停用,1-启用,3-维护中", example = "1")
    @TableField("status")
    private Integer status;
 
    @ApiModelProperty(value = "最大并发设备数", example = "3")
    @TableField("max_concurrent_devices")
    private Integer maxConcurrentDevices;
 
    @ApiModelProperty(value = "心跳检测间隔(秒)", example = "30")
    @TableField("heartbeat_interval")
    private Integer heartbeatInterval;
 
    @ApiModelProperty(value = "通信超时时间(毫秒)", example = "5000")
    @TableField("communication_timeout")
    private Integer communicationTimeout;
 
    @ApiModelProperty(value = "设备组描述", example = "生产线A设备组")
    @TableField("description")
    private String description;
 
    @ApiModelProperty(value = "扩展配置JSON", example = "{\"retryTimes\": 3, \"batchSize\": 100}")
    @TableField("extra_config")
    private String extraConfig;
 
    @ApiModelProperty(value = "创建时间")
    @TableField(value = "created_time", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createdTime;
 
    @ApiModelProperty(value = "更新时间")
    @TableField(value = "updated_time", fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updatedTime;
 
    @ApiModelProperty(value = "创建人", example = "system")
    @TableField(value = "created_by", fill = FieldFill.INSERT)
    private String createdBy;
 
    @ApiModelProperty(value = "更新人", example = "system")
    @TableField(value = "updated_by", fill = FieldFill.INSERT_UPDATE)
    private String updatedBy;
 
    @ApiModelProperty(value = "是否删除:0-否,1-是", example = "0")
    @TableField("is_deleted")
    @TableLogic
    private Integer isDeleted;
 
    // 设备组类型枚举
    public static final class GroupType {
        public static final int PRODUCTION_LINE = 1;  // 生产线
        public static final int TEST_LINE = 2;        // 测试线
        public static final int AUXILIARY_GROUP = 3;  // 辅助设备组
    }
 
    // 设备组状态枚举
    public static final class Status {
        public static final int DISABLED = 0;        // 停用
        public static final int ENABLED = 1;         // 启用
        public static final int MAINTENANCE = 2;     // 维护中
    }
}