feat: Adding loads and load-attachments endpoints

This commit is contained in:
2023-10-06 20:01:04 -06:00
parent 0b37ea1ac1
commit d019017600
11 changed files with 257 additions and 12 deletions

View File

@@ -50,7 +50,7 @@ const schema = new Schema({
type: pointSchema,
},
categories: [{ type: Schema.Types.ObjectId, ref: 'product-categories' }],
categories: [{ type: Schema.Types.ObjectId, ref: 'productcategories' }],
product: { type: Schema.Types.ObjectId, ref: 'products' },
truck_type: { type: String },
@@ -80,7 +80,7 @@ const schema = new Schema({
loaded_date: { type: Date },
transit_date: { type: Date },
delivered_date: { type: Date },
load_status_updated: { type: Date, default: Date.now() },
load_status_updated: { type: Date, default: () => Date.now() },
notes: { type: String },
payment_term: { type: String },