|
|
@@ -0,0 +1,35 @@
|
|
|
+const makeId = require("../../util/makeId");
|
|
|
+const questionSerializer = require("../question/QuestionSerializer");
|
|
|
+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: "READY",
|
|
|
+ createAt: dayjs("2018-10-21").unix(),
|
|
|
+ startAt: dayjs("2019-01-01").unix(),
|
|
|
+ endAt: dayjs("2019-01-20").unix(),
|
|
|
+ problem: [questionSerializer(), questionSerializer()],
|
|
|
+ url: "http://47.100.18.120:3000/SEEC-II-DOC/API-DOC"
|
|
|
+ };
|
|
|
+};
|