Add: Messages model.

This commit is contained in:
2025-07-16 08:56:27 -04:00
parent e01ab64411
commit 7a59f3b453
+18
View File
@@ -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))