diff --git a/backend/web/server/plugins/entreprisedufutur/schemas/TableSchema.js b/backend/web/server/plugins/entreprisedufutur/schemas/TableSchema.js index 2c243e166d..52504a6835 100644 --- a/backend/web/server/plugins/entreprisedufutur/schemas/TableSchema.js +++ b/backend/web/server/plugins/entreprisedufutur/schemas/TableSchema.js @@ -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 */