Files.js 480 B

12345678910111213141516171819202122232425262728
  1. 'use strict';
  2. module.exports = app => {
  3. const { mongoose } = app;
  4. const { Schema } = mongoose;
  5. const FilesSchema = new Schema({
  6. // 文件名
  7. name: {
  8. type: String,
  9. },
  10. // 文件路径
  11. path: {
  12. type: String,
  13. },
  14. // 文件路径
  15. type: {
  16. type: String,
  17. },
  18. // 数据id
  19. id: {
  20. type: String,
  21. },
  22. // 创建时间
  23. createAt: {
  24. type: String,
  25. },
  26. });
  27. return mongoose.model('Files', FilesSchema);
  28. };