17 lines
478 B
Python
17 lines
478 B
Python
import datetime
|
|
|
|
class Event:
|
|
def __init__(self, id: int, time: datetime.datetime, name: str, location: str, organizer: str, description: str):
|
|
self.id = id
|
|
self.time = time
|
|
self.name = name
|
|
self.location = location
|
|
self.organizer = organizer
|
|
self.description = description
|
|
|
|
def __str__(self):
|
|
return f'{self.name} ({self.id})'
|
|
|
|
def __repr__(self):
|
|
return f'Event({self.id}, {self.time}, {self.name})'
|