Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Database Schema #25

Open
ylt opened this issue Sep 21, 2015 · 2 comments
Open

Database Schema #25

ylt opened this issue Sep 21, 2015 · 2 comments

Comments

@ylt
Copy link
Member

ylt commented Sep 21, 2015

Not finalised, just a quick summary of the planned database schema:

User:

  • id
  • username
  • slug
  • language
  • email
  • gRole

Room:

  • id
  • owner (FK: user)
  • name
  • summary
  • description

RoomRolePrivs:

  • role_id (FK: RoomRole)
  • privilege

RoomRole:

  • id
  • room_id (FK: room)
  • priority (higher values are sorted first)
  • name
  • description
  • icon

RoomStaff: (PK: room_id, user_id)

  • room_id (FK: room)
  • user_id (FK: user)
  • role_id (FK: RoomRole)

Media:

  • id
  • user_id (FK: user)
  • duration
  • mediatype (1: yt, 2: sc, 3: bandcamp, 4: special)

Play:

  • id
  • room_id (FK: room)
  • media_id (FK: media)
  • added_by (FK: user)
  • start_time

Queue:

  • id
  • room_id
  • owner_id (FK: user)
  • room_id

Chat:

  • id
  • room_id (FK: room)
  • user_id (FK: user)
  • message
  • style (0: normal, 1: emote, maybe other styles?)
@gkampjes
Copy link

Not sure we need style in the chat table. Wouldn't emotes/emojis be done using markup/down?

Upon saying that, you could use style for admin messages etc.

Also, won't media need a url?

@ylt
Copy link
Member Author

ylt commented Sep 30, 2015

Yeah, style will be used for admin messages, etc.. Maybe will use it for other stuff but undecided about that...

And yep, media needs a URL.. This was just a rushed schema so that we have a rough idea of what we're aiming for, wasn't meant to be perfect ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants