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