Изменение домена с rosetta-im.com на rosetta.im
This commit is contained in:
82
src/main/java/im/rosetta/database/entity/Device.java
Normal file
82
src/main/java/im/rosetta/database/entity/Device.java
Normal file
@@ -0,0 +1,82 @@
|
||||
package im.rosetta.database.entity;
|
||||
|
||||
import im.rosetta.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.Index;
|
||||
import jakarta.persistence.Table;
|
||||
|
||||
@Entity
|
||||
@Table(name = "devices", indexes = {
|
||||
@Index(name = "idx_public_key", columnList = "publicKey, deviceId", unique = true)
|
||||
})
|
||||
|
||||
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, columnDefinition = "bigint default 0")
|
||||
private Long leaveTime;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user