-
Notifications
You must be signed in to change notification settings - Fork 0
Data Structure
程康 edited this page Sep 23, 2018
·
4 revisions
// firebase users:
// 1001
// 1002
{
users: {
1001: {
},
},
websites: {
website1: {
createdBy: 1001,
configs: {
theme: 'light',
locale: 'en',
plugins: {
plugin1: true,
plugin2: false,
},
},
users: {
[encoded '[email protected]']: {
password: 'jklz24£$%!dfjklz', // encoded
createdAt: 12345678, // timestamp
sessionID: 'jla93£jkldeqf',
},
},
profiles: {
[encoded '[email protected]']: {
displayName: 'User 1',
photoURL: 'https://example.com/avatar1.png',
online: false,
},
},
pages: {
page1: {
count: 4,
comment1: {
createdAt: 12345678, // timestamp
createdBy: 'user1', // website user id
content: 'Comment 1', // sanitized markdown
},
comment2: {
createdAt: 12345678, // timestamp
createdBy: 'user1', // website user id
content: 'Comment 2', // sanitized markdown
parentCommentId: 'comment1',
rootCommentId: 'comment1',
},
comment3: {
createdAt: 12345678, // timestamp
createdBy: 'user1', // website user id
content: 'Comment 3', // sanitized markdown
parentCommentId: 'comment2',
rootCommentId: 'comment1',
},
comment4: {
createdAt: 12345678, // timestamp
createdBy: null, // anonymous
content: 'Comment 4', // sanitized markdown
},
},
},
plugins: {
},
},
},
}