| 12345678910111213141516171819202122232425262728293031323334 |
- const makeId = require("../../util/makeId");
- const nestedProblemSerializer = require("../assignment/NestedProblemSerializer");
- const dayjs = require("dayjs");
- /**
- * @description 文档作业信息
- * @typedef {Object} DocumentSerializerType
- * @property {number | string} id 文档作业id
- * @property {string} name 文档作业名称
- * @property {string} description 文档作业描述
- * @property {string} status 作业状态
- * @property {number} createAt 创建时间
- * @property {number} startAt 开始时间
- * @property {number} endAt 结束时间
- * @property {QuestionSerializerType[]} problem 作业题目
- * @property {string} url 作业git地址
- */
- /**
- * @description 生成文档作业详情
- * @returns {DocumentSerializerType}
- */
- module.exports = () => {
- return {
- id: makeId(),
- name: "需求规格说明文档",
- description: "请给该项目的需求规格说明文档",
- status: "PREPARING",
- createAt: dayjs("2018-10-21").unix(),
- startAt: dayjs("2019-01-01").unix(),
- endAt: dayjs("2019-01-20").unix(),
- problem: nestedProblemSerializer()
- };
- };
|