Document in the DoD that data-model structs (domain models, query row types, DTOs/views) belong in a crate's models.rs rather than the file that produces/consumes them, once used outside that function - matching the existing crates/core/src/models.rs pattern. Component- local structs (Props, Styles, context) are exempt. Apply it to db: move RankedArticleRow out of articles.rs into a new crates/db/src/models.rs.
10 lines
261 B
Rust
10 lines
261 B
Rust
/// One row of [`crate::Db::list_ranked_articles`].
|
|
pub struct RankedArticleRow {
|
|
pub id: String,
|
|
pub feed_id: String,
|
|
pub title: String,
|
|
pub url: String,
|
|
pub summary: String,
|
|
pub topics: Vec<String>,
|
|
pub final_score: Option<f32>,
|
|
}
|