finance_query/models/corporate/news/
scraped.rs1use serde::{Deserialize, Serialize};
4
5#[derive(Debug, Clone, Serialize, Deserialize)]
7#[cfg_attr(feature = "dataframe", derive(crate::ToDataFrame))]
8#[non_exhaustive]
9pub struct News {
10 pub title: String,
12
13 pub link: String,
15
16 pub source: String,
18
19 pub img: String,
21
22 pub time: String,
24
25 pub provider_id: Option<crate::providers::Provider>,
27}
28
29impl News {
30 pub(crate) fn new(
32 title: String,
33 link: String,
34 source: String,
35 img: String,
36 time: String,
37 ) -> Self {
38 Self {
39 title,
40 link,
41 source,
42 img,
43 time,
44 provider_id: None,
45 }
46 }
47}