connect database
This commit is contained in:
@@ -6,16 +6,17 @@ from sqlalchemy import (
|
||||
ForeignKey,
|
||||
func,
|
||||
)
|
||||
from sqlalchemy.orm import Mapped, mapped_column
|
||||
from sqlalchemy.orm import Mapped, declarative_base, mapped_column
|
||||
|
||||
from app.db.database import Base
|
||||
Base = declarative_base()
|
||||
|
||||
|
||||
class User(Base):
|
||||
__tablename__ = "user"
|
||||
id: Mapped[int] = mapped_column(primary_key=True, autoincrement=True)
|
||||
tg_id: Mapped[int] = mapped_column(BigInteger, unique=True, nullable=False)
|
||||
fullname: Mapped[str] = mapped_column()
|
||||
tg_id: Mapped[int] = mapped_column(BigInteger)
|
||||
role: Mapped[str] = mapped_column(default="user")
|
||||
phone: Mapped[str] = mapped_column(nullable=True)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user