Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | 2x 2x 2x | const mongoose = require('mongoose');
const institutionSchema = new mongoose.Schema({
name: { type: String, required: true },
type: { type: String, enum: ['college', 'university', 'org', 'temporary'], required: true },
location: {
city: String,
state: String,
country: String
},
emailDomain: { type: String, required: true },
isVerified: { type: Boolean, default: false },
isTemporary: { type: Boolean, default: false },
hostedEvents: [{ type: mongoose.Schema.Types.ObjectId, ref: 'Event' }],
createdAt: { type: Date, default: Date.now },
updatedAt: { type: Date, default: Date.now }
});
module.exports = mongoose.model('Institution', institutionSchema);
|