forked from noxious/server
77 lines
1.9 KiB
Plaintext
77 lines
1.9 KiB
Plaintext
model World {
|
|
date DateTime @unique @default(now())
|
|
isRainEnabled Boolean @default(false)
|
|
rainPercentage Int @default(0)
|
|
isFogEnabled Boolean @default(false)
|
|
fogDensity Int @default(0)
|
|
}
|
|
|
|
model Chat {
|
|
id Int @id @default(autoincrement())
|
|
characterId Int
|
|
character Character @relation(fields: [characterId], references: [id], onDelete: Cascade)
|
|
zoneId Int
|
|
zone Zone @relation(fields: [zoneId], references: [id], onDelete: Cascade)
|
|
message String
|
|
createdAt DateTime @default(now())
|
|
}
|
|
|
|
model Sprite {
|
|
id String @id @default(uuid())
|
|
name String
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
spriteActions SpriteAction[]
|
|
characterTypes CharacterType[]
|
|
characterHairs CharacterHair[]
|
|
Item Item[]
|
|
}
|
|
|
|
model SpriteAction {
|
|
id String @id @default(uuid())
|
|
spriteId String
|
|
sprite Sprite @relation(fields: [spriteId], references: [id], onDelete: Cascade)
|
|
action String
|
|
sprites Json?
|
|
originX Decimal @default(0)
|
|
originY Decimal @default(0)
|
|
isAnimated Boolean @default(false)
|
|
isLooping Boolean @default(false)
|
|
frameWidth Int @default(0)
|
|
frameHeight Int @default(0)
|
|
frameRate Int @default(0)
|
|
}
|
|
|
|
model Item {
|
|
id String @id @default(uuid())
|
|
name String
|
|
description String?
|
|
itemType ItemType
|
|
stackable Boolean @default(false)
|
|
rarity ItemRarity @default(COMMON)
|
|
spriteId String?
|
|
sprite Sprite? @relation(fields: [spriteId], references: [id], onDelete: Cascade)
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
characters CharacterItem[]
|
|
}
|
|
|
|
enum ItemType {
|
|
WEAPON
|
|
HELMET
|
|
CHEST
|
|
LEGS
|
|
BOOTS
|
|
GLOVES
|
|
RING
|
|
NECKLACE
|
|
}
|
|
|
|
enum ItemRarity {
|
|
COMMON
|
|
UNCOMMON
|
|
RARE
|
|
EPIC
|
|
LEGENDARY
|
|
}
|