DocumentResultSerializer.js 753 B

12345678910111213141516171819202122232425262728
  1. const makeId = require("../../util/makeId");
  2. const groupSerializer = require("../course/GroupSerializer");
  3. /**
  4. * @description 文档作业成绩
  5. * @typedef {Object} DocumentResultSerializerType
  6. * @property {number | string} id 文档作业成绩id
  7. * @property {number} document 所属文档作业Id
  8. * @property {GroupSerializerType} group 所属小组
  9. * @property {string} state 作业状态
  10. * @property {string} result 成绩等级
  11. */
  12. /**
  13. * @description 生成文档作业成绩
  14. * @returns {DocumentResultSerializerType}
  15. */
  16. module.exports = () => {
  17. return {
  18. id: makeId(),
  19. document: makeId(),
  20. group: groupSerializer(),
  21. state: "互评中",
  22. result: "A",
  23. url: "https://github.com",
  24. reviewGroup: [1, 2, 3]
  25. };
  26. };