This repository has been archived on 2025-04-28. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
off-cooldown-bot/database/models.py
T

21 lines
667 B
Python

"""File holds all model definitions of SQL tables."""
from sqlalchemy.dialects.mysql import BIGINT, SMALLINT
from sqlmodel import Column, Field, SQLModel
class UserBirthday(SQLModel, table=True):
"""
Represents a user's birthday.
Attributes:
user_id: The user's discord id. Primary key.
month: The month the user was born.
day: The day the user was born.
"""
user_id: int = Field(sa_column=Column(BIGINT(unsigned=True), primary_key=True, nullable=False))
month: int = Field(sa_column=Column(SMALLINT(unsigned=True), nullable=False))
day: int = Field(sa_column=Column(SMALLINT(unsigned=True), nullable=False))