CheckListItemSerializer.js 873 B

1234567891011121314151617181920212223242526272829
  1. const makeId = require("../../util/makeId");
  2. /**
  3. * @description 互评checkListItem详细实体类
  4. * @typedef {Object} CheckListItemSerializerType
  5. * @property {number|string} id checkListItem id
  6. * @property {string} content 评价内容
  7. * @property {boolean} level 用户评级
  8. * @property {string} comment 用户备注
  9. * @property {string} explain 老师说明
  10. * @property {string} remark 学生申请argue的备注
  11. * @property {string} state ["DEFAULT","SUBMITTED","PENDING","SOLVING","ARGUED"]
  12. */
  13. /**
  14. * @description 生成checkListItem
  15. * @returns {CheckListItemSerializerType}
  16. */
  17. module.exports = ({ id = makeId(), state = "DEFAULT" }) => {
  18. return {
  19. id,
  20. content: "该项评价的内容, String",
  21. level: false,
  22. comment: "用户的评级",
  23. explain: "老师的说明,String",
  24. remark: "学生申请argue的备注",
  25. state
  26. };
  27. };