requestsWithdraw
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
const mongoose = require('mongoose')
|
||||
const BankSchema = mongoose.Schema({
|
||||
holderName:String,
|
||||
cardNumber:{
|
||||
type:Number,
|
||||
},
|
||||
shabaNumber:{
|
||||
type:Number,
|
||||
}
|
||||
})
|
||||
|
||||
const WithdrawSchema = mongoose.Schema({
|
||||
card:BankSchema,
|
||||
amount:{
|
||||
type:Number,
|
||||
min:0
|
||||
},
|
||||
userId:{
|
||||
type:String,
|
||||
ref:'User'
|
||||
},
|
||||
status:{
|
||||
type:Number,
|
||||
enum:[
|
||||
0, // Pending
|
||||
1, // Accepted
|
||||
2, // deposited
|
||||
]
|
||||
}
|
||||
})
|
||||
|
||||
module.exports = mongoose.model('Withdraw', WithdrawSchema)
|
||||
Reference in New Issue
Block a user