#245 & #254: Started working on character hair sprite management & character customisation

This commit is contained in:
2024-11-21 02:58:25 +01:00
parent 40c7f6289a
commit 4a62bbb118
6 changed files with 65 additions and 40 deletions

View File

@ -1,3 +1,16 @@
enum CharacterGender {
MALE
FEMALE
}
enum CharacterRace {
HUMAN
ELF
DWARF
ORC
GOBLIN
}
model User {
id Int @id @default(autoincrement())
username String @unique
@ -16,19 +29,6 @@ model PasswordResetToken {
createdAt DateTime @default(now())
}
enum CharacterGender {
MALE
FEMALE
}
enum CharacterRace {
HUMAN
ELF
DWARF
ORC
GOBLIN
}
model CharacterType {
id Int @id @default(autoincrement())
name String
@ -42,6 +42,15 @@ model CharacterType {
updatedAt DateTime @updatedAt
}
model CharacterHair {
id Int @id @default(autoincrement())
name String
sprite Sprite? @relation(fields: [spriteId], references: [id], onDelete: Cascade)
spriteId String?
characters Character[]
// @TODO: Do we need addedAt and updatedAt?
}
model Character {
id Int @id @default(autoincrement())
userId Int
@ -61,6 +70,8 @@ model Character {
zone Zone @relation(fields: [zoneId], references: [id], onDelete: Cascade)
characterTypeId Int?
characterType CharacterType? @relation(fields: [characterTypeId], references: [id], onDelete: Cascade)
hairId Int?
hair CharacterHair? @relation(fields: [hairId], references: [id], onDelete: Cascade)
chats Chat[]
items CharacterItem[]
}