Log.js 465 B

12345678910111213141516171819202122232425262728
  1. 'use strict';
  2. module.exports = app => {
  3. const { mongoose } = app;
  4. const { Schema } = mongoose;
  5. const LogSchema = new Schema({
  6. // 模块
  7. mondel: {
  8. type: String,
  9. },
  10. // 类型
  11. method: {
  12. type: String,
  13. },
  14. // 结果
  15. result: {
  16. type: String,
  17. },
  18. // 数据
  19. data: {
  20. type: Object,
  21. },
  22. // 创建时间
  23. createAt: {
  24. type: String,
  25. },
  26. });
  27. return mongoose.model('Log', LogSchema);
  28. };