Deleted schema.
This commit is contained in:
parent
53246b70b2
commit
e2eb240a06
@ -1,20 +0,0 @@
|
||||
import mongoose from 'mongoose';
|
||||
|
||||
const userSchema = new mongoose.Schema(
|
||||
{
|
||||
username: { required: true, type: String },
|
||||
name: { required: true, type: String },
|
||||
firstName: { required: false, type: String },
|
||||
lastName: { required: false, type: String },
|
||||
email: { required: true, type: String }
|
||||
},
|
||||
{ timestamps: true }
|
||||
);
|
||||
|
||||
userSchema.virtual('id').get(function () {
|
||||
return this._id.toHexString();
|
||||
});
|
||||
|
||||
userSchema.set('toJSON', { virtuals: true });
|
||||
|
||||
export const userModel = mongoose.model('User', userSchema);
|
||||
Loading…
x
Reference in New Issue
Block a user