diff options
| author | l3wdfut4pwr <l3wdfut4pwr@gmail.com> | 2026-04-02 08:39:42 +0300 |
|---|---|---|
| committer | l3wdfut4pwr <l3wdfut4pwr@gmail.com> | 2026-04-02 08:39:42 +0300 |
| commit | 69e67d049411ceb5c839386b020ce2c77ffc2847 (patch) | |
| tree | 9ec561545b64b57796ef2fd5f3fbd02239965cc1 /app/models | |
| parent | 7e41576035cd9f0004255a7490e6691c6d989ff6 (diff) | |
minor improvements
Diffstat (limited to 'app/models')
| -rw-r--r-- | app/models/user.py | 3 |
1 files changed, 2 insertions, 1 deletions
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( |
