first commit
This commit is contained in:
@@ -0,0 +1,159 @@
|
||||
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<String>,
|
||||
pub description: Option<String>,
|
||||
pub status: String,
|
||||
pub videos_count: i64,
|
||||
pub interviewees_count: i64,
|
||||
pub last_synced_at: Option<DateTime<Utc>>,
|
||||
pub created_at: DateTime<Utc>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct PodcastDiscoveryView {
|
||||
pub id: String,
|
||||
pub name: String,
|
||||
pub url: String,
|
||||
pub logo_url: Option<String>,
|
||||
pub description: String,
|
||||
pub subscribers_text: Option<String>,
|
||||
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<String>,
|
||||
pub brand_name: Option<String>,
|
||||
pub avatar_url: Option<String>,
|
||||
pub category: String,
|
||||
pub professional_summary: String,
|
||||
pub public_bio: String,
|
||||
pub profession: Option<String>,
|
||||
pub content_type: Option<String>,
|
||||
pub audience: Option<String>,
|
||||
pub status: String,
|
||||
pub appearances_count: i64,
|
||||
pub contacts_count: i64,
|
||||
pub confidence: f64,
|
||||
pub last_enriched_at: Option<DateTime<Utc>>,
|
||||
pub created_at: DateTime<Utc>,
|
||||
}
|
||||
|
||||
#[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<String>,
|
||||
#[serde(rename = "type")]
|
||||
pub contact_type: String,
|
||||
pub value: String,
|
||||
pub relationship: String,
|
||||
pub label: Option<String>,
|
||||
pub status: String,
|
||||
pub confidence: f64,
|
||||
pub source_name: String,
|
||||
pub source_url: String,
|
||||
pub last_verified_at: Option<DateTime<Utc>>,
|
||||
pub created_at: DateTime<Utc>,
|
||||
}
|
||||
|
||||
#[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<String>,
|
||||
pub errors_count: i64,
|
||||
pub estimated_cost: Option<f64>,
|
||||
pub started_at: Option<DateTime<Utc>>,
|
||||
pub finished_at: Option<DateTime<Utc>>,
|
||||
pub created_at: DateTime<Utc>,
|
||||
}
|
||||
|
||||
#[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<String>,
|
||||
pub source_url: Option<String>,
|
||||
pub created_at: DateTime<Utc>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct DashboardView {
|
||||
pub metrics: DashboardMetrics,
|
||||
pub changes: DashboardChanges,
|
||||
pub contact_distribution: Vec<ContactDistribution>,
|
||||
pub recent_runs: Vec<ExecutionRunView>,
|
||||
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,
|
||||
}
|
||||
Reference in New Issue
Block a user