DLWorkSerializer.js 940 B

12345678910111213141516171819202122232425262728
  1. const makeId = require("../../util/makeId");
  2. const nestedProblemSerializer = require("./NestedProblemSerializer");
  3. const dayjs = require("dayjs");
  4. /**
  5. * @description 机器学习作业详情
  6. * @typedef {Object} DLWorkSerializer
  7. * @property {number | string} id 代码作业Id
  8. * @property {string} name 代码作业名称
  9. * @property {string} description 代码作业描述
  10. * @property {string} status 作业状态
  11. * @property {number} createAt 创建时间
  12. * @property {number} startAt 开始时间
  13. * @property {number} endAt 结束时间
  14. * @property {QuestionSerializerType[]} problem 作业题目
  15. */
  16. module.exports = () => {
  17. return {
  18. id: makeId(),
  19. name: "Tensorflow入门",
  20. description: "这是一个MINIST的作业",
  21. status: "PREPARING",
  22. createAt: dayjs("2018-10-21").unix(),
  23. startAt: dayjs("2019-01-01").unix(),
  24. endAt: dayjs("2019-01-20").unix(),
  25. problem: nestedProblemSerializer()
  26. };
  27. };