1 use crate::{schema::post_report, source::post::Post};
2 use serde::{Deserialize, Serialize};
4 #[derive(Identifiable, Queryable, Associations, PartialEq, Serialize, Deserialize, Debug, Clone)]
6 #[table_name = "post_report"]
7 pub struct PostReport {
11 pub original_post_name: String,
12 pub original_post_url: Option<String>,
13 pub original_post_body: Option<String>,
16 pub resolver_id: Option<i32>,
17 pub published: chrono::NaiveDateTime,
18 pub updated: Option<chrono::NaiveDateTime>,
21 #[derive(Insertable, AsChangeset, Clone)]
22 #[table_name = "post_report"]
23 pub struct PostReportForm {
26 pub original_post_name: String,
27 pub original_post_url: Option<String>,
28 pub original_post_body: Option<String>,