Device Controller
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
const mongoose = require('mongoose')
|
||||
|
||||
const RenewalSchema = mongoose.Schema({
|
||||
deviceId:{
|
||||
type:String,
|
||||
ref:'Device'
|
||||
},
|
||||
renewDate:Date,
|
||||
renewType:{
|
||||
type:String,
|
||||
},
|
||||
price:{
|
||||
type:Number,
|
||||
min:0
|
||||
},
|
||||
profit:{
|
||||
type:Number,
|
||||
min:0,
|
||||
unique:true,
|
||||
default:0,
|
||||
required:true
|
||||
},
|
||||
dollarProfit:{
|
||||
type:Number,
|
||||
min:0
|
||||
},
|
||||
})
|
||||
|
||||
module.exports = mongoose.model('Renewal', RenewalSchema)
|
||||
Reference in New Issue
Block a user