api/resources/Panels/Panel2Model.js
2024-04-10 17:04:07 +05:30

39 lines
743 B
JavaScript

import mongoose from "mongoose";
const { Schema, model } = mongoose;
const panel2Schema = new Schema(
{
title: {
type: String,
default: ''
},
content: {
type: String,
default: ''
},
image: {
public_id: {
type: String,
},
url: {
type: String,
},
},
addedBy: {
type: mongoose.Schema.ObjectId,
ref: "User",
required: true,
},
displayPanel: {
type: Boolean,
default: false
}
},
{ timestamps: true }
);
export const Panel2 = model(
"Panel2",
panel2Schema
);