DocumentResultSerializer.js 876 B

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