Skip to content

Commit

Permalink
EDF: [premieroctet#79] add staff field in table schema
Browse files Browse the repository at this point in the history
  • Loading branch information
Bastien-Wappizy committed Dec 9, 2024
1 parent fae1acc commit 3f34ab9
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,16 @@ const TableSchema = new Schema({
validate: [function (value) {return value.length <= this.guest_number}, function () { return `Le nombre d'invité.e.s ne peut pas dépasser ${this.guest_number}`}],
default: []
},
staff: {
type: [{
type: Schema.Types.ObjectId,
ref: 'user',
required: true
}],
required: false,
validate: [function (value) {return value.length <= this.staff_number}, function () { return `Le nombre d'invité.e.s ne peut pas dépasser ${this.staff_number}`}],
default: []
},
}, {...schemaOptions})

/* eslint-disable prefer-arrow-callback */
Expand Down

0 comments on commit 3f34ab9

Please sign in to comment.