Files
2024-10-27 16:33:16 +03:30

33 lines
562 B
JavaScript

const mongoose = require('mongoose')
const RenewalSchema = mongoose.Schema({
deviceId: {
type: String,
ref: 'Device'
},
IMEI: {
type: String,
},
renewDate: Date,
renewType: {
type: String,
},
price: {
type: Number,
min: 0
},
profit: {
type: Number,
min: 0,
unique: true,
default: 0,
required: true
},
userId: {
type: String,
ref: 'UserGPS'
},
})
module.exports = mongoose.model('Renewal', RenewalSchema)