DocumentResultSerializer.js 694 B

1234567891011121314151617181920212223242526
  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: "B"
  23. };
  24. };