From 920f8b18c01c0b13a7538e09951ff476e0b7f37a Mon Sep 17 00:00:00 2001 From: Kayne Ruse Date: Wed, 4 Sep 2013 17:19:35 +1000 Subject: [PATCH] Working on the initial database layout --- database template.md | 66 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 database template.md diff --git a/database template.md b/database template.md new file mode 100644 index 0000000..0d82279 --- /dev/null +++ b/database template.md @@ -0,0 +1,66 @@ +## Server + +#### UserAccount +* userAccountID primary key +* username unique +* password --stored in the database (hashed)? +* blacklisted {false, true} +* whitelisted {true, false} + +## Items + +#### Notes +* These are static; they're immutable during runtime + +#### ItemList +* itemListID primary key +* itemName unique +* itemImage +* type {mundane, consumable, equipment, etc.} +* stackable {1-max; -1 for false} +* maxUniqueCopies {1-max; -1 for unlimited} + +#### MundaneItemList +* itemListID foreign key -> ItemList.itemListID +* TODO: attributes + +#### ConsumableItemList +* itemListID foreign key -> ItemList.itemListID +* TODO: attributes + +#### EquipmentItemList +* itemListID foreign key -> ItemList.itemListID +* TODO: attributes + +## Player + +#### Notes +* These change as the character progresses and grows + +#### PlayerCharacter +* playerCharacterID primary key +* characterName unique +* TODO: customizable sprite + +#### PlayerStatistics +* playerCharacterID foreign key -> PlayerCharacter.playerCharacterID +* currentLevel +* currentExperience +* maxHealth +* maxMana +* currentHealth +* currentMana +* attack +* defence +* TODO: etc. + +#### PlayerEquipment +* playerCharacterID foreign key -> PlayerCharacter.playerCharacterID +* head foreign key -> ItemList.itemListID +* weapon foreign key -> ItemList.itemListID +* armour foreign key -> ItemList.itemListID +* TODO: etc. + +#### PlayerInventoryItem +* playerCharacterID foreign key -> PlayerCharacter.playerCharacterID +* itemListID foreign key -> ItemList.itemListID