Skip to content

Database Spec

Ghom edited this page Nov 30, 2020 · 4 revisions

Database Specs

Using PostgreSQL, some elements are recursives and identifiants are auto generated uuid v4.

Sizings

  • fat: 2048
  • big: 1024
  • medium: 64
  • little: 16
  • tiny: 8

Extensions

uuid_generate_v4()

Tables

interface [globals]

  • id uuid (auto generated)
  • created_at Datetime

message implements [globals]

Message sent in channel (real markdown allowed)

  • parent ref: message or null
  • content String (fat)
  • author ref: user
  • channel ref: mhannel
  • guild ref: guild

embed

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

embed_component

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 implements [globals]

Channel in guild

  • parent ref: channel or null
  • name String (medium)
  • guild ref: guild
  • position Integer
  • network ref: network

network implements [globals]

Link between channels of different guilds

  • name String (medium)
  • password String (medium)
  • icon String (medium)
  • description (fat)

guild implements [globals]

Guild like Discord Guilds

  • name String (medium)
  • icon String (big)
  • owner ref: user

user implements [globals]

User account

  • username String (medium)
  • password String (medium) ... user settings

member implements [globals]

Member of a guild

  • guild ref: guild
  • user ref: user
  • nickname String (medium)

role implements [globals]

Role of a member

  • parent ref: role or null
  • name String (medium)
  • user ref: user
  • guild ref: guild
  • color: String (little)

guild_positition

Client position of a guild for an user

  • guild ref: guild
  • user ref: user
  • position Integer
Clone this wiki locally