2 newtypes::{DbUrl, PersonId, PostId, PostReportId},
6 use serde::{Deserialize, Serialize};
9 Identifiable, Queryable, Associations, PartialEq, Serialize, Deserialize, Debug, Clone,
12 #[table_name = "post_report"]
13 pub struct PostReport {
15 pub creator_id: PersonId,
17 pub original_post_name: String,
18 pub original_post_url: Option<DbUrl>,
19 pub original_post_body: Option<String>,
22 pub resolver_id: Option<PersonId>,
23 pub published: chrono::NaiveDateTime,
24 pub updated: Option<chrono::NaiveDateTime>,
27 #[derive(Insertable, AsChangeset, Clone)]
28 #[table_name = "post_report"]
29 pub struct PostReportForm {
30 pub creator_id: PersonId,
32 pub original_post_name: String,
33 pub original_post_url: Option<DbUrl>,
34 pub original_post_body: Option<String>,