Rework login, get account from PG

This commit is contained in:
P0nk
2024-09-27 22:52:12 +02:00
parent 082e0c0486
commit 5abae50be5
8 changed files with 197 additions and 61 deletions

View File

@@ -4,11 +4,18 @@ import lombok.Builder;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Objects;
/**
* @author Ponk
*/
@Builder
public record Account(int id, String name, String password, boolean acceptedTos, byte gender, LocalDate birthdate,
String pin, String pic, int chrSlots, int loggedIn, LocalDateTime lastLogin, boolean banned) {
public record Account(int id, String name, String password, boolean acceptedTos, Byte gender, LocalDate birthdate,
String pin, String pic, byte chrSlots, byte loginState, LocalDateTime lastLogin, boolean banned,
LocalDateTime tempBanTimestamp) {
public Account {
Objects.requireNonNull(name);
Objects.requireNonNull(password);
Objects.requireNonNull(birthdate);
}
}