feat(validation): complete validation editor and master data modules
This commit is contained in:
parent
2b5c765e41
commit
f73a24df13
73 changed files with 10194 additions and 0 deletions
25
validation-suite/backend/mercury/app/models/user.py
Normal file
25
validation-suite/backend/mercury/app/models/user.py
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import enum
|
||||
|
||||
from sqlalchemy import Boolean, Enum, String
|
||||
from sqlalchemy.orm import Mapped, mapped_column
|
||||
|
||||
from app.db.base import Base, TimestampMixin, UUIDMixin
|
||||
|
||||
|
||||
class UserRole(str, enum.Enum):
|
||||
admin = "admin"
|
||||
employee = "employee"
|
||||
auditor = "auditor"
|
||||
|
||||
|
||||
class User(Base, UUIDMixin, TimestampMixin):
|
||||
__tablename__ = "users"
|
||||
|
||||
email: Mapped[str] = mapped_column(String(255), unique=True, index=True)
|
||||
full_name: Mapped[str] = mapped_column(String(160))
|
||||
role: Mapped[UserRole] = mapped_column(Enum(UserRole), default=UserRole.employee)
|
||||
password_hash: Mapped[str] = mapped_column(String(255))
|
||||
is_active: Mapped[bool] = mapped_column(Boolean, default=True)
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue