import mongoose from "mongoose"; const CollectionSchema = mongoose.Schema( { name: { type: String, // required: true, }, created_by: { type: mongoose.Schema.Types.ObjectId, ref: "User", }, header: [ { key: { type: String, }, value: { type: String, }, //required: true, }, ], }, { timestamps: true } ); const Collection = mongoose.model("Collection", CollectionSchema); export default Collection;