DeploySerializer.js 782 B

12345678910111213141516171819202122232425
  1. const makeId = require("../../util/makeId");
  2. /**
  3. * @description 代码作业一次部署的基本信息
  4. * @typedef {Object} DeploySerializerType
  5. * @property {number} id 代码作业一次构建的 id
  6. * @property {number} deployState 部署状态[0:"部署中",1:"部署成功",-1:"部署失败"]
  7. * @property {string} deployMessage 部署输出的信息
  8. * @property {Object} config 配置信息{TBD}
  9. * @property {string} pageUrl 项目部署的 url
  10. */
  11. /**
  12. * @description 生成DeploySerializerType
  13. * @returns {DeploySerializerType}
  14. */
  15. module.exports = ({ id = makeId(), deployState = 0 }) => {
  16. return {
  17. id,
  18. deployState,
  19. deployMessage: "我是部署输出的信息信息信息",
  20. config: {},
  21. pageUrl: "www.pageUrl.com/xiaobai/handsome/smart"
  22. };
  23. };