DoomDuck / transcendence

0 stars 0 forks source link

Work done by lzins on backend #10

Closed luckylu91 closed 2 years ago

luckylu91 commented 2 years ago

The work can be found here

luckylu91 commented 2 years ago

Look at the branch 'lzins' for up-to-date work on backend There was a basic posgresql container implemented in docker/postgresql The work can be found at docker/backend/app/src/postgres and mainly consists of:

The below scheme is only informative about the involved data and NOT a suggestion for the actual tables. Indeed the One-to-Many and Many-To-Many relations should be implemented differently than what is suggested here (see https://docs.nestjs.com/techniques/database#relations)

Database Transcendence

Users
- id
- login
- password
- role : admin | author | user
- avatar icon (default)
- status : online | offline, ingame, …
- ladder level ?
- achievements
- …other stats
- blocked users ids
- active channels ids
- owned channels ids
- removed

Friends
- users id

Games
- timelaunched
- classic | customized
- player 1
- player 2
- winner
- loser
- score 1
- score 2

(not in db)
Games Stats
current ladder

Channels
- id
- time created
- public | private | password protected
- password (if password protected)
- name
- owner id
- administrators ids
- current viewers ids
- members ids (if private)
- banned users ids
- muted users ids

Channel Messages
- time posted (ascending)
- channel id
- content

Direct Messages
- time sended
- sender
- receiver
- content
DoomDuck commented 2 years ago

You'll have to tell me more about this IRL