-
Notifications
You must be signed in to change notification settings - Fork 0
Database Spec
Ghom edited this page Nov 30, 2020
·
4 revisions
Using PostgreSQL, some elements are recursives and identifiants are auto generated uuid v4.
- fat: 2048
- big: 1024
- medium: 64
- little: 16
- tiny: 8
uuid_generate_v4()
Message sent in channel (real markdown allowed)
- id uuid (auto generated)
- parent ref: message or null
- content String (fat)
- author ref: user or bot
- channel ref: mhannel
- guild ref: guild
- created_at Datetime
A grid
- id uuid (auto generated)
- message ref: message
- rows Integer default: 1
- cols Integer default: 1
- width Integer # pixel width of full grid
- height Integer # pixel height of full grid
A component to place on embed grid
- embed ref: embed
- content String or null (big) # URL for image, gif or video, text for content
- rows Integer default: 1
- cols Integer default: 1
- x Integer
- y Integer
Channel in guild
- id uuid (auto generated)
- parent ref: channel or null
- name String (medium)
- guild ref: guild
- position Integer
- network ref: network
- created_at Datetime
Link between channels of different guilds
- id uuid (auto generated)
- name String (medium)
- password String (medium)
- icon String (medium)
- description (fat)
- owner ref: user or bot
- created_at Datetime
Guild like Discord Guilds
- id uuid (auto generated)
- name String (medium)
- icon String (big)
- owner ref: user or bot
- hash String (medium) # code présent dans l'URL d'invitation
- created_at Datetime
User account
- id uuid (auto generated)
- token String (big)
- bot FALSE
- username String (medium)
- password String (medium)
- created_at Datetime
Bot account (created by an user)
- id uuid (auto generated)
- token String (big)
- bot TRUE
- owner ref: user
- created_at Datetime
Member of a guild
- id uuid (auto generated)
- guild ref: guild
- user ref: user or bot
- nickname String (medium)
- created_at Datetime
Role of a member
- id uuid (auto generated)
- parent ref: role or null
- name String (medium)
- user ref: user or bot
- guild ref: guild
- color: String (little)
- created_at Datetime
Client position of a guild for an user
- guild ref: guild
- user ref: user
- position Integer