phase 4
This commit is contained in:
30
core/schema/models/profile.py
Normal file
30
core/schema/models/profile.py
Normal file
@@ -0,0 +1,30 @@
|
||||
"""
|
||||
Profile schema — source of truth for content type profiles.
|
||||
|
||||
A profile has two JSONB fields:
|
||||
- pipeline: graph topology (stages, edges, routing rules)
|
||||
- configs: per-stage config values keyed by stage name
|
||||
|
||||
Validated at read time using generated contracts (StageConfigField, PipelineConfig).
|
||||
"""
|
||||
|
||||
from dataclasses import dataclass, field
|
||||
from typing import Any, Dict
|
||||
from uuid import UUID
|
||||
|
||||
|
||||
@dataclass
|
||||
class Profile:
|
||||
"""
|
||||
A content type profile.
|
||||
|
||||
Defines what pipeline to run and how each stage is configured.
|
||||
Seed data inserted via JSON fixtures on startup.
|
||||
"""
|
||||
id: UUID
|
||||
name: str
|
||||
pipeline: Dict[str, Any] = field(default_factory=dict)
|
||||
configs: Dict[str, Any] = field(default_factory=dict)
|
||||
|
||||
|
||||
PROFILE_VIEWS = [Profile]
|
||||
Reference in New Issue
Block a user