use sqlalchemy pattern
This commit is contained in:
@@ -25,28 +25,25 @@ from .grpc import (
|
||||
ProgressUpdate,
|
||||
WorkerStatus,
|
||||
)
|
||||
from .jobs import ChunkJob, ChunkJobStatus, JobStatus, TranscodeJob
|
||||
from .detect_jobs import (
|
||||
DetectJob, DetectJobStatus, RunType,
|
||||
from .job import (
|
||||
Job, JobStatus, RunType,
|
||||
Timeline, Checkpoint,
|
||||
BrandSource, KnownBrand, SourceBrandSighting,
|
||||
BrandSource, Brand,
|
||||
)
|
||||
from .stages import StageConfigField, StageIO, StageDefinition, STAGE_VIEWS
|
||||
from .media import AssetStatus, MediaAsset
|
||||
from .presets import BUILTIN_PRESETS, TranscodePreset
|
||||
from .detect import DETECT_VIEWS # noqa: F401 — discovered by modelgen generic loader
|
||||
from .inference import INFERENCE_VIEWS # noqa: F401 — GPU inference server API types
|
||||
from .ui_state import UI_STATE_VIEWS # noqa: F401 — UI store state types
|
||||
from .stages import StageConfigField, StageIO, StageDefinition, STAGE_VIEWS # noqa: F401
|
||||
from .views import ChunkEvent, ChunkOutputFile, PipelineStats, WorkerEvent
|
||||
from .sources import ChunkInfo, SourceJob, SourceType
|
||||
|
||||
# Core domain models - generates Django, SQLModel, TypeScript
|
||||
DATACLASSES = [MediaAsset, TranscodePreset, TranscodeJob, ChunkJob,
|
||||
DetectJob, Timeline, Checkpoint,
|
||||
KnownBrand, SourceBrandSighting]
|
||||
# Core domain models - generates SQLModel, TypeScript
|
||||
DATACLASSES = [MediaAsset, TranscodePreset,
|
||||
Job, Timeline, Checkpoint, Brand]
|
||||
|
||||
# API request/response models - generates TypeScript only (no Django)
|
||||
# WorkerStatus from grpc.py is reused here
|
||||
# API request/response models
|
||||
API_MODELS = [
|
||||
CreateJobRequest,
|
||||
UpdateAssetRequest,
|
||||
@@ -58,14 +55,13 @@ API_MODELS = [
|
||||
ChunkInfo,
|
||||
]
|
||||
|
||||
# Status enums - included in generated code
|
||||
ENUMS = [AssetStatus, JobStatus, ChunkJobStatus, DetectJobStatus, RunType, BrandSource, SourceType]
|
||||
# Status enums
|
||||
ENUMS = [AssetStatus, JobStatus, RunType, BrandSource, SourceType]
|
||||
|
||||
# View/event models - generates TypeScript for UI consumption
|
||||
# View/event models
|
||||
VIEWS = [ChunkEvent, WorkerEvent, PipelineStats, ChunkOutputFile]
|
||||
|
||||
|
||||
# gRPC messages - generates Proto
|
||||
# gRPC messages
|
||||
GRPC_MESSAGES = [
|
||||
JobRequest,
|
||||
JobResponse,
|
||||
@@ -83,18 +79,27 @@ __all__ = [
|
||||
# Models
|
||||
"MediaAsset",
|
||||
"TranscodePreset",
|
||||
"TranscodeJob",
|
||||
"ChunkJob",
|
||||
# API Models
|
||||
"Job",
|
||||
"Timeline",
|
||||
"Checkpoint",
|
||||
"KnownBrand",
|
||||
"SourceBrandSighting",
|
||||
# Enums
|
||||
"AssetStatus",
|
||||
"JobStatus",
|
||||
"RunType",
|
||||
"BrandSource",
|
||||
"SourceType",
|
||||
# Stages
|
||||
"StageConfigField",
|
||||
"StageIO",
|
||||
"StageDefinition",
|
||||
# API
|
||||
"CreateJobRequest",
|
||||
"UpdateAssetRequest",
|
||||
"DeleteResult",
|
||||
"ScanResult",
|
||||
"SystemStatus",
|
||||
# Enums
|
||||
"AssetStatus",
|
||||
"JobStatus",
|
||||
"ChunkJobStatus",
|
||||
# gRPC
|
||||
"GRPC_SERVICE",
|
||||
"JobRequest",
|
||||
@@ -113,7 +118,6 @@ __all__ = [
|
||||
"PipelineStats",
|
||||
"ChunkOutputFile",
|
||||
# Sources
|
||||
"SourceType",
|
||||
"SourceJob",
|
||||
"ChunkInfo",
|
||||
# For generator
|
||||
|
||||
Reference in New Issue
Block a user