# Сущности в БД Вопросы: - как правильно хранить дату и время в монге - могут ли быть кольцевые ссылки many-to-many - как идет поиск, например по хэш тэгам? Может лучше сделать отдельную коллекцию с кэштэгами, чтобы по ним быстрее искать? - ## Media ```jsonld= _id : ObjectId() created_at : Datetime media_name : String media_description : String media_file_type : String # example: mp4 md5_sum : String user_owner : ObjectId() # ref to user views : Int32 # counter media_url : String preview_image_url : String hash_tags : Array[String] comments : Array[ObjectId()] # ref to comment location : Object[longitude, lattitude] is_deleted : Boolean # default: False deleted_at : Datetime ``` ## Comment ```jsonld= _id : ObjectId() comment_text : String user_owner : ObjectId() # ref to user created_at : Datetime is_deleted : Boolean deleted_at : Datetime ``` ## Challenge ```jsonld= _id : ObjectId() user_owner : ObjectId() # ref to user challenge_name : String challenge_description : String created_at : Datetime started_at : Datetime finished_at : Datetime is_deleted : Boolean deleted_at : Datetime hash_tags : Array[String] # indexed reward_sum : Int32 categories : Array[ObjectId()] # ref to category ``` ## Funding ```jsonld= _id : ObjectId() user_owner : ObjectId() # ref to user funding_name : String funding_description : String created_at : Datetime started_at : Datetime finished_at : Datetime is_deleted : Boolean deleted_at : Datetime hash_tags : Array[String] # indexed reward_sum : Int32 categories : Array[ObjectId()] # ref to category ``` ## Stream ## User ## Audio ## Wallet ## Category ## Languages
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up