add User return schema

This commit is contained in:
IluaAir
2025-07-13 11:41:58 +03:00
parent d27aafb4f6
commit f3030593da
12 changed files with 102 additions and 64 deletions

View File

@@ -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"))

View File

@@ -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)