Implement FastAPI Temporal MVP pipeline

This commit is contained in:
Codex
2026-03-27 00:10:28 +08:00
commit cc03da8a94
52 changed files with 3619 additions and 0 deletions

83
app/domain/enums.py Normal file
View File

@@ -0,0 +1,83 @@
"""Domain enums shared across the application."""
from enum import Enum
class CustomerLevel(str, Enum):
"""Supported customer tiers."""
LOW = "low"
MID = "mid"
class ServiceMode(str, Enum):
"""Supported service delivery modes."""
AUTO_BASIC = "auto_basic"
SEMI_PRO = "semi_pro"
class OrderStatus(str, Enum):
"""Lifecycle states for an order and workflow run."""
CREATED = "created"
RUNNING = "running"
WAITING_REVIEW = "waiting_review"
SUCCEEDED = "succeeded"
FAILED = "failed"
CANCELLED = "cancelled"
class WorkflowStepName(str, Enum):
"""Canonical workflow step names."""
PREPARE_MODEL = "prepare_model"
TRYON = "tryon"
SCENE = "scene"
TEXTURE = "texture"
FACE = "face"
FUSION = "fusion"
QC = "qc"
EXPORT = "export"
REVIEW = "review"
class ReviewDecision(str, Enum):
"""Supported review decisions for the mid-end workflow."""
APPROVE = "approve"
RERUN_SCENE = "rerun_scene"
RERUN_FACE = "rerun_face"
RERUN_FUSION = "rerun_fusion"
REJECT = "reject"
class StepStatus(str, Enum):
"""Execution status of a single workflow step record."""
PENDING = "pending"
RUNNING = "running"
WAITING = "waiting"
SUCCEEDED = "succeeded"
FAILED = "failed"
class ReviewTaskStatus(str, Enum):
"""Status of a human review task."""
PENDING = "pending"
SUBMITTED = "submitted"
class AssetType(str, Enum):
"""Asset classes produced by the pipeline."""
PREPARED_MODEL = "prepared_model"
TRYON = "tryon"
SCENE = "scene"
TEXTURE = "texture"
FACE = "face"
FUSION = "fusion"
QC_CANDIDATE = "qc_candidate"
FINAL = "final"