add authorization and admin role
This commit is contained in:
@ -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"
|
||||
|
||||
|
Reference in New Issue
Block a user