This commit is contained in:
David Arranz 2019-11-07 11:27:10 +01:00
parent f2ec486fd4
commit 5e759d63a8

View File

@ -63,6 +63,25 @@ const extraMethods = {
})
},
_getInscriptionByEventAndValidated: (eventId, validated) => {
return models.EventInscription.scope('defaultScope').findAll({
where: {
validated: validated,
eventId: eventId,
},
})
},
_getInscriptionByEventFromPartner: (eventId) => {
return models.EventInscription.scope('defaultScope').findAll({
where: {
eventId: eventId,
reservationId: { [Sequelize.Op.ne]: null },
},
})
},
_getInscriptionsUser: (userId) => {
return models.EventInscription.scope('includeEventAndVenue', 'includeReservation').findAll({
attributes: {