fix: ruff lint + format fixes in tests, ESLint fixes in frontend
This commit is contained in:
@@ -13,6 +13,7 @@ from app.database import Base
|
||||
|
||||
class UserRole(str, enum.Enum):
|
||||
"""User roles for RBAC."""
|
||||
|
||||
admin = "admin"
|
||||
verkaeufer = "verkaeufer"
|
||||
buchhaltung = "buchhaltung"
|
||||
@@ -29,13 +30,18 @@ class User(Base):
|
||||
default=uuid.uuid4,
|
||||
)
|
||||
email: Mapped[str] = mapped_column(
|
||||
String(255), unique=True, nullable=False, index=True,
|
||||
String(255),
|
||||
unique=True,
|
||||
nullable=False,
|
||||
index=True,
|
||||
)
|
||||
password_hash: Mapped[str] = mapped_column(
|
||||
String(255), nullable=False,
|
||||
String(255),
|
||||
nullable=False,
|
||||
)
|
||||
full_name: Mapped[str] = mapped_column(
|
||||
String(200), nullable=False,
|
||||
String(200),
|
||||
nullable=False,
|
||||
)
|
||||
role: Mapped[UserRole] = mapped_column(
|
||||
Enum(UserRole, name="user_role"),
|
||||
@@ -43,10 +49,14 @@ class User(Base):
|
||||
default=UserRole.verkaeufer,
|
||||
)
|
||||
language: Mapped[str] = mapped_column(
|
||||
String(5), nullable=False, default="de",
|
||||
String(5),
|
||||
nullable=False,
|
||||
default="de",
|
||||
)
|
||||
is_active: Mapped[bool] = mapped_column(
|
||||
Boolean, nullable=False, default=True,
|
||||
Boolean,
|
||||
nullable=False,
|
||||
default=True,
|
||||
)
|
||||
created_at: Mapped[datetime] = mapped_column(
|
||||
DateTime(timezone=True),
|
||||
|
||||
Reference in New Issue
Block a user