feat: Adding alert_list to branches/loads
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,4 +1,5 @@
|
|||||||
**/node_modules/
|
**/node_modules/
|
||||||
**/.env
|
**/.env
|
||||||
**/package-lock.json
|
**/package-lock.json
|
||||||
**/migrate.js
|
**/migrate.js
|
||||||
|
**/scripts/migrate/*
|
||||||
@@ -296,6 +296,7 @@ Returns a company object
|
|||||||
- truck_type
|
- truck_type
|
||||||
- zipcode
|
- zipcode
|
||||||
- type (unloading, loading, both)
|
- type (unloading, loading, both)
|
||||||
|
- alert_list: List of emails to notify whenever there is a change to the object.
|
||||||
- `POST /new` : Creates a new element.
|
- `POST /new` : Creates a new element.
|
||||||
- `PATCH /:id` : Updates data from specific element.
|
- `PATCH /:id` : Updates data from specific element.
|
||||||
- `DELETE /:id` : Delete element from company. Returns the element data.
|
- `DELETE /:id` : Delete element from company. Returns the element data.
|
||||||
@@ -379,6 +380,7 @@ This endpoint is part of /loads endpoint
|
|||||||
- company_name[$regex] : Regex string to find company_name
|
- company_name[$regex] : Regex string to find company_name
|
||||||
- company_name[$options] : Regex options from MongoDB filter description
|
- company_name[$options] : Regex options from MongoDB filter description
|
||||||
- $sort[ field ] : -1/1 ; Sort result by field name
|
- $sort[ field ] : -1/1 ; Sort result by field name
|
||||||
|
- alert_list: List of emails to notify whenever there is a change to the object.
|
||||||
- `GET /calendar` : Find a list of elements with any of the following fields:
|
- `GET /calendar` : Find a list of elements with any of the following fields:
|
||||||
- date[gte] : Date grater than.
|
- date[gte] : Date grater than.
|
||||||
- date[lte] : Date less than.
|
- date[lte] : Date less than.
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ const schema = new Schema({
|
|||||||
address : { type: String },
|
address : { type: String },
|
||||||
type : { type : 'string' , enum : ['loading', 'unloading', 'both'] },
|
type : { type : 'string' , enum : ['loading', 'unloading', 'both'] },
|
||||||
zipcode : { type : 'string', maxLength : 10 },
|
zipcode : { type : 'string', maxLength : 10 },
|
||||||
|
alert_list: [{ type: String, lowercase: true }],
|
||||||
});
|
});
|
||||||
|
|
||||||
module.exports = mongoose.model( "branches", schema );
|
module.exports = mongoose.model( "branches", schema );
|
||||||
|
|||||||
@@ -41,6 +41,8 @@ const schema = new Schema({
|
|||||||
posted_by_name: { type: String }, // search purpose
|
posted_by_name: { type: String }, // search purpose
|
||||||
bidder: { type: Schema.Types.ObjectId, ref: 'users' }, // who sent the proposal (carrier user)
|
bidder: { type: Schema.Types.ObjectId, ref: 'users' }, // who sent the proposal (carrier user)
|
||||||
|
|
||||||
|
alert_list: [{ type: String, lowercase: true }],
|
||||||
|
|
||||||
shipper_warehouse : { type: Schema.Types.ObjectId, ref: 'branches' },
|
shipper_warehouse : { type: Schema.Types.ObjectId, ref: 'branches' },
|
||||||
|
|
||||||
origin: address,
|
origin: address,
|
||||||
|
|||||||
Reference in New Issue
Block a user