-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfirestore_schema.txt
118 lines (106 loc) · 3 KB
/
firestore_schema.txt
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
Firestore Database Schema
1. users Collection
- Document ID: {userId}
- Fields:
- uid (string): Unique identifier for the user
- realName (string | null): User's real name
- nickname (string | null): User's chosen nickname
- email (string | null): User's email address
- profilePhotoURL (string | null): Profile picture URL
- bio (string | null): Short bio about the user
- boardPermissions (map): { [boardId]: 'read' | 'write' }
Subcollections:
- notifications
- Document ID: {notificationId}
- Fields:
- id (string)
- type (enum): Notification type (COMMENT_ON_POST, REPLY_ON_COMMENT, REPLY_ON_POST)
- boardId (string)
- postId (string)
- commentId (string | optional)
- replyId (string | optional)
- fromUserId (string)
- fromUserProfileImage (string | optional)
- message (string)
- timestamp (Timestamp)
- read (boolean)
- writingHistories
- Document ID: {writingHistoryId}
- Fields:
- day (string): YYYY-MM-DD
- createdAt (Timestamp)
- board.id (string)
- post.id (string)
- post.contentLength (number)
- firebaseMessagingTokens
- Document ID: {firebaseMessagingTokenId}
- Fields: (Not explicitly defined)
- postings
- Document ID: {postingId}
- Fields:
- board.id (string)
- post.id (string)
- post.title (string)
- post.contentLength (number)
- createdAt (Timestamp)
- commentings
- Document ID: {commentingId}
- Fields:
- board.id (string)
- post.id (string)
- post.authorId (string)
- comment.id (string)
- createdAt (Timestamp)
- replyings
- Document ID: {replyingId}
- Fields:
- board.id (string)
- post.id (string)
- post.authorId (string)
- comment.id (string)
- comment.authorId (string)
- reply.id (string)
- createdAt (Timestamp)
2. boards Collection
- Document ID: {boardId}
- Fields:
- id (string)
- title (string)
- description (string)
- createdAt (Date)
- firstDay (Timestamp | optional)
- cohort (number | optional)
Subcollections:
- posts
- Document ID: {postId}
- Fields:
- id (string)
- boardId (string)
- title (string)
- content (string)
- thumbnailImageURL (string | null)
- authorId (string)
- authorName (string)
- createdAt (Date | optional)
- updatedAt (Date | optional)
- countOfComments (number)
- countOfReplies (number)
- weekDaysFromFirstDay (number | optional)
- comments
- Document ID: {commentId}
- Fields:
- id (string)
- content (string)
- userId (string)
- userName (string)
- userProfileImage (string)
- createdAt (Timestamp)
- replies
- Document ID: {replyId}
- Fields:
- id (string)
- content (string)
- userId (string)
- userName (string)
- userProfileImage (string)
- createdAt (Timestamp)