154 lines
2.5 KiB
Java
154 lines
2.5 KiB
Java
package com.cym.model;
|
|
|
|
import java.io.Serializable;
|
|
|
|
import com.cym.bean.CreateTime;
|
|
import com.cym.bean.InitValue;
|
|
|
|
import io.swagger.v3.oas.annotations.media.Schema;
|
|
import jakarta.persistence.Column;
|
|
import jakarta.persistence.Entity;
|
|
import jakarta.persistence.Id;
|
|
|
|
@Schema(description = "管理员")
|
|
@Entity
|
|
public class Admin implements Serializable {
|
|
|
|
private static final long serialVersionUID = -4917355177911155544L;
|
|
|
|
@Id
|
|
String id;
|
|
|
|
@Schema(description = "用户名")
|
|
@Column(unique = true)
|
|
String name;
|
|
|
|
@Schema(description = "密码")
|
|
String pass;
|
|
|
|
@Schema(description = "电话")
|
|
String phone;
|
|
@Schema(description = "邮箱")
|
|
String email;
|
|
|
|
@Schema(description = "自动登录key")
|
|
String autoKey;
|
|
|
|
@CreateTime
|
|
Long createTime;
|
|
|
|
@InitValue("0")
|
|
@Schema(description = "类型 0:普通管理员 1:超级管理员")
|
|
Integer type;
|
|
|
|
@Schema(description = "tg对话id")
|
|
String chatId;
|
|
|
|
@Schema(description = "api token")
|
|
String token;
|
|
|
|
@Schema(description = "token有效期")
|
|
Long tokenExpiresTime;
|
|
|
|
public String getToken() {
|
|
return token;
|
|
}
|
|
|
|
public void setToken(String token) {
|
|
this.token = token;
|
|
}
|
|
|
|
public Long getTokenExpiresTime() {
|
|
return tokenExpiresTime;
|
|
}
|
|
|
|
public void setTokenExpiresTime(Long tokenExpiresTime) {
|
|
this.tokenExpiresTime = tokenExpiresTime;
|
|
}
|
|
|
|
public String getChatId() {
|
|
return chatId;
|
|
}
|
|
|
|
public void setChatId(String chatId) {
|
|
this.chatId = chatId;
|
|
}
|
|
|
|
public Integer getType() {
|
|
return type;
|
|
}
|
|
|
|
public void setType(Integer type) {
|
|
this.type = type;
|
|
}
|
|
|
|
public Long getCreateTime() {
|
|
return createTime;
|
|
}
|
|
|
|
public void setCreateTime(Long createTime) {
|
|
this.createTime = createTime;
|
|
}
|
|
|
|
public String getPhone() {
|
|
return phone;
|
|
}
|
|
|
|
public void setPhone(String phone) {
|
|
this.phone = phone;
|
|
}
|
|
|
|
public static long getSerialversionuid() {
|
|
return serialVersionUID;
|
|
}
|
|
|
|
// public Integer getType() {
|
|
// return type;
|
|
// }
|
|
//
|
|
// public void setType(Integer type) {
|
|
// this.type = type;
|
|
// }
|
|
|
|
public String getAutoKey() {
|
|
return autoKey;
|
|
}
|
|
|
|
public void setAutoKey(String autoKey) {
|
|
this.autoKey = autoKey;
|
|
}
|
|
|
|
public String getEmail() {
|
|
return email;
|
|
}
|
|
|
|
public void setEmail(String email) {
|
|
this.email = email;
|
|
}
|
|
|
|
public String getId() {
|
|
return id;
|
|
}
|
|
|
|
public void setId(String id) {
|
|
this.id = id;
|
|
}
|
|
|
|
public String getName() {
|
|
return name;
|
|
}
|
|
|
|
public void setName(String name) {
|
|
this.name = name;
|
|
}
|
|
|
|
public String getPass() {
|
|
return pass;
|
|
}
|
|
|
|
public void setPass(String pass) {
|
|
this.pass = pass;
|
|
}
|
|
|
|
}
|