Spaces:
Sleeping
Sleeping
File size: 666 Bytes
0f8617c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | const mongoose = require('mongoose');
const photographerSchema = new mongoose.Schema({
userId: { type: mongoose.Schema.Types.ObjectId, ref: 'User', required: true },
portfolio: [
{
url: String,
caption: String,
category: String
}
],
pricePerHour: Number,
currency: { type: String, default: 'USD' },
availability: [
{
day: String,
startTime: String,
endTime: String
}
],
rating: { type: Number, default: 0 },
reviewsCount: { type: Number, default: 0 }
});
module.exports = mongoose.model('Photographer', photographerSchema);
|