Обновление ECI, репозитории, девайсы

This commit is contained in:
RoyceDa
2026-02-03 02:28:46 +02:00
parent c22d2de4be
commit 4c290a01ac
19 changed files with 513 additions and 359 deletions

View File

@@ -0,0 +1,84 @@
package com.rosetta.im.database.entity;
import com.rosetta.im.database.CreateUpdateEntity;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.PrePersist;
import jakarta.persistence.Table;
@Entity
@Table(name = "devices")
public class Device extends CreateUpdateEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@Column(name = "publicKey", nullable = false)
private String publicKey;
@Column(name = "deviceId", nullable = false)
private String deviceId;
@Column(name = "deviceName", nullable = false)
private String deviceName;
@Column(name = "deviceOs", nullable = false)
private String deviceOs;
/**
* Время завершения сессии устройства
*/
@Column(name = "leaveTime", nullable = true)
private Long leaveTime;
@PrePersist
protected void onCreate() {
this.leaveTime = 0L;
}
public Long getId() {
return id;
}
public String getPublicKey() {
return publicKey;
}
public String getDeviceId() {
return deviceId;
}
public String getDeviceName() {
return deviceName;
}
public String getDeviceOs() {
return deviceOs;
}
public Long getLeaveTime() {
return leaveTime;
}
public void setLeaveTime(Long leaveTime) {
this.leaveTime = leaveTime;
}
public void setPublicKey(String publicKey) {
this.publicKey = publicKey;
}
public void setDeviceId(String deviceId) {
this.deviceId = deviceId;
}
public void setDeviceName(String deviceName) {
this.deviceName = deviceName;
}
public void setDeviceOs(String deviceOs) {
this.deviceOs = deviceOs;
}
}