| 1234567891011121314151617181920212223242526272829303132333435363738 |
- const makeLongMarkdown = require("../../util/makeLongMarkdown");
- const makeId = require("../../util/makeId");
- const courseSerializer = require("../course/CourseSerializer");
- const dayjs = require("dayjs");
- const checkListItemSerializer = require("./CheckListItemSerializer");
- const groupSerializer = require("../course/GroupSerializer");
- /**
- * @description 互评checkListItem详细实体类
- * @typedef {Object} ReviewDetailSerializerType
- * @property {number|string} id 互评作业id
- * @property {string} name 对应的文档作业名称
- * @property {CourseSerializerType} course 所属课程
- * @property {number} beginAt 开始时间
- * @property {number} endAt 截止时间
- * @property {string} docContent 作业内容
- * @property {CheckListItemSerializerType[]} checkList 评价列表
- * @property {GroupSerializerType} group 所属小组
- */
- /**
- * @description 生成ReviewDetailSerializer
- * @returns ReviewDetailSerializerType
- */
- const reviewDetailSerializer = () => {
- return {
- id: makeId(),
- name: "该项评价的内容, String",
- course: courseSerializer(),
- beginAt: dayjs("2018-10-21").unix(),
- endAt: dayjs("2018-12-21").unix(),
- docContent: makeLongMarkdown(),
- checkList: [checkListItemSerializer(), checkListItemSerializer()],
- group: groupSerializer()
- };
- };
- module.exports = reviewDetailSerializer;
|