Skip to content
木杉 edited this page Sep 23, 2018 · 25 revisions

API Document

User

{
  "id": "id",
  "username": "username",
  "email": "email",
  "avatar": "",
  "job": "",
  "city": "",
  "sex": 2,
  "signature": "",
  "role": 0,
  "watchTags": [],
  "watchIssuesId": [],
  "watchArticleTypes": [],
  "watchUsersId": [],
  "watchedUsersId": [],
  "joinCourse": [],
  "integral": 0,
  "shoppingcart": [],
  "createAt": "2018-8-19 15:35:16",
  "updateAt": "2018-8-19 15:35:16"
}

Course

{
  "id": "id",
  "title": "title",
  "coverImg": "coverImg",
  "direction": 1,
  "type": [0, 1, 2],
  "difficulty": 0,
  "price": 10,
  "sections": [{
    "title": "title",
    "nodes": [{
      "title": "title",
      "video": "videoPath"
    }]
  }],
  "authorId": "authorId",
  "commentsId": ["commentsId"],
  "joinersId": ["joinersId"],
  "rate": {"id_1": 2, "id_2": 3},
  "rateComment": {"id_1": "comment", "id_2": "comment"},
  "createAt": "2018-8-19 15:35:16",
  "updateAt": "2018-8-19 15:35:16"
}

Article

{
  "id": "id",
  "title": "title",
  "coverImg": "coverImg",
  "content": "content",
  "type": [0, 1, 2],
  "authorId": "authorId",
  "upersId": [],
  "commentsId": [],
  "category": 0,
  "viewnum": 0,
  "status": 0,
  "createAt": "2018-8-19 16:34:28",
  "updateAt": "2018-8-19 16:34:28"
}

Comment

{
  "id": "id",
  "content": "content",
  "authorId": "authorId",
  "to": "commentId",
  "createAt": "2018-8-19 16:41:03",
  "updateAt": "2018-8-19 16:41:03"
}

Issue

{
  "id": "5b77eb02aa51db0dbc855591",
  "title": "title",
  "content": "content",
  "tags":[
    "前端工具"
  ],
  "authorId": "5b70393f943ded20c1ca2438",
  "replysId":[],
  "viewnum": 0,
  "watchersId":[],
  "status": 0,
  "bindCourseId": "bindCourseId",
  "updateAt": "2018-8-18 17:46:42",
  "createAt": "2018-8-18 17:46:42"
}

Reply

{
  "id": "id",
  "content": "content",
  "upersId": [], /* agree */
  "downersId": [], /* disagree */
  "updateAt": "2018-08-17",
  "createAt": "2018-08-17",
  "subReplysId": []
  "authorId": "authorId"
}

SubReply

{
  "id": "id",
  "from": "userId",
  "to": "userId",
  "content": "content",
  "updateAt": "2018-08-17",
  "createAt": "2018-08-17"
}

Report

{
  "id": "id",
  "srcId": "srcId",
  "msg": "msg",
  "type": 0,
  "reason": 0,
  "reporterId": "reporterId",
  "status": 0,
  "updateAt": "2018-08-17",
  "createAt": "2018-08-17"
}

Suggestion

{
  "from": "from",
  "msg": "msg"
}
Clone this wiki locally