Improved table names
This commit is contained in:
parent
a525d80530
commit
3f10b03d24
@ -42,16 +42,16 @@ model SpriteAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
model Item {
|
model Item {
|
||||||
id String @id @default(uuid())
|
id String @id @default(uuid())
|
||||||
name String
|
name String
|
||||||
description String?
|
description String?
|
||||||
itemType ItemType
|
itemType ItemType
|
||||||
stackable Boolean @default(false)
|
stackable Boolean @default(false)
|
||||||
rarity ItemRarity @default(COMMON)
|
rarity ItemRarity @default(COMMON)
|
||||||
createdAt DateTime @default(now())
|
createdAt DateTime @default(now())
|
||||||
updatedAt DateTime @updatedAt
|
updatedAt DateTime @updatedAt
|
||||||
characters CharacterItem[]
|
characters CharacterItem[]
|
||||||
equipment EquippedCharacterItem[]
|
equipment CharacterEquipment[]
|
||||||
}
|
}
|
||||||
|
|
||||||
enum ItemType {
|
enum ItemType {
|
||||||
|
@ -76,7 +76,7 @@ model Character {
|
|||||||
|
|
||||||
// Inventory
|
// Inventory
|
||||||
items CharacterItem[]
|
items CharacterItem[]
|
||||||
equipment EquippedCharacterItem[]
|
equipment CharacterEquipment[]
|
||||||
|
|
||||||
// Stats
|
// Stats
|
||||||
alignment Int @default(50)
|
alignment Int @default(50)
|
||||||
@ -99,17 +99,17 @@ model CharacterItem {
|
|||||||
quantity Int
|
quantity Int
|
||||||
}
|
}
|
||||||
|
|
||||||
model EquippedCharacterItem {
|
model CharacterEquipment {
|
||||||
id Int @id @default(autoincrement())
|
id Int @id @default(autoincrement())
|
||||||
characterId Int
|
characterId Int
|
||||||
character Character @relation(fields: [characterId], references: [id], onDelete: Cascade)
|
character Character @relation(fields: [characterId], references: [id], onDelete: Cascade)
|
||||||
itemId String
|
itemId String
|
||||||
item Item @relation(fields: [itemId], references: [id], onDelete: Cascade)
|
item Item @relation(fields: [itemId], references: [id], onDelete: Cascade)
|
||||||
quantity Int
|
quantity Int
|
||||||
slot EquippedCharacterItemSlotType
|
slot CharacterEquipmentSlotType
|
||||||
}
|
}
|
||||||
|
|
||||||
enum EquippedCharacterItemSlotType {
|
enum CharacterEquipmentSlotType {
|
||||||
HEAD
|
HEAD
|
||||||
BODY
|
BODY
|
||||||
ARMS
|
ARMS
|
||||||
|
Loading…
x
Reference in New Issue
Block a user