X-Git-Url: http://these/git/?a=blobdiff_plain;f=crates%2Fdb_schema%2Fsrc%2Fsource%2Fpost_report.rs;h=abee0f32f19b2c4e1277419ea48ea5635601e41d;hb=c9f140742925d6da20103124b49f2b58a35fc2b8;hp=afb3346984894354e5f6c729d9240d39820c6198;hpb=4e6409f325bca5b2727b19c24d77ffa2b59109b1;p=lemmy.git diff --git a/crates/db_schema/src/source/post_report.rs b/crates/db_schema/src/source/post_report.rs index afb33469..abee0f32 100644 --- a/crates/db_schema/src/source/post_report.rs +++ b/crates/db_schema/src/source/post_report.rs @@ -4,10 +4,10 @@ use serde::{Deserialize, Serialize}; #[cfg(feature = "full")] use crate::schema::post_report; -#[derive(PartialEq, Serialize, Deserialize, Debug, Clone)] +#[derive(PartialEq, Eq, Serialize, Deserialize, Debug, Clone)] #[cfg_attr(feature = "full", derive(Identifiable, Queryable, Associations))] -#[cfg_attr(feature = "full", belongs_to(crate::source::post::Post))] -#[cfg_attr(feature = "full", table_name = "post_report")] +#[cfg_attr(feature = "full", diesel(belongs_to(crate::source::post::Post)))] // Is this the right assoc? +#[cfg_attr(feature = "full", diesel(table_name = post_report))] pub struct PostReport { pub id: PostReportId, pub creator_id: PersonId, @@ -24,7 +24,7 @@ pub struct PostReport { #[derive(Clone)] #[cfg_attr(feature = "full", derive(Insertable, AsChangeset))] -#[cfg_attr(feature = "full", table_name = "post_report")] +#[cfg_attr(feature = "full", diesel(table_name = post_report))] pub struct PostReportForm { pub creator_id: PersonId, pub post_id: PostId,