You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
686 B
39 lines
686 B
6 months ago
|
import mongoose from 'mongoose';
|
||
|
|
||
|
const volunteerSchema = new mongoose.Schema({
|
||
|
fullName: {
|
||
|
type: String,
|
||
|
required: true
|
||
|
},
|
||
|
address: {
|
||
|
type: String,
|
||
|
required: true
|
||
|
},
|
||
|
phone: {
|
||
|
type: String,
|
||
|
required: true
|
||
|
},
|
||
|
email: {
|
||
|
type: String,
|
||
|
required: true,
|
||
|
unique: true
|
||
|
},
|
||
|
organization: {
|
||
|
type: String,
|
||
|
default: ''
|
||
|
},
|
||
|
interests: [{
|
||
|
type: String,
|
||
|
enum: ['environment', 'education', 'community', 'events']
|
||
|
}],
|
||
|
availability: [{
|
||
|
type: String,
|
||
|
enum: ['weekdays', 'weekends', 'evenings']
|
||
|
}],
|
||
|
createdAt: {
|
||
|
type: Date,
|
||
|
default: Date.now
|
||
|
}
|
||
|
});
|
||
|
|
||
|
export default mongoose.model('Volunteer', volunteerSchema);
|