39 lines
606 B
Python
39 lines
606 B
Python
from .utils import redc
|
|
|
|
@redc
|
|
class Account():
|
|
mxid:str
|
|
username:str
|
|
homeserver:str
|
|
avatar_url:str=''
|
|
nickname:str=''
|
|
rooms:List[Room]=field(default_factory=list)
|
|
|
|
@redc
|
|
class Room():
|
|
id:str
|
|
name:str=''
|
|
members:List[Member]=field(default_factory=list)
|
|
parents:List[Space]=field(default_factory=list)
|
|
messages:List[Message]=field(default_factory=list)
|
|
|
|
@redc
|
|
class Space(Room):
|
|
children:List[Room]=field(default_factory=list)
|
|
|
|
@redc
|
|
class Message():
|
|
id:str
|
|
contents:str
|
|
author:Member
|
|
|
|
@redc
|
|
class User():
|
|
mxid:str
|
|
nick:str
|
|
avatar:str
|
|
|
|
@redc
|
|
class Member(User):
|
|
room_av:str
|
|
room_nick:str |