Add: UserBirthday model.
This commit is contained in:
@@ -115,3 +115,19 @@ class Vote(SQLModel, table=True):
|
||||
|
||||
election: ElectionInformation | None = Relationship(back_populates="votes")
|
||||
council_member: CouncilMember | None = Relationship(back_populates="votes")
|
||||
|
||||
|
||||
class UserBirthday(SQLModel, table=True):
|
||||
"""
|
||||
Represents a user's birth month and day.
|
||||
|
||||
Attributes:
|
||||
id: User's discord id.
|
||||
birthday: Month/day that is a user's birthday.
|
||||
"""
|
||||
|
||||
id: int = Field(sa_column=Column("UserId", BIGINT(unsigned=True), primary_key=True, nullable=False))
|
||||
|
||||
# TODO(imcompiling): split into month and day. Also relies on Alembic migration.
|
||||
# https://gitea.cheezers.org/imcompiling/dakiny-bot/issues/93
|
||||
birthday: str = Field(sa_column=Column("Birthday", VARCHAR, nullable=False), max_length=5)
|
||||
|
||||
Reference in New Issue
Block a user