feat/fix: Adding missing fields to branches/proposals

This commit is contained in:
Josepablo C
2024-09-28 19:16:29 -06:00
parent 4823b98d23
commit 4c28c9122b
4 changed files with 27 additions and 9 deletions

View File

@@ -10,7 +10,9 @@ const schema = new Schema({
state: { type: String },
truck_type: [{ type: String }],
description:{type: String},
address : { type: String }
address : { type: String },
type : { type : 'string' , enum : ['loading', 'unloading', 'both'] },
zipcode : { type : 'string', maxLength : 10 },
});
module.exports = mongoose.model( "branches", schema );

View File

@@ -11,11 +11,12 @@ const schema = new Schema({
comment: { type: String },
is_withdrawn: { type: Boolean, default: false },
accepted_by: { type: Schema.Types.ObjectId, ref: 'users' },
accepted_date: { type: Date },
is_withdrawn: { type: Boolean, default: false },
is_accepted: { type: Boolean, default: false },
is_completed: { type: Boolean, default: false },
createdAt: { type : Date, required : true, default : () => { return Date.now(); } }
});