+enum InventoryType {
+ HELM
+ R_SHOULDER
+ L_SHOULDER
+ TORSO
+ R_ARM
+ L_ARM
+ BOTH_ARMS
+ LEGS
+ L_FOOT
+ R_FOOT
+ WEAPON
+ SHIELD
+ ARMOUR
+}
+
+enum Rarity {
+ COMMON
+ UNCOMMON
+ RARE
+}
+
+model Item {
+ id String @id @default(uuid()) @db.Uuid
+ name String @unique
+ type InventoryType[]
+ durability Int @default(0)
+ minLevelDrop Int @default(1)
+ rarityDropRates Json
+ statModifiers Json
+ instances Inventory[] // a list of all inventories of a particular item
+ lootTable LootTable[]
+ worldDrops WorldDrop[] // a list of all active world drops
+}
+
+model WorldDrop {
+ id String @id @default(uuid()) @db.Uuid
+ baseItem Item @relation(fields: [itemId], references: [id])
+ itemId String @db.Uuid
+ dropDate DateTime @default(now())
+ droppedBy Player @relation(fields: [droppedById], references: [id])
+ droppedById String @db.Uuid
+}
+
+model Inventory {
+ id String @id @default(uuid()) @db.Uuid
+ player Player @relation(fields: [playerId], references: [id])
+ playerId String @db.Uuid
+ baseItem Item @relation(fields: [itemId], references: [id])
+ itemId String @db.Uuid
+ discovered Boolean @default(false)
+ usesUntilDiscovery Int @default(40)
+ maxDurability Int @default(1) // this is set to 1 to handle things like potions
+ currentDurability Int @default(1)
+ rarity Rarity
+ type InventoryType[]
+ statModifiers Json
+ stackable Boolean @default(false) // if an item is "stackable" then the durability is the total number of items in that stack
+}
+