Device Controller
This commit is contained in:
@@ -4,14 +4,14 @@ const deviceSchema = mongoose.Schema({
|
||||
model:String,
|
||||
IMEI:{
|
||||
type:String,
|
||||
unique:true
|
||||
unique:[true,"این ایدی در سامانه موجود است"]
|
||||
},
|
||||
dollarPrice:{
|
||||
tomanPrice:{
|
||||
type:Number,
|
||||
min:0,
|
||||
default:0
|
||||
},
|
||||
tomanPrice:{
|
||||
dollarProfit:{
|
||||
type:Number,
|
||||
min:0,
|
||||
default:0
|
||||
@@ -25,6 +25,10 @@ const deviceSchema = mongoose.Schema({
|
||||
type:Number,
|
||||
min:0
|
||||
},
|
||||
renewalProfit:{
|
||||
type:Number,
|
||||
min:0
|
||||
},
|
||||
status:{
|
||||
type:Number,
|
||||
enum:[
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const mongoose = require('mongoose')
|
||||
|
||||
const ScoreSchema = mongoose.Schema({
|
||||
const RenewalSchema = mongoose.Schema({
|
||||
deviceId:{
|
||||
type:String,
|
||||
ref:'Device'
|
||||
@@ -26,4 +26,4 @@ const ScoreSchema = mongoose.Schema({
|
||||
},
|
||||
})
|
||||
|
||||
module.exports = mongoose.model('Score', ScoreSchema)
|
||||
module.exports = mongoose.model('Renewal', RenewalSchema)
|
||||
Reference in New Issue
Block a user