Skip to content
Permalink
55dd1f4d3a
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
50 lines (47 sloc) 792 Bytes
import mongoose from "mongoose";
const EventSchema = new mongoose.Schema({
title: {
type: String,
required: true,
},
clubID: {
type: String,
required: true,
},
maxParticipation: {
type: Number,
},
desc: {
type: String,
},
organizer: {
type: [
{
name: {
type: String,
required: true,
},
email: {
type: String,
required: true,
},
},
],
required: true,
},
schedule: {
type: [
{
date: {
type: String,
required: true
},
time: {
type: String,
required: true
}
}
],
},
});
export default mongoose.model("Event", EventSchema);