const makeId = require("../../util/makeId"); const nestedProblemSerializer = require("./NestedProblemSerializer"); const dayjs = require("dayjs"); /** * @description 代码作业详情 * @typedef {Object} CodeSerializerType * @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 作业题目 */ /** * @description 生成代码作业 * @returns {CodeSerializerType} */ 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() }; };