const makeId = require("../../util/makeId"); /** * @description 互评CheckListResultItem详细实体类 * @typedef {Object} CheckListResultItemType * @property {number|string} id checkListItem id * @property {string} content 评价内容 * @property {string} explain 老师说明 * @property {boolean} teacherLevel 老师作出的评价 * @property {string} teacherComment 老师做出的备注 * @property {boolean} hasTeacherReview 老师是否评审过 * @property {ResultByGroupType[]} results 各个小组的评价 */ /** * @description 各个小组的评价 * @typedef {Object} ResultByGroupType * @property {number|string} groupId 小组 id * @property {boolean} level 小组做出的评价 * @property {string} comment 小组做出的备注 * @property {boolean} isArgued 是否已经申请过重评 */ /** * @description 生成checkListResultItem * @returns {CheckListResultItemType} */ module.exports = ({ id = makeId() }) => { /** * @return {ResultByGroupType} */ const groupResult = () => ({ groupId: makeId(), level: true, comment: "小组做出的备注", isArgued: false }); return { id, content: "该项评价的内容, String", explain: "老师的说明,String", teacherLevel: true, teacherComment: "老师的评论论论", hasTeacherReview: true, results: [groupResult(), groupResult(), groupResult()] }; };