Skip to content

Commit

Permalink
EDF: [premieroctet#157] add buyer required field to user ticket schema
Browse files Browse the repository at this point in the history
  • Loading branch information
Bastien-Wappizy committed Dec 23, 2024
1 parent a0ca61b commit 3de12e2
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ const UserTicketSchema = new Schema({
type: String,
enum: Object.keys(USERTICKET_STATUSES)
},
buyer: {
type: Schema.Types.ObjectId,
ref: 'user',
required: [true, `L'acheteur du ticket est obligatoire`]
},
}, {...schemaOptions})

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

0 comments on commit 3de12e2

Please sign in to comment.