add authorization and admin role

This commit is contained in:
2025-07-13 17:19:52 +05:00
parent e328fd4100
commit b6901ddf7b
9 changed files with 221 additions and 6 deletions

View File

@ -17,6 +17,14 @@ class PowerRatio(enum.Enum):
ELECTRIC_GREATER = "ЭД > ДВС"
NA = "не применимо"
class Admin(Base):
__tablename__ = "admins"
id = Column(Integer, primary_key=True, index=True)
username = Column(String, unique=True, index=True)
hashed_password = Column(String)
is_active = Column(Boolean, default=True)
class Car(Base):
__tablename__ = "cars"