25 lines
805 B
Python
25 lines
805 B
Python
"""
|
|
Database layer.
|
|
|
|
tables.py — SQLModel table definitions (generated by modelgen, don't edit)
|
|
domain files — session-first query functions for non-trivial operations
|
|
|
|
Basic CRUD (create, get, update, delete) goes directly through the session:
|
|
session.add(Job(...))
|
|
session.get(Job, id)
|
|
session.get(Job, id); setattr(...); session.commit()
|
|
session.delete(obj); session.commit()
|
|
"""
|
|
|
|
from .connection import get_session, create_tables
|
|
|
|
from .models import MediaAsset, Job, Timeline, Checkpoint, Brand
|
|
|
|
from .assets import list_assets, get_asset_filenames
|
|
from .job import list_jobs
|
|
from .checkpoint import (
|
|
get_latest_checkpoint, get_root_checkpoint,
|
|
list_checkpoints, list_scenarios,
|
|
)
|
|
from .brand import get_or_create_brand, find_brand_by_text, list_brands, record_airing
|