]> Untitled Git - lemmy.git/blob - lemmy_db_schema/src/source/post_report.rs
remove timing files added by accident
[lemmy.git] / lemmy_db_schema / src / source / post_report.rs
1 use crate::{schema::post_report, source::post::Post};
2 use serde::{Deserialize, Serialize};
3
4 #[derive(Identifiable, Queryable, Associations, PartialEq, Serialize, Deserialize, Debug, Clone)]
5 #[belongs_to(Post)]
6 #[table_name = "post_report"]
7 pub struct PostReport {
8   pub id: i32,
9   pub creator_id: i32,
10   pub post_id: i32,
11   pub original_post_name: String,
12   pub original_post_url: Option<String>,
13   pub original_post_body: Option<String>,
14   pub reason: String,
15   pub resolved: bool,
16   pub resolver_id: Option<i32>,
17   pub published: chrono::NaiveDateTime,
18   pub updated: Option<chrono::NaiveDateTime>,
19 }
20
21 #[derive(Insertable, AsChangeset, Clone)]
22 #[table_name = "post_report"]
23 pub struct PostReportForm {
24   pub creator_id: i32,
25   pub post_id: i32,
26   pub original_post_name: String,
27   pub original_post_url: Option<String>,
28   pub original_post_body: Option<String>,
29   pub reason: String,
30 }