Skip to content

Commit

Permalink
EDF: [premieroctet#25] Add event ticket model
Browse files Browse the repository at this point in the history
  • Loading branch information
Bastien-Wappizy committed Dec 4, 2024
1 parent 82a3ecb commit 42aca9c
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions backend/web/server/models/EventTicket.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
const mongoose = require('mongoose')
const {getDataModel} = require('../../config/config')

let EventTicketSchema=null

try {
EventTicketSchema=require(`../plugins/${getDataModel()}/schemas/EventTicketSchema`)
EventTicketSchema.plugin(require('mongoose-lean-virtuals'))
}
catch(err) {
if (err.code !== 'MODULE_NOT_FOUND') {
throw err
}
}

module.exports = EventTicketSchema ? mongoose.model('eventTicket', EventTicketSchema) : null

0 comments on commit 42aca9c

Please sign in to comment.