StarfallBot/starfall/db/schema/users.py

14 lines
393 B
Python

from sqlalchemy.orm import Mapped, mapped_column
from starfall.db import db
class User(db.Model):
id: Mapped[int] = mapped_column(primary_key=True, autoincrement=True)
email: Mapped[str] = mapped_column(unique=True)
username: Mapped[str] = mapped_column()
password: Mapped[str] = mapped_column()
def __init__(self, **kwargs) -> None:
super().__init__(**kwargs)