-
Notifications
You must be signed in to change notification settings - Fork 3
Schema
Nishant Racherla edited this page Jan 16, 2023
·
8 revisions
{
username: {
type: String,
required: true,
unique: true
},
email: {
type: String,
required: true,
unique: true
},
password: {
type: String,
required: true
},
bio: {
type: String,
required: true
},
profilePicUrl: {
type: String
},
photos: [{
type: ObjectId,
ref: "Photo"
}]
}{
latitude: {
type: Number,
required: true,
},
longitude: {
type: Number,
required: true,
},
name: {
type: String,
required: true
},
comments: [{
type: ObjectId,
ref: "Comment"
}],
photos: [{
type: ObjectId,
ref: "Photo"
}]
}{
zipcode: {
type: Number,
required: true
},
cityName: {
type: String,
required: true
},
spots: [{
type: ObjectId,
ref: "Spot"
}]
}{
body: {
type: String,
required: true
},
userId: {
type: ObjectId,
ref: "User"
},
spotId: {
type: ObjectId,
ref: "Spot"
}
}{
photoId: {
type: ObjectId,
ref: "Photo"
},
likerId: {
type: ObjectId,
ref: "User"
}
}{
url: {
type: String,
required: true
},
spotId: {
type: ObjectId,
ref: "Spot"
},
userId: {
type: ObjectId,
ref: "User"
},
genre: {
type: String,
required: true
},
description: {
type: String
},
condition: {
type: String,
required: true
},
transportation: {
type: String,
required: true
},
bestTimeOfDay: {
type: String,
required: true
},
payment: {
type: String,
required: true
}
likes: [{
type: ObjectId,
ref: "Like"
}]
}