2023-08-17 21:28:28 +02:00
|
|
|
import datetime
|
|
|
|
|
|
|
|
class Event:
|
2023-08-18 00:33:33 +02:00
|
|
|
def __init__(self, id: int, start: datetime.datetime, name: str, location: str, organizer: str, description: str):
|
2023-08-17 21:28:28 +02:00
|
|
|
self.id = id
|
2023-08-18 00:33:33 +02:00
|
|
|
self.start = start
|
2023-08-17 21:28:28 +02:00
|
|
|
self.name = name
|
|
|
|
self.location = location
|
2023-08-17 23:32:37 +02:00
|
|
|
self.organizer = organizer
|
2023-08-17 21:28:28 +02:00
|
|
|
self.description = description
|
|
|
|
|
|
|
|
def __str__(self):
|
|
|
|
return f'{self.name} ({self.id})'
|
|
|
|
|
|
|
|
def __repr__(self):
|
2023-08-18 00:33:33 +02:00
|
|
|
return f'Event({self.id}, {self.start}, {self.name})'
|