Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- This is the news document which will be inserted
- inside the proper collection (ex economy, sport, politics)
- {
- "title": "title",
- "author":{
- "_id": "author's id",
- "name": "author's name"
- },
- "preview": "preview image",
- "content": "text of the news",
- "datetime": "pubblication date",
- "photos": [
- "photo1",
- "photo2",
- "photo3"
- ],
- "videos": [
- "video1",
- "video2"
- ],
- "comments": [
- {
- "id": 1,
- "author": "author's name",
- "text": "comment",
- "datetime": "datetime",
- "parents": [],
- "replies":[
- {
- "id": 2,
- "author": "author's name",
- "text": "comment",
- "datetime": "datetime",
- "parents": [1],
- "replies":[
- {
- "id": 4,
- "author": "author's name",
- "text": "comment",
- "datetime": "datetime",
- "parents": [1,2]
- },
- {
- "id": 6,
- "author": "author's name",
- "text": "comment",
- "datetime": "datetime",
- "parents":[1,2]
- }
- ]
- },
- {
- "id": 5,
- "author": "author's name",
- "text": "comment",
- "datetime": "datetime",
- "parents": [1],
- "replies":[]
- }
- ]
- },
- {
- "id": 3,
- "author": "author's name",
- "text": "comment",
- "datetime": "datetime",
- "parents": [],
- "replies":[]
- }
- ],
- "feedbacks": {
- "excellent": "number of excellent votes",
- "good": "number of good votes",
- "average": "number of average votes",
- "poor": "number of poor votes",
- "bad": "number of bad votes"
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement