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