# -*- coding: utf-8 -*-
"""管理端 — 触发器统一视图 Pydantic Schema。

需求: 4.1, 4.2
"""

from __future__ import annotations

from typing import Literal

from pydantic import BaseModel


class UnifiedTriggerItem(BaseModel):
    """统一触发器视图项"""
    id: int
    name: str
    source: Literal['biz', 'ai', 'etl']
    trigger_condition: str
    status: str
    last_run_at: str | None = None
    next_run_at: str | None = None
    last_error: str | None = None
