add User return schema
This commit is contained in:
@@ -14,7 +14,6 @@ priority_enum = Enum("low", "medium", "high", "critical", name="priority_enum")
|
||||
|
||||
|
||||
class TasksORM(Base):
|
||||
|
||||
__tablename__ = "tasks"
|
||||
id: Mapped[int] = mapped_column(primary_key=True, autoincrement=True)
|
||||
user_id: Mapped[int] = mapped_column(ForeignKey("users.id"))
|
||||
|
||||
@@ -16,7 +16,9 @@ class UsersORM(Base):
|
||||
String(30), nullable=False, unique=True, index=True
|
||||
)
|
||||
hashed_password: Mapped[str] = mapped_column(String(255), nullable=False)
|
||||
email: Mapped[Optional[str]] = mapped_column(String(255), unique=True, nullable=True)
|
||||
email: Mapped[Optional[str]] = mapped_column(
|
||||
String(255), unique=True, nullable=True
|
||||
)
|
||||
telegram_id: Mapped[Optional[int]] = mapped_column(BigInteger, nullable=True)
|
||||
avatar_path: Mapped[Optional[str]] = mapped_column(String(255), nullable=True)
|
||||
is_active: Mapped[bool] = mapped_column(Boolean, nullable=False, default=True)
|
||||
|
||||
Reference in New Issue
Block a user