Split user

This commit is contained in:
Mr Swift
2024-08-22 13:58:09 +03:30
parent 3d059cad1f
commit 10be64ec43
22 changed files with 618 additions and 307 deletions
+57
View File
@@ -0,0 +1,57 @@
const mongoose = require('mongoose')
const BankSchema = mongoose.Schema({
holderName: String,
PAN: {
type: Number,
},
IBAN: {
type: String,
}
})
const UserSchema = mongoose.Schema({
first_name: String,
last_name: String,
national_code: String,
province_name: String,
city_name: String,
address: String,
mobile_number: String,
cell_number:String,
password: String,
profilePic: {
type: String,
default: "noPic"
},
shopName: String,
birthDate: String,
walletBalance: {
type: Number,
min: 0,
default: 0
},
dollarBalance: {
type: Number,
min: 0,
default: 0
},
score: {
type: Number,
min: 0,
default: 0
},
cardBank: [BankSchema],
active:{ type: Boolean, default: false },
/// //////////////////////////////// user confirmations
seenByAdmin: { type: Boolean, default: false },
/// /////////////
token: String,
otp:String
})
module.exports = mongoose.model('UserGPS', UserSchema)