Mercurial > malikania
changeset 100:0e9c01d3e0d1
Misc: write database specs, closes #682
author | David Demelier <markand@malikania.fr> |
---|---|
date | Mon, 21 Aug 2017 07:39:41 +0200 |
parents | 0addfab87b17 |
children | 51dd7a4914ec |
files | docs/CMakeLists.txt docs/specs/db/account.md docs/specs/db/character.md docs/specs/db/spell.md |
diffstat | 4 files changed, 72 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/docs/CMakeLists.txt Fri Aug 18 18:45:07 2017 +0200 +++ b/docs/CMakeLists.txt Mon Aug 21 07:39:41 2017 +0200 @@ -28,6 +28,9 @@ ALL COMMENT "Generating documentation" SOURCES + ${docs_SOURCE_DIR}/specs/db/account.md + ${docs_SOURCE_DIR}/specs/db/character.md + ${docs_SOURCE_DIR}/specs/db/spell.md ${docs_SOURCE_DIR}/specs/size.md ${docs_SOURCE_DIR}/specs/sprite.md ${docs_SOURCE_DIR}/specs/tileset.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/specs/db/account.md Mon Aug 21 07:39:41 2017 +0200 @@ -0,0 +1,27 @@ +# Account + +The account object defines a unique login on the server side. + +## Table recommandation + +| field | type | +|---------------|---------------------------| +| id | big integer (primary key) | +| login | string not null | +| email | string not null | +| firstname | string not null | +| lastname | string | +| createdate | date (default to now) | + +## Associations + +````nohighlight ++---------------+ 0..* +---------------+ +| account +-----+------+ character | ++---------------+ | +---------------+ + | + | + | 0..* +---------------+ + +------+ connect_log + + +---------------+ +````
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/specs/db/character.md Mon Aug 21 07:39:41 2017 +0200 @@ -0,0 +1,25 @@ +# Character + +A character is a playable entity that is owned by an `account`. + +## Table recommandation + +| field | type | +|---------------|---------------------------| +| id | big integer (primary key) | +| account_id | big integer | +| level | short uint | +| hp | short uint | + + - **id**: unique idenfitier, + - **account_id**: references account.id, + - **level**: current character level, + - **hp**: current heal points. + +## Associations + +````nohighlight ++---------------+ 0..* +---------------+ +| character +------------+ spell | ++---------------+ +---------------+ +````
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/specs/db/spell.md Mon Aug 21 07:39:41 2017 +0200 @@ -0,0 +1,17 @@ +# Spell + +Each `character` have a series of spell that is customized by the user. + +## Table recommandation + +| field | type | +|---------------|---------------------------| +| id | big integer (primary key) | +| character_id | big integer | +| level | short int | +| name | string | + + - **id**: unique idenfitier, + - **character_id**: references character.id, + - **level**: spell level, + - **name**: name of spell, to instanciate in the game.