From 69e67d049411ceb5c839386b020ce2c77ffc2847 Mon Sep 17 00:00:00 2001 From: l3wdfut4pwr Date: Thu, 2 Apr 2026 08:39:42 +0300 Subject: minor improvements --- app/models/user.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/models') diff --git a/app/models/user.py b/app/models/user.py index 76ba3f9..8dbe419 100644 --- a/app/models/user.py +++ b/app/models/user.py @@ -17,7 +17,7 @@ class User(Base): id: Mapped[int] = mapped_column(Integer, primary_key=True) username: Mapped[str] = mapped_column(String(20), unique=True, nullable=False) password: Mapped[str | None] = mapped_column(String(255), nullable=True) - email: Mapped[str | None] = mapped_column(String(120), unique=True, nullable=True) + email: Mapped[str] = mapped_column(String(120), unique=True, nullable=False) google_id: Mapped[str | None] = mapped_column( String(255), unique=True, nullable=True ) @@ -26,6 +26,7 @@ class User(Base): premium: Mapped[bool] = mapped_column(Boolean, default=False, nullable=False) is_banned: Mapped[bool] = mapped_column(Boolean, default=False, nullable=False) is_moderator: Mapped[bool] = mapped_column(Boolean, default=False, nullable=False) + token_version: Mapped[int] = mapped_column(Integer, default=0, nullable=False) @classmethod async def get_user_by_email( -- cgit v1.3-3-g829e