| 123456789101112131415161718192021222324 |
- const makeId = require("../../util/makeId");
- const userSerializer = require("../user/UserSerializer");
- /**
- * @description 课程信息
- * @typedef {Object} CourseSerializerType
- * @property {number|string} id 课程id
- * @property {string} name 课程名称
- * @property {string} code 选课码
- * @property {UserSerializerType} teacher 老师信息
- */
- /**
- * @description 生成课程信息
- * @returns {CourseSerializerType}
- */
- module.exports = (id = makeId()) => {
- return {
- id,
- name: "软件工程第二阶段 2018",
- code: "xxxxx",
- teacher: userSerializer("TEACHER")
- };
- };
|