2 newtypes::{CommentId, CommentReportId, PersonId},
3 schema::comment_report,
4 source::comment::Comment,
6 use serde::{Deserialize, Serialize};
9 Identifiable, Queryable, Associations, PartialEq, Serialize, Deserialize, Debug, Clone,
11 #[belongs_to(Comment)]
12 #[table_name = "comment_report"]
13 pub struct CommentReport {
14 pub id: CommentReportId,
15 pub creator_id: PersonId,
16 pub comment_id: CommentId,
17 pub original_comment_text: String,
20 pub resolver_id: Option<PersonId>,
21 pub published: chrono::NaiveDateTime,
22 pub updated: Option<chrono::NaiveDateTime>,
25 #[derive(Insertable, AsChangeset, Clone)]
26 #[table_name = "comment_report"]
27 pub struct CommentReportForm {
28 pub creator_id: PersonId,
29 pub comment_id: CommentId,
30 pub original_comment_text: String,