Archived
generated from imcompiling/discord-bot-template
21 lines
667 B
Python
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))
|