calendar-bot/event.py

17 lines
478 B
Python
Raw Normal View History

2023-08-17 21:28:28 +02:00
import datetime
class Event:
def __init__(self, id: int, time: datetime.datetime, name: str, location: str, organizer: str, description: str):
2023-08-17 21:28:28 +02:00
self.id = id
self.time = time
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.time}, {self.name})'