1 use crate::{schema::post_report, source::post::Post, DbUrl, PersonId, PostId};
2 use serde::{Deserialize, Serialize};
5 Identifiable, Queryable, Associations, PartialEq, Serialize, Deserialize, Debug, Clone,
8 #[table_name = "post_report"]
9 pub struct PostReport {
11 pub creator_id: PersonId,
13 pub original_post_name: String,
14 pub original_post_url: Option<DbUrl>,
15 pub original_post_body: Option<String>,
18 pub resolver_id: Option<PersonId>,
19 pub published: chrono::NaiveDateTime,
20 pub updated: Option<chrono::NaiveDateTime>,
23 #[derive(Insertable, AsChangeset, Clone)]
24 #[table_name = "post_report"]
25 pub struct PostReportForm {
26 pub creator_id: PersonId,
28 pub original_post_name: String,
29 pub original_post_url: Option<DbUrl>,
30 pub original_post_body: Option<String>,