Co-authored-by: Sharang Parnerkar <parnerkarsharang@gmail.com> Reviewed-on: #7
26 lines
813 B
Rust
26 lines
813 B
Rust
use serde::{Deserialize, Serialize};
|
|
|
|
/// A single news feed card representing an AI-related article.
|
|
///
|
|
/// # Fields
|
|
///
|
|
/// * `title` - Headline of the article
|
|
/// * `source` - Publishing outlet or author
|
|
/// * `summary` - Brief summary text
|
|
/// * `content` - Full content snippet from search results
|
|
/// * `category` - Display label for the search topic (e.g. "AI", "Finance")
|
|
/// * `url` - Link to the full article
|
|
/// * `thumbnail_url` - Optional thumbnail image URL
|
|
/// * `published_at` - ISO 8601 date string
|
|
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
|
pub struct NewsCard {
|
|
pub title: String,
|
|
pub source: String,
|
|
pub summary: String,
|
|
pub content: String,
|
|
pub category: String,
|
|
pub url: String,
|
|
pub thumbnail_url: Option<String>,
|
|
pub published_at: String,
|
|
}
|