Moved models to simplify and improve prisma schemas , added logic to update characterTypes
This commit is contained in:
@ -5,3 +5,37 @@ model World {
|
||||
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[]
|
||||
}
|
||||
|
||||
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)
|
||||
frameSpeed Int @default(0)
|
||||
}
|
||||
|
Reference in New Issue
Block a user