fix: Fix tracking issues and remove active_load from user model
This commit is contained in:
@@ -35,8 +35,6 @@ const schema = new Schema({
|
||||
|
||||
vehicle: { type: Schema.Types.ObjectId, ref: 'vehicles' },
|
||||
|
||||
active_load: { type: Schema.Types.ObjectId, ref: 'loads' },
|
||||
|
||||
categories: [{ type: Schema.Types.ObjectId, ref: 'productcategories' }],
|
||||
user_city: [{ type: String }],
|
||||
user_state: [{ type: String }],
|
||||
|
||||
@@ -1,18 +1,6 @@
|
||||
const mongoose = require('mongoose');
|
||||
const { Schema } = mongoose;
|
||||
|
||||
const pointSchema = new Schema({
|
||||
type: {
|
||||
type: String,
|
||||
enum: ['Point'],
|
||||
required: true
|
||||
},
|
||||
coordinates: {
|
||||
type: [Number],
|
||||
required: true
|
||||
}
|
||||
});
|
||||
|
||||
const schema = new Schema({
|
||||
company: { type: Schema.Types.ObjectId, ref: 'companies', required: true }, // carrier
|
||||
company_name : { type: String, required: true },
|
||||
@@ -50,7 +38,6 @@ const schema = new Schema({
|
||||
|
||||
last_location_lat: { type: String },
|
||||
last_location_lng: { type: String },
|
||||
last_location_geo: { type: pointSchema },
|
||||
last_location_time: { type: Date },
|
||||
createdAt: { type : Date, required : true, default : () => { return Date.now(); } }
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user