calendar-bot/event.py

17 lines
482 B
Python
Raw Normal View History

2023-08-17 21:28:28 +02:00
import datetime
class Event:
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
self.start = start
2023-08-17 21:28:28 +02:00
self.name = name
self.location = location
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):
return f'Event({self.id}, {self.start}, {self.name})'