QuestionSerializer.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. const makeId = require("../../util/makeId");
  2. const fileSerializer = require("../FileSerializer");
  3. /**
  4. * @description 题目信息
  5. * @typedef {Object} QuestionSerializerType
  6. * @property {number|string} id 题目id
  7. * @property {string} name 题目名称
  8. * @property {string} description 题目描述
  9. * @property {Object} assignmentType 作业类型
  10. * @property {Object} type 题目类型
  11. * @property {number} creator 创建者id
  12. * @property {number} expectTime 预计完成时间
  13. * @property {number} difficulty 题目难度
  14. * @property {FileSerializerType} file 题目文件
  15. */
  16. /**
  17. * @description 题目信息
  18. * @returns {QuestionSerializerType}
  19. */
  20. module.exports = () => {
  21. return {
  22. id: makeId(),
  23. name: "物流系统需求规格说明书",
  24. description:
  25. "某公司为xxx快递公司,请为该公司设计一个物流管理系统...此物流管理系统的用户分别为,管理员、快递员",
  26. assignmentType: {
  27. name: "DOCUMENT",
  28. value: "文档作业"
  29. },
  30. type: {
  31. name: "DOCUMENT",
  32. value: "文档作业"
  33. },
  34. creator: makeId(),
  35. expectTime: 20,
  36. difficulty: 1,
  37. file: fileSerializer()
  38. };
  39. };