Working with Mongoose schema

const mongoose = require(“mongoose”);
const Schema = mongoose.Schema;
const panel = new Schema({
techStack: { type: String, required: true, trim: true, validate: /^[⁰-9\s]+(\s*[⁰-9]+)*$/ },
people: { type: [String], required: true, trim: true, validate: /^[⁰-9\s]+(\s*[⁰-9]+)*$/ },
interviews: { type: [String], trim: true, lowercase: true, validate: /^[⁰-9\s]+(\s*[⁰-9]+)*$/ }}, { strict: false, timestamps: true });

const panelModel = mongoose.model(“panels”, panel, “panels”);

module.exports.panelModel = panelModel;

Suffering from Knowledge Quest

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store