ReviewSimpleSerializer.js 1006 B

1234567891011121314151617181920212223242526272829303132
  1. const makeId = require("../../util/makeId");
  2. const courseSerializer = require("../course/CourseSerializer");
  3. const dayjs = require("dayjs");
  4. const groupSerializer = require("../course/GroupSerializer");
  5. /**
  6. * @description 互评checkListItem详细实体类
  7. * @typedef {Object} ReviewSimpleSerializerType
  8. * @property {number|string} id 互评作业id
  9. * @property {string} name 对应的文档作业名称
  10. * @property {CourseSerializerType} course 所属课程
  11. * @property {number} beginAt 开始时间
  12. * @property {number} endAt 截止时间
  13. * @property {GroupSerializerType} group 所属小组
  14. */
  15. /**
  16. * @description 生成ReviewSimpleSerializerType
  17. * @returns ReviewSimpleSerializerType
  18. */
  19. const reviewSimpleSerializer = () => {
  20. return {
  21. id: makeId(),
  22. name: "该项评价的内容, String",
  23. course: courseSerializer(),
  24. beginAt: dayjs("2018-10-21").unix(),
  25. endAt: dayjs("2018-12-21").unix(),
  26. group: groupSerializer()
  27. };
  28. };
  29. module.exports = reviewSimpleSerializer;