2 schema::{post, post_like, post_read, post_saved},
7 #[derive(Clone, Queryable, Identifiable, PartialEq, Debug, Serialize)]
12 pub url: Option<String>,
13 pub body: Option<String>,
15 pub community_id: i32,
18 pub published: chrono::NaiveDateTime,
19 pub updated: Option<chrono::NaiveDateTime>,
23 pub embed_title: Option<String>,
24 pub embed_description: Option<String>,
25 pub embed_html: Option<String>,
26 pub thumbnail_url: Option<String>,
31 #[derive(Insertable, AsChangeset)]
32 #[table_name = "post"]
35 pub url: Option<String>,
36 pub body: Option<String>,
38 pub community_id: i32,
39 pub removed: Option<bool>,
40 pub locked: Option<bool>,
41 pub published: Option<chrono::NaiveDateTime>,
42 pub updated: Option<chrono::NaiveDateTime>,
43 pub deleted: Option<bool>,
45 pub stickied: Option<bool>,
46 pub embed_title: Option<String>,
47 pub embed_description: Option<String>,
48 pub embed_html: Option<String>,
49 pub thumbnail_url: Option<String>,
50 pub ap_id: Option<Url>,
54 #[derive(Identifiable, Queryable, Associations, PartialEq, Debug)]
56 #[table_name = "post_like"]
62 pub published: chrono::NaiveDateTime,
65 #[derive(Insertable, AsChangeset, Clone)]
66 #[table_name = "post_like"]
67 pub struct PostLikeForm {
73 #[derive(Identifiable, Queryable, Associations, PartialEq, Debug)]
75 #[table_name = "post_saved"]
76 pub struct PostSaved {
80 pub published: chrono::NaiveDateTime,
83 #[derive(Insertable, AsChangeset)]
84 #[table_name = "post_saved"]
85 pub struct PostSavedForm {
90 #[derive(Identifiable, Queryable, Associations, PartialEq, Debug)]
92 #[table_name = "post_read"]
97 pub published: chrono::NaiveDateTime,
100 #[derive(Insertable, AsChangeset)]
101 #[table_name = "post_read"]
102 pub struct PostReadForm {