2024-08-20 17:18:34 +00:00
|
|
|
const mongoose= require('mongoose')
|
|
|
|
|
|
|
|
const schema= new mongoose.Schema({
|
|
|
|
codeObject: String,
|
|
|
|
description: {
|
|
|
|
type: String,
|
|
|
|
default: ""
|
|
|
|
},
|
|
|
|
date: {
|
2024-08-22 11:09:30 +00:00
|
|
|
type: String,
|
2024-08-20 17:18:34 +00:00
|
|
|
default: ""
|
|
|
|
},
|
|
|
|
state: {
|
|
|
|
type: String,
|
|
|
|
default: ""
|
|
|
|
},
|
|
|
|
status: {
|
|
|
|
type: String,
|
|
|
|
default: ""
|
|
|
|
},
|
|
|
|
vehicle: {
|
|
|
|
type: mongoose.Schema.ObjectId,
|
|
|
|
ref: 'vehicle'
|
|
|
|
},
|
|
|
|
createdBy: {
|
|
|
|
type: mongoose.Schema.ObjectId,
|
|
|
|
ref: 'user'
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
{
|
|
|
|
timestamps: true
|
|
|
|
})
|
|
|
|
|
|
|
|
module.exports=mongoose.model('problem',schema)
|