use chrono::{DateTime, Utc}; use serde::Serialize; use uuid::Uuid; #[derive(Debug, Clone, Serialize)] #[serde(rename_all = "camelCase")] pub struct PodcastView { pub id: Uuid, pub youtube_channel_id: String, pub name: String, pub url: String, pub logo_url: Option, pub description: Option, pub status: String, pub videos_count: i64, pub interviewees_count: i64, pub last_synced_at: Option>, pub created_at: DateTime, } #[derive(Debug, Clone, Serialize)] #[serde(rename_all = "camelCase")] pub struct PodcastDiscoveryView { pub id: String, pub name: String, pub url: String, pub logo_url: Option, pub description: String, pub subscribers_text: Option, pub already_added: bool, } #[derive(Debug, Clone, Serialize)] #[serde(rename_all = "camelCase")] pub struct IntervieweeView { pub id: Uuid, pub display_name: String, pub real_name: Option, pub brand_name: Option, pub avatar_url: Option, pub category: String, pub professional_summary: String, pub public_bio: String, pub profession: Option, pub content_type: Option, pub audience: Option, pub status: String, pub appearances_count: i64, pub contacts_count: i64, pub confidence: f64, pub last_enriched_at: Option>, pub created_at: DateTime, } #[derive(Debug, Clone, Serialize)] #[serde(rename_all = "camelCase")] pub struct ContactView { pub id: Uuid, pub interviewee_id: Uuid, pub interviewee_name: String, pub avatar_url: Option, #[serde(rename = "type")] pub contact_type: String, pub value: String, pub relationship: String, pub label: Option, pub status: String, pub confidence: f64, pub source_name: String, pub source_url: String, pub last_verified_at: Option>, pub created_at: DateTime, } #[derive(Debug, Clone, Serialize)] #[serde(rename_all = "camelCase")] pub struct ExecutionRunView { pub id: Uuid, pub name: String, #[serde(rename = "type")] pub run_type: String, pub status: String, pub stage: String, pub progress: i64, pub processed: i64, pub total: i64, pub current_target: Option, pub errors_count: i64, pub estimated_cost: Option, pub started_at: Option>, pub finished_at: Option>, pub created_at: DateTime, } #[derive(Debug, Clone, Serialize)] #[serde(rename_all = "camelCase")] pub struct ReviewView { pub id: Uuid, pub kind: String, pub priority: String, pub title: String, pub subject: String, pub summary: String, pub proposed_value: String, pub evidence: String, pub confidence: f64, pub source_name: Option, pub source_url: Option, pub created_at: DateTime, } #[derive(Debug, Clone, Serialize)] #[serde(rename_all = "camelCase")] pub struct DashboardView { pub metrics: DashboardMetrics, pub changes: DashboardChanges, pub contact_distribution: Vec, pub recent_runs: Vec, pub success_rate: f64, pub contacts_this_week: i64, } #[derive(Debug, Clone, Serialize)] #[serde(rename_all = "camelCase")] pub struct DashboardMetrics { pub podcasts: i64, pub interviewees: i64, pub contacts: i64, pub active_runs: i64, pub pending_reviews: i64, } #[derive(Debug, Clone, Serialize)] pub struct DashboardChanges { pub podcasts: i64, pub interviewees: i64, pub contacts: i64, } #[derive(Debug, Clone, Serialize)] #[serde(rename_all = "camelCase")] pub struct AiUsageView { pub month: String, pub spent_usd: f64, pub limit_usd: f64, pub remaining_usd: f64, pub percent_used: f64, pub input_cost_per_million_usd: f64, pub output_cost_per_million_usd: f64, pub limit_exceeded: bool, } #[derive(Debug, Clone, Serialize)] pub struct ContactDistribution { #[serde(rename = "type")] pub contact_type: String, pub count: i64, pub percentage: f64, }