feat(Countries): Adding countries endpoint
This commit is contained in:
21
lib/Models/proposals.model.js
Normal file
21
lib/Models/proposals.model.js
Normal file
@@ -0,0 +1,21 @@
|
||||
const mongoose = require('mongoose');
|
||||
const { Schema } = mongoose;
|
||||
|
||||
const schema = new Schema({
|
||||
load: { type: Schema.Types.ObjectId, ref: 'loads' },
|
||||
shipper: { type: Schema.Types.ObjectId, ref: 'companies' }, // how offers load
|
||||
carrier: { type: Schema.Types.ObjectId, ref: 'companies' }, // how transport the load
|
||||
vehicle: { type: Schema.Types.ObjectId, ref: 'vehicles' },
|
||||
|
||||
bidder: { type: Schema.Types.ObjectId, ref: 'users' },
|
||||
|
||||
comment: { type: String },
|
||||
|
||||
is_withdrawn: { type: Boolean, default: false },
|
||||
|
||||
accepted_by: { type: Schema.Types.ObjectId, ref: 'users' },
|
||||
accepted_date: { type: Date },
|
||||
is_accepted: { type: Boolean, default: false },
|
||||
});
|
||||
|
||||
module.exports = mongoose.model( "proposals", schema );
|
||||
Reference in New Issue
Block a user