added an idea of how to do the database schema. for #2

devel
Rachel Fae Fox (foxiepaws) 2019-07-19 03:59:16 -04:00
parent b6b1119a40
commit dc9a14f591
1 changed files with 46 additions and 0 deletions

46
docs/design/database.org Normal file
View File

@ -0,0 +1,46 @@
#+TITLE: Database Schemas
* User
- id
- username :: String
- email :: String
- password :: encrypted_and_hashsalted_string
- salt :: salt
- perms :: Enum/Integer
- bio :: Text
- avatar :: references: upload
* Issue
- id
- title
- description :: Text
- cover :: references: upload
- author :: references: user
- cw :: Text
- mature :: integer (Flags) or enum
- release_date :: timestamp
- added :: timestamp
- available :: boolean
- options :: json?
* Page
- id
- issue :: references: issue
- page_num :: integer
- spread :: boolean
- title :: String
- upload :: references: upload
- caption :: Text
- cw :: Text
- mature :: integer (flags) or an enum
- added :: timestamp
- release_date :: timestamp
- author :: references: user
* Upload
- id
- file :: Filepath
- uploaded :: timestamp
- locked? :: boolean
- author :: references: user
- deleted :: boolean
- modified :: timestamp
- deleted_date :: timestamp