Skip to content

Latest commit

 

History

History
297 lines (266 loc) · 4.42 KB

database.mongo.md

File metadata and controls

297 lines (266 loc) · 4.42 KB

Feed

table name: feed
index: {fid:1}

field type descrition
fid bson.ObjectId feed id
uid string user id
content FeedContent include text and image url
refid string ref feed id
ctime int64 create time, millisecond

Feed Deleted

table name: feed_del
others like Feed

Feed Location

table name: feedLoc
index: {loc.loc:'2d'}

field type descrition
fid string feed id
loc Location {ctime:int64, loc:[lat, lon]}

Feed Location Deleted

table name: feedLoc_del
others like Feed Location

User

table name: user
index: {uid:1}, {username:1}(unique:true), {email:1}(unique:true)
all the fields are required.

field type descrition
uid bson.ObjectId user id
username string
email string
pwd string encrypted password
avatar string avatar url
sex int 0 means man, 1 means woman, 2 means others
ctime int64 register time, millisecond

User Deleted

table name: user_del
others like User

User Expand

table name: usreExpand
index: {uid:1}
all the fields are optional.

field type descrition
uid string user id
blog string blog address
address string
birthday string yyyy-mm-dd
phone string phone number
qq string qq account
msn string msn account
description string self descrition
logincnt int login count
lltime int64 last login time

User Expand Deleted

table name: usreExpand_del
others like User Expand

User Location

table name: userLoc
index: {lloc.loc.:'2d'}
Location: {ctime:int64, loc:[lat, lon]}

field type descrition
uid string feed id
lloc Location last location
hlocs Location array history locations

User Location Deleted

table name: userLoc_del
others like User Location

Comment

table name: comment
index: {cid:1}

field type descrition
cid string comment id
uid string user id
fid string feed id
content string comment content
ctime int64 create time, millisecond

Comment Deleted

table name: comment_del
others like Comment

Follow

table name: follow
index: {uid:1, beuid:1}(unique:true)

field type descrition
uid string uid follows beuid
beuid string the user id who was followed
ctime int64 create time, millisecond