Files.js 417 B

123456789101112131415161718192021222324
  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. return mongoose.model('Files', FilesSchema);
  24. };