diff options
Autocommit at 02.05.2022 @ 20:25
3 files changed, 20 insertions, 3 deletions
| -rw-r--r-- | src/EventSystem/Event.cpp | 7 | ||||
| -rw-r--r-- | src/EventSystem/Event.h | 8 | ||||
| -rw-r--r-- | src/EventSystem/StatusCodes.h | 8 |
diff --git a/src/EventSystem/Event.cpp b/src/EventSystem/Event.cpp new file mode 100644 index 0000000..e75e3fa --- /dev/null +++ b/src/EventSystem/Event.cpp @@ -0,0 +1,7 @@ +#include "Event.h" + +Event::Event() : Event(nullptr, "", "") {} + +Event::Event(const Hall* hall, String name, DateTime time) { + this->hall = hall; +} diff --git a/src/EventSystem/Event.h b/src/EventSystem/Event.h index 81931d0..327de3b 100644 --- a/src/EventSystem/Event.h +++ b/src/EventSystem/Event.h @@ -20,9 +20,11 @@ public: Event(); Event(const Hall* hall, String name, DateTime time); - StatusCode reserveTicket(); - StatusCode cancelReservation(); - StatusCode buyReservation(); + StatusCode reserveTicket(const Ticket& ticket, const char* password, const char* note); + + StatusCode cancelReservation(const Ticket& ticket); + + StatusCode buyReservation(const Reservation& reservation, const char* password); }; #endif diff --git a/src/EventSystem/StatusCodes.h b/src/EventSystem/StatusCodes.h index f60874a..15363cc 100644 --- a/src/EventSystem/StatusCodes.h +++ b/src/EventSystem/StatusCodes.h @@ -4,10 +4,18 @@ enum StatusCode { Ok, + + W_TicketNotReserved, + + E_Generic, E_DoesntExist, E_EventWillOverlap, + + E_TicketAlreadyBought, + E_TicketAlreadyReserved, + E_WrongTicketPassword, }; #endif |
