2026-09-03 10:03:15 +00:00
|
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
|
|
|
|
|
|
/// Article shape sent to the browser — a trimmed view of
|
|
|
|
|
/// `feedsignal_core::Article`, kept separate so the wire format can evolve
|
|
|
|
|
/// independently of the storage model.
|
|
|
|
|
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
|
|
|
|
pub struct ArticleView {
|
|
|
|
|
pub id: String,
|
2026-09-03 14:28:22 +00:00
|
|
|
pub feed_id: String,
|
2026-09-03 10:03:15 +00:00
|
|
|
pub title: String,
|
|
|
|
|
pub url: String,
|
|
|
|
|
pub summary: String,
|
|
|
|
|
pub topics: Vec<String>,
|
|
|
|
|
pub final_score: Option<f32>,
|
|
|
|
|
}
|
2026-09-03 14:28:22 +00:00
|
|
|
|
|
|
|
|
/// Subscribed feed, for the sidebar's feed-navigation list.
|
|
|
|
|
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
|
|
|
|
pub struct FeedView {
|
|
|
|
|
pub id: String,
|
|
|
|
|
pub title: String,
|
|
|
|
|
pub url: String,
|
|
|
|
|
}
|