1
0
forked from noxious/server

(WIP) Added pw reset token row, added checks to reset function

This commit is contained in:
2024-10-29 22:49:21 +01:00
parent 5a36d10f0e
commit a4e96f9ede
7 changed files with 73 additions and 16 deletions

View File

@ -1,10 +1,19 @@
model User {
id Int @id @default(autoincrement())
username String @unique
email String @unique
password String
online Boolean @default(false)
characters Character[]
id Int @id @default(autoincrement())
username String @unique
email String @unique
password String
online Boolean @default(false)
characters Character[]
passwordResetTokens PasswordResetToken[]
}
model PasswordResetToken {
id Int @id @default(autoincrement())
userId Int
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
token String @unique
createdAt DateTime @default(now())
}
enum CharacterGender {
@ -62,4 +71,4 @@ model CharacterItem {
itemId String
item Item @relation(fields: [itemId], references: [id], onDelete: Cascade)
quantity Int
}
}