update: remove dollor from wallet and unit

This commit is contained in:
mahyargdz
2024-12-30 16:03:02 +03:30
parent 0d8ba394b1
commit cd61741d06
13 changed files with 462 additions and 490 deletions
+36 -36
View File
@@ -1,42 +1,42 @@
const mongoose = require('mongoose')
const deviceSchema = mongoose.Schema({
model: String,
IMEI: {
type: String,
unique: [true, "این ایدی در سامانه موجود است"]
},
tomanPrice: {
type: Number,
min: 0,
default: 0
},
dollarProfit: {
type: Number,
min: 0,
default: 0
},
profit: {
type: Number,
min: 0,
default: 0
},
score: {
type: Number,
min: 0
},
renewalProfit: {
type: Number,
min: 0
},
status: {
type: Number,
enum: [
0, // not installed
1 // installed
],
default: 0
}
model: String,
IMEI: {
type: String,
unique: [true, 'این ایدی در سامانه موجود است']
},
tomanPrice: {
type: Number,
min: 0,
default: 0
},
// dollarProfit: {
// type: Number,
// min: 0,
// default: 0
// },
profit: {
type: Number,
min: 0,
default: 0
},
score: {
type: Number,
min: 0
},
renewalProfit: {
type: Number,
min: 0
},
status: {
type: Number,
enum: [
0, // not installed
1 // installed
],
default: 0
}
})
module.exports = mongoose.model('Device', deviceSchema)