forked from FamManh/awesomechat
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdb
More file actions
39 lines (35 loc) · 623 Bytes
/
Copy pathdb
File metadata and controls
39 lines (35 loc) · 623 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Table user as U{
id ObjectId [pk]
lastname String
firstname String
email String
password String
picture String
}
Table contact as C{
id ObjectId [pk]
userId ObjectId
contactId ObjectId
status Boolean
}
Table message as M{
id ObjectId [pk]
sender ObjectId
receiver ObjectId
text String
file ArrayBuffer
}
Table chatgroup as CG{
id ObjectId [pk]
name String
userAmount Number
messageAmount Number
admins ArrayObjectId
members ArrayObjectId
}
Ref: C.userId > U.id
Ref: C.contactId > U.id
Ref: M.sender > U.id
Ref: M.receiver > U.id
Ref: CG.admins > U.id
Ref: CG.members > U.id