fix(typing): resolve mypy errors in db.repositories.users

This commit is contained in:
Mark Paronyan committed 2026-09-29 22:02:18 +03:00
1 parent 1aaf36fc80
commit 8e96f18429
2 files changed
+13 -9

No files matched your search

+5 -2
View File
@@ -15,8 +15,11 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from datetime import datetime
from typing import Optional
from sqlalchemy import Table, Boolean, Column, Integer, String, DateTime, ForeignKey, event
from sqlalchemy.orm import relationship
from sqlalchemy.orm import Mapped, mapped_column, relationship
from .base import Base, BaseTable, generate_uuid, GUID
@@ -43,7 +46,7 @@ class User(BaseTable):
email = Column(String, unique=True, index=True)
full_name = Column(String)
hashed_password = Column(String)
last_login = Column(DateTime)
last_login: Mapped[Optional[datetime]] = mapped_column(DateTime)
token_version = Column(Integer, default=0, nullable=False, server_default="0")
is_active = Column(Boolean, default=True)
is_superadmin = Column(Boolean, default=False)