product-hero.js 387 B

1234567891011121314
  1. const mongoose = require('mongoose');
  2. const Schema = mongoose.Schema;
  3. const productHeroSchema = new Schema({
  4. product: { type: Schema.Types.ObjectId, ref: 'Product' },
  5. image: String,
  6. title: String,
  7. subtitle: String,
  8. createdAt: { type: Date, default: Date.now }
  9. });
  10. const ProductHeroModel = mongoose.model('ProductHero', productHeroSchema );
  11. module.exports = ProductHeroModel