14 lines
326 B
Python
14 lines
326 B
Python
from sqlalchemy import BIGINT
|
|
from sqlalchemy.orm import Mapped, mapped_column
|
|
|
|
from db.base import Base
|
|
|
|
|
|
class User(Base):
|
|
__tablename__ = "users"
|
|
|
|
id: Mapped[int] = mapped_column(
|
|
BIGINT, nullable=False, unique=True, primary_key=True
|
|
)
|
|
referal_id: Mapped[int] = mapped_column(BIGINT, nullable=True)
|