Links.js 409 B

123456789101112131415161718192021222324
  1. 'use strict';
  2. module.exports = app => {
  3. const { mongoose } = app;
  4. const { Schema } = mongoose;
  5. const LinksSchema = new Schema({
  6. // 名称
  7. name: {
  8. type: String,
  9. },
  10. // 图片地址
  11. path: {
  12. type: String,
  13. },
  14. // id
  15. id: {
  16. type: String,
  17. },
  18. // 访问地址
  19. links: {
  20. type: String,
  21. },
  22. });
  23. return mongoose.model('Links', LinksSchema);
  24. };