| 123456789101112131415161718192021222324252627282930313233343536373839404142 |
- const makeId = require("../../util/makeId");
- /**
- * @description 互评CheckListResultItem详细实体类
- * @typedef {Object} CheckListResultItemType
- * @property {number|string} id checkListItem id
- * @property {string} content 评价内容
- * @property {string} explain 老师说明
- * @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",
- results: [groupResult(), groupResult(), groupResult()]
- };
- };
|