MirrorSerializer.js 550 B

123456789101112131415161718192021
  1. const makeId = require("../../util/makeId");
  2. /**
  3. * @description 代码作业镜像的基本信息
  4. * @typedef {Object} MirrorSerializerType
  5. * @property {number} id 镜像的 id
  6. * @property {string} gitUrl git 仓库地址
  7. * @property {string} downloadUrl 镜像下载地址
  8. */
  9. /**
  10. * @description 生成MirrorSerializer
  11. * @returns {MirrorSerializerType}
  12. */
  13. module.exports = ({ id = makeId() }) => {
  14. return {
  15. id,
  16. gitUrl: "www.gitUrl.com/xiaobai/handsome/smart",
  17. downloadUrl: "www.downloadUrl.com/xiaobai/handsome/smart"
  18. };
  19. };