harris_paint / src /models /Inspiration.js
aliroohan179's picture
Upload 58 files
10821c7 verified
Raw
History Blame Contribute Delete
565 Bytes
const mongoose = require('mongoose');
const inspirationSchema = new mongoose.Schema(
{
title: { type: String, required: true },
description: { type: String },
image: { type: String, required: true },
linkedColours: [{ type: mongoose.Schema.Types.ObjectId, ref: 'Colour' }],
linkedProducts: [{ type: mongoose.Schema.Types.ObjectId, ref: 'Product' }],
inspirationCollection: { type: String },
displayOrder: { type: Number, default: 0 },
},
{ timestamps: true }
);
module.exports = mongoose.model('Inspiration', inspirationSchema);