|
|
@ -114,18 +114,37 @@ const userSchema = new mongoose.Schema(
|
|
|
|
{ versionKey: false }
|
|
|
|
{ versionKey: false }
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// const profilePictureSchema = new Schema({
|
|
|
|
|
|
|
|
// customerId: {
|
|
|
|
|
|
|
|
// type: String,unique: true,
|
|
|
|
|
|
|
|
// required: true
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
// picture: {
|
|
|
|
|
|
|
|
// type: String,
|
|
|
|
|
|
|
|
// required: true
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// });
|
|
|
|
const profilePictureSchema = new Schema({
|
|
|
|
const profilePictureSchema = new Schema({
|
|
|
|
customerId: {
|
|
|
|
customerId: {
|
|
|
|
type: String,unique: true,
|
|
|
|
type: String,
|
|
|
|
|
|
|
|
unique: true,
|
|
|
|
required: true
|
|
|
|
required: true
|
|
|
|
},
|
|
|
|
},
|
|
|
|
picture: {
|
|
|
|
picture: {
|
|
|
|
|
|
|
|
type: {
|
|
|
|
type: String,
|
|
|
|
type: String,
|
|
|
|
|
|
|
|
enum: ['jpeg', 'png', 'gif'], // add the file formats you support here
|
|
|
|
|
|
|
|
required: true
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
data: {
|
|
|
|
|
|
|
|
type: Buffer,
|
|
|
|
required: true
|
|
|
|
required: true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const ProfilePicture = mongoose.model('ProfilePicture', profilePictureSchema);
|
|
|
|
const ProfilePicture = mongoose.model('ProfilePicture', profilePictureSchema);
|
|
|
|
const Counter = mongoose.model('Counter', CounterSchema);
|
|
|
|
const Counter = mongoose.model('Counter', CounterSchema);
|
|
|
|
const User = mongoose.model("User", userSchema);
|
|
|
|
const User = mongoose.model("User", userSchema);
|
|
|
|