21 lines
423 B
Python
21 lines
423 B
Python
from __future__ import annotations
|
|
|
|
from datetime import datetime, timezone
|
|
from enum import Enum
|
|
import uuid
|
|
|
|
|
|
def utc_now_iso() -> str:
|
|
return datetime.now(tz=timezone.utc).replace(microsecond=0).isoformat()
|
|
|
|
|
|
def new_id(prefix: str) -> str:
|
|
return f"{prefix}_{uuid.uuid4().hex[:10]}"
|
|
|
|
|
|
class Role(str, Enum):
|
|
ADMIN = "admin"
|
|
SUPERVISOR = "supervisor"
|
|
OPERATOR = "operator"
|
|
ANALYST = "analyst"
|