moment/harmonyqml/backend/model/items.py

27 lines
577 B
Python
Raw Normal View History

# Copyright 2019 miruka
# This file is part of harmonyqml, licensed under GPLv3.
2019-04-15 06:12:07 +10:00
from typing import Dict, List, NamedTuple, Optional
from PyQt5.QtCore import QDateTime
class User(NamedTuple):
user_id: str
display_name: str
avatar_url: Optional[str] = None
status_message: Optional[str] = None
class Room(NamedTuple):
2019-04-15 06:12:07 +10:00
room_id: str
display_name: Optional[str]
description: str = ""
typing_users: List[str] = []
2019-04-15 02:56:30 +10:00
class RoomEvent(NamedTuple):
type: str
date_time: QDateTime
dict: Dict[str, str]