feat: add whitelist register mode

This commit is contained in:
Tim
2025-07-14 21:32:07 +08:00
parent c9c96edcb0
commit 609156f4e5
21 changed files with 161 additions and 36 deletions

View File

@@ -45,6 +45,9 @@ public class Notification {
@Column(name = "reaction_type")
private ReactionType reactionType;
@Column(length = 1000)
private String content;
@Column
private Boolean approved;

View File

@@ -27,5 +27,7 @@ public enum NotificationType {
/** Someone unfollowed you */
USER_UNFOLLOWED,
/** A user you subscribe to created a post or comment */
USER_ACTIVITY
USER_ACTIVITY,
/** A user requested registration approval */
REGISTER_REQUEST
}

View File

@@ -0,0 +1,9 @@
package com.openisle.model;
/**
* Application-wide user registration mode.
*/
public enum RegisterMode {
DIRECT,
WHITELIST
}

View File

@@ -42,6 +42,12 @@ public class User {
@Column(length = 1000)
private String introduction;
@Column(length = 1000)
private String registerReason;
@Column(nullable = false)
private boolean approved = true;
@Enumerated(EnumType.STRING)
@Column(nullable = false)
private Role role = Role.USER;