Log.js 586 B

12345678910111213141516171819202122232425262728293031323334353637
  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. userName: {
  27. type: String,
  28. },
  29. acct: {
  30. type: String,
  31. },
  32. date: {
  33. type: String,
  34. },
  35. });
  36. return mongoose.model('Log', LogSchema);
  37. };