image.model.js 317 B

12345678910111213141516
  1. import mongoose from 'mongoose';
  2. const imageSchema = mongoose.Schema({
  3. name: String,
  4. categoryName: String,
  5. categoryId: String,
  6. url: String,
  7. cloudinaryPublicId: String,
  8. createdAt: {
  9. type: Date,
  10. default: new Date()
  11. }
  12. });
  13. const Image = mongoose.model('Image', imageSchema);
  14. export default Image;