killapp/Assets/DeviceConfig.java

198 lines
5.2 KiB
Java
Raw Normal View History

2026-06-12 09:42:44 +08:00
package cn.breadtech.photon.device.entity;
import cn.breadtech.core.domain.BaseEntity;
import cn.breadtech.photon.device.enums.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import javax.persistence.*;
/**
* 设备配置实体
*/
@EqualsAndHashCode(callSuper = true)
@Data
@Entity
@Table(name = "t_device_config")
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
public class DeviceConfig extends BaseEntity {
@Column(name = "device_sn", unique = true, nullable = false)
private String deviceSn;
@Column(name = "language")
private Integer language;
// ===== 旧 JSON TEXT 列(废弃,不再读写) =====
@Deprecated
@Column(name = "lcd_config", columnDefinition = "TEXT")
private String lcdConfig;
@Deprecated
@Column(name = "fov_config", columnDefinition = "TEXT")
private String fovConfig;
@Deprecated
@Column(name = "scan_distance_config", columnDefinition = "TEXT")
private String scanDistanceConfig;
@Deprecated
@Column(name = "fill_light_config", columnDefinition = "TEXT")
private String fillLightConfig;
@Deprecated
@Column(name = "security_config", columnDefinition = "TEXT")
private String securityConfig;
@Deprecated
@Column(name = "sound_config", columnDefinition = "TEXT")
private String soundConfig;
@Deprecated
@Column(name = "recording_config", columnDefinition = "TEXT")
private String recordingConfig;
@Deprecated
@Column(name = "rgb_light_config", columnDefinition = "TEXT")
private String rgbLightConfig;
// ===== 新增强类型配置列 =====
/** 锁定状态 */
@Column(name = "is_locked")
private Boolean isLocked;
/** FOV角度单位0.1度范围1-900 */
@Column(name = "fov_angle")
private Integer fovAngle;
/** 检测距离单位0.1米) */
@Column(name = "detection_distance")
private Integer detectionDistance;
/** 瞄准距离单位0.1米) */
@Column(name = "aim_distance")
private Integer aimDistance;
/** 工作模式 */
@Enumerated(EnumType.STRING)
@Column(name = "work_mode", length = 20)
private WorkMode workMode;
/** 补光灯开关 */
@Column(name = "fill_light_enable")
private Boolean fillLightEnable;
/** 补光类型 */
@Enumerated(EnumType.STRING)
@Column(name = "fill_light_type", length = 20)
private FillLightType fillLightType;
/** 光照强度 */
@Enumerated(EnumType.STRING)
@Column(name = "fill_light_intensity", length = 20)
private LightIntensity fillLightIntensity;
/** 可见光激光器开关 */
@Column(name = "laser_visible_enable")
private Boolean laserVisibleEnable;
/** 视觉检测开关 */
@Column(name = "visual_detect_enable")
private Boolean visualDetectEnable;
/** 视觉检测灵敏度 */
@Enumerated(EnumType.STRING)
@Column(name = "visual_sensitivity", length = 20)
private SensitivityLevel visualSensitivity;
/** 毫米波雷达开关 */
@Column(name = "radar_enable")
private Boolean radarEnable;
/** 雷达灵敏度 */
@Enumerated(EnumType.STRING)
@Column(name = "radar_sensitivity", length = 20)
private SensitivityLevel radarSensitivity;
/** 安全距离单位0.1米范围1-100 */
@Column(name = "radar_safe_distance")
private Integer radarSafeDistance;
/** RGB指示灯开关 */
@Column(name = "rgb_enable")
private Boolean rgbEnable;
/** RGB红色分量0-255 */
@Column(name = "rgb_red")
private Byte rgbRed;
/** RGB绿色分量0-255 */
@Column(name = "rgb_green")
private Byte rgbGreen;
/** RGB蓝色分量0-255 */
@Column(name = "rgb_blue")
private Byte rgbBlue;
/** RGB效果模式 */
@Enumerated(EnumType.STRING)
@Column(name = "rgb_effect", length = 20)
private RGBEffectMode rgbEffect;
/** LCD自适应亮度开关 */
@Column(name = "lcd_auto_brightness")
private Boolean lcdAutoBrightness;
/** LCD亮度10-100% */
@Column(name = "lcd_brightness")
private Byte lcdBrightness;
/** LCD休眠开关 */
@Column(name = "lcd_sleep_enable")
private Boolean lcdSleepEnable;
/** LCD休眠时间编码1/5/10/30分钟 */
@Column(name = "lcd_sleep_time")
private Byte lcdSleepTime;
/** WIFI开关 */
@Column(name = "wifi_enable")
private Boolean wifiEnable;
/** WIFI SSID */
@Column(name = "wifi_ssid")
private String wifiSsid;
/** WIFI密码 */
@Column(name = "wifi_password")
private String wifiPassword;
/** 视频录制开关 */
@Column(name = "video_record_enable")
private Boolean videoRecordEnable;
/** 录制时长3/5/10秒 */
@Column(name = "record_duration")
private Byte recordDuration;
/** 音效开关 */
@Column(name = "sound_enable")
private Boolean soundEnable;
/** 音效类型 */
@Enumerated(EnumType.STRING)
@Column(name = "sound_type", length = 20)
private SoundEffectType soundType;
/** 音量0-15 */
@Column(name = "volume")
private Byte volume;
}