feat: Simplify proposals events and add warehouse events
This commit is contained in:
@@ -39,7 +39,7 @@ const schema = new Schema({
|
||||
driver: { type: Schema.Types.ObjectId, ref: 'users' },
|
||||
posted_by: { type: Schema.Types.ObjectId, ref: 'users' }, // shipper
|
||||
posted_by_name: { type: String }, // search purpose
|
||||
bidder: { type: Schema.Types.ObjectId, ref: 'users' },
|
||||
bidder: { type: Schema.Types.ObjectId, ref: 'users' }, // who sent the proposal (carrier user)
|
||||
|
||||
shipper_warehouse : { type: Schema.Types.ObjectId, ref: 'branches' },
|
||||
|
||||
|
||||
@@ -7,11 +7,11 @@ const schema = new Schema({
|
||||
carrier: { type: Schema.Types.ObjectId, ref: 'companies' }, // who transport the load
|
||||
vehicle: { type: Schema.Types.ObjectId, ref: 'vehicles' },
|
||||
|
||||
bidder: { type: Schema.Types.ObjectId, ref: 'users' },
|
||||
bidder: { type: Schema.Types.ObjectId, ref: 'users' }, // who sends the proposal (proposal author, carrier)
|
||||
|
||||
comment: { type: String },
|
||||
|
||||
accepted_by: { type: Schema.Types.ObjectId, ref: 'users' },
|
||||
accepted_by: { type: Schema.Types.ObjectId, ref: 'users' }, // who accepts the proposal (shipper)
|
||||
accepted_date: { type: Date },
|
||||
|
||||
is_withdrawn: { type: Boolean, default: false },
|
||||
|
||||
Reference in New Issue
Block a user