Improved table names
This commit is contained in:
parent
a525d80530
commit
3f10b03d24
@ -51,7 +51,7 @@ model Item {
|
|||||||
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