-
-
Save lakshmankashyap/d05b1a1844a2998dde4814d42e131b96 to your computer and use it in GitHub Desktop.
Mongo push error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const userSchema = new mongoose.Schema({ | |
email: { | |
type: String, | |
unique: true, | |
trim: true, | |
required: true | |
}, | |
name: { | |
type: String, | |
trim: true, | |
required: true | |
}, | |
status: { | |
activeEmailToken: { type: String }, | |
activeEmailTokenExp: {type: Date }, | |
resetPassToken: { type: String ,default: null}, | |
resetPassExp: { type: Date ,default: null}, | |
activTempEmail: { type: String ,default: null}, | |
otp :{ type: String ,default: null}, | |
active:{type: Boolean,default:false}, | |
type: {type:Number,default:2} // 0 superuser,1 users | |
}, | |
avatar: { type: String , default: null}, | |
referral: { type: String , default: null,trim: true,}, | |
refGenId: { type: String ,trim: true,}, | |
totalToken: { type: String , default: '0'}, | |
referralBonus: [{type: mongoose.Schema.ObjectId, ref: 'referralBonus'}], | |
orders: [{type: mongoose.Schema.ObjectId, ref: 'order'}], | |
phone: { | |
countryCode:String, | |
country:String, | |
number:Number, | |
}, | |
created:{type: Date, default: Date.now}, | |
password: String, | |
},{ usePushEach: true }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment