rest_api_chat
Tables (21)
attachment
- msg_id — Foreign key → team_message.id — NOT NULL
- file_id — Foreign key → files.id — NOT NULL
category
- id — Primary key — NOT NULL
- team — Foreign key → team.id — NOT NULL
- name — NOT NULL
channel
- id — Primary key — NOT NULL
- team — Foreign key → team.id — NOT NULL
- category — Foreign key → category.id
- name
ctg_role
- role_id — Foreign key → role.id — NOT NULL
- ctg_id — Foreign key → category.id — NOT NULL
- perm_id — Foreign key → permission.id — NOT NULL
- status
direct_message
- id — Primary key — NOT NULL
- from_user — Foreign key → user.id — NOT NULL
- to_group — Foreign key → dm_group.id — NOT NULL
- context — NOT NULL
- date — NOT NULL
dm_attachment
- dm_id — Foreign key → direct_message.id — NOT NULL
- file_id — Foreign key → files.id — NOT NULL
dm_group
- id — Primary key — NOT NULL
- name — NOT NULL
files
- id — Primary key — NOT NULL
- owner — Foreign key → user.id — NOT NULL
- name — NOT NULL
- location — NOT NULL
- upload_time — NOT NULL
- size_byte — NOT NULL
- width
- height
group_member
- user_id — Foreign key → user.id — NOT NULL
- group_id — Foreign key → dm_group.id — NOT NULL
invite
- id — Primary key — NOT NULL
- team — Foreign key → team.id — NOT NULL
- host — Foreign key → user.id — NOT NULL
- limit
- max_limit
- expired_date
- published_date — NOT NULL
member_role
- user_id — Foreign key → team_member.user_id — NOT NULL
- team_id — Foreign key → team_member.team_id — NOT NULL
- role_id — Foreign key → role.id — NOT NULL
perm_team
- role_id — Foreign key → role.id — NOT NULL
- perm_id — Foreign key → permission.id — NOT NULL
- status — NOT NULL — whether role could have permission or
permission
- id — Primary key — NOT NULL
- name — NOT NULL
- perm_level — NOT NULL
role
- id — Primary key — NOT NULL
- team — Foreign key → team.id — NOT NULL
- name — NOT NULL
- priority — NOT NULL
role_channel
- role_id — Foreign key → role.id — NOT NULL
- ch_id — Foreign key → channel.id — NOT NULL
- perm_id — Foreign key → permission.id — NOT NULL
- status — NOT NULL
team
- id — Primary key — NOT NULL
- owner — Foreign key → user.id — NOT NULL
- name — NOT NULL
team_member
- user_id — Foreign key → user.id — NOT NULL
- team_id — Foreign key → team.id — NOT NULL
- team_name
- invited_by — Foreign key → invite.id
- joined_date
team_message
- id — Primary key — NOT NULL
- user_id — Foreign key → team_member.user_id — NOT NULL
- team_id — Foreign key → team_member.team_id — NOT NULL
- channel — Foreign key → channel.id — NOT NULL
- context — NOT NULL
- date — NOT NULL
unread_dm
- dm_id — Foreign key → direct_message.id — NOT NULL
- user_id — Foreign key → group_member.user_id — NOT NULL
- group_id — Foreign key → group_member.group_id — NOT NULL
- is_read — NOT NULL
- read_time
unread_tm
- tm_id — Foreign key → team_message.id — NOT NULL
- user_id — Foreign key → team_member.user_id — NOT NULL
- team_id — Foreign key → team_member.team_id — NOT NULL
- is_read — NOT NULL
- read_time
user
- id — Primary key — NOT NULL
- email — NOT NULL
- username — NOT NULL
- password — NOT NULL