feat: user related logic refactor
This commit is contained in:
@@ -4,9 +4,11 @@ package xin.merlin.myplayerbackend.entity;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@TableName("account")
|
||||
@NoArgsConstructor
|
||||
public class Account {
|
||||
@TableId("id")
|
||||
private Integer id;
|
||||
@@ -14,4 +16,13 @@ public class Account {
|
||||
private String account;
|
||||
private String password;
|
||||
private String ip;
|
||||
// 1 user; 0 admin
|
||||
private Integer character;
|
||||
|
||||
public Account(String account, String password, String ip, Integer character) {
|
||||
this.account = account;
|
||||
this.password = password;
|
||||
this.ip = ip;
|
||||
this.character = character;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,16 +3,27 @@ package xin.merlin.myplayerbackend.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@TableName("audit")
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class Audit {
|
||||
@TableId("a_id")
|
||||
private Integer a_id;
|
||||
|
||||
// 约定:type == 0 已通过审核, 1 用户头像待审核, 2 群聊头像待审核, 3 playroom头像待审核, 4 修改邮箱请求, 5 已经通过验证的邮箱修改请求, 6 已过期的审核请求
|
||||
private Integer type;
|
||||
private Integer applicant;
|
||||
private Integer influence;
|
||||
private String changed;
|
||||
|
||||
public Audit(Integer type,Integer applicant,Integer influence,String changed) {
|
||||
this.type = type;
|
||||
this.applicant = applicant;
|
||||
this.influence = influence;
|
||||
this.changed = changed;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@ import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@TableName("group")
|
||||
public class Group {
|
||||
@TableName("groupinfo")
|
||||
public class GroupInfo {
|
||||
@TableId("g_id")
|
||||
private Integer g_id;
|
||||
|
||||
@@ -5,8 +5,8 @@ import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@TableName("playroom")
|
||||
public class Playroom {
|
||||
@TableName("playroominfo")
|
||||
public class PlayroomInfo {
|
||||
@TableId("r_id")
|
||||
private Integer r_id;
|
||||
|
||||
@@ -5,8 +5,8 @@ import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@TableName("user")
|
||||
public class User {
|
||||
@TableName("userinfo")
|
||||
public class UserInfo {
|
||||
@TableId("u_id")
|
||||
private String u_id;
|
||||
|
||||
@@ -7,5 +7,5 @@ public class Code {
|
||||
private String account;
|
||||
private String c_id;
|
||||
private String code;
|
||||
|
||||
private String password;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user