diff --git a/dakiny_bot/database/models.py b/dakiny_bot/database/models.py index 554a2b7..3522cd9 100644 --- a/dakiny_bot/database/models.py +++ b/dakiny_bot/database/models.py @@ -168,3 +168,21 @@ class Points(SQLModel, table=True): discord_member: bool = Field(sa_column=Column("DiscordMember", BOOLEAN, nullable=False)) event_points: int = Field(sa_column=Column("EventPoints", INTEGER(unsigned=True), nullable=False)) clan_points: int = Field(sa_column=Column("ClanPoints", INTEGER(unsigned=True), nullable=False)) + + +class Message(SQLModel, table=True): + """ + Table is used to map folders and files to channels and messages in discord. + + If folder name is stored in path, the corresponding id is a channel id. If the path is to a file, the id is for a + message. + + Attributes: + path: Either directory or file pathname. + id: Channel or message id depending on the path. + """ + + __tablename__: str = "Messages" + + path: str = Field(sa_column=Column("Path", primary_key=True, nullable=False), max_length=100) + id: int = Field(sa_column=Column("Id", BIGINT(unsigned=True), nullable=False))