Изменение домена с rosetta-im.com на rosetta.im
This commit is contained in:
100
src/main/java/im/rosetta/database/entity/User.java
Normal file
100
src/main/java/im/rosetta/database/entity/User.java
Normal file
@@ -0,0 +1,100 @@
|
||||
package im.rosetta.database.entity;
|
||||
|
||||
import im.rosetta.database.CreateUpdateEntity;
|
||||
import im.rosetta.database.converters.StringListConverter;
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Convert;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.Index;
|
||||
import jakarta.persistence.Table;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Entity
|
||||
@Table(name = "users", indexes = {
|
||||
@Index(name = "idx_users_publickey", columnList = "publicKey", unique = true)
|
||||
})
|
||||
public class User extends CreateUpdateEntity {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
@Column(name = "username")
|
||||
private String username;
|
||||
|
||||
@Column(name = "title")
|
||||
private String title;
|
||||
|
||||
@Column(name = "verified", nullable = false)
|
||||
private int verified;
|
||||
|
||||
@Column(name = "privateKey", nullable = false)
|
||||
private String privateKey;
|
||||
|
||||
@Column(name = "publicKey", nullable = false, unique = true)
|
||||
private String publicKey;
|
||||
|
||||
@Convert(converter = StringListConverter.class)
|
||||
@Column(name = "notificationsTokens", nullable = false)
|
||||
private List<String> notificationsTokens = new ArrayList<>();
|
||||
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public String getPrivateKey() {
|
||||
return privateKey;
|
||||
}
|
||||
|
||||
public void setPrivateKey(String privateKey) {
|
||||
this.privateKey = privateKey;
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getPublicKey() {
|
||||
return publicKey;
|
||||
}
|
||||
|
||||
public void setPublicKey(String publicKey) {
|
||||
this.publicKey = publicKey;
|
||||
}
|
||||
|
||||
public int getVerified() {
|
||||
return verified;
|
||||
}
|
||||
|
||||
public void setVerified(int verified) {
|
||||
this.verified = verified;
|
||||
}
|
||||
|
||||
public List<String> getNotificationsTokens() {
|
||||
return notificationsTokens;
|
||||
}
|
||||
|
||||
public void setNotificationsTokens(List<String> notificationsTokens) {
|
||||
this.notificationsTokens = notificationsTokens;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user