X-Git-Url: http://these/git/?a=blobdiff_plain;f=crates%2Fdb_schema%2Fsrc%2Fsource%2Fperson_block.rs;h=e5a365b51307a1b24b9f873b3b985536bb410630;hb=c9f140742925d6da20103124b49f2b58a35fc2b8;hp=46920acbf77698bbe7ba4dc3ff6d8926362f1625;hpb=4e6409f325bca5b2727b19c24d77ffa2b59109b1;p=lemmy.git diff --git a/crates/db_schema/src/source/person_block.rs b/crates/db_schema/src/source/person_block.rs index 46920acb..e5a365b5 100644 --- a/crates/db_schema/src/source/person_block.rs +++ b/crates/db_schema/src/source/person_block.rs @@ -4,9 +4,10 @@ use serde::{Deserialize, Serialize}; #[cfg(feature = "full")] use crate::schema::person_block; -#[derive(Clone, PartialEq, Debug, Serialize, Deserialize)] +#[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)] #[cfg_attr(feature = "full", derive(Queryable, Associations, Identifiable))] -#[cfg_attr(feature = "full", table_name = "person_block")] +#[cfg_attr(feature = "full", diesel(belongs_to(crate::source::person::Person)))] +#[cfg_attr(feature = "full", diesel(table_name = person_block))] pub struct PersonBlock { pub id: PersonBlockId, pub person_id: PersonId, @@ -15,7 +16,7 @@ pub struct PersonBlock { } #[cfg_attr(feature = "full", derive(Insertable, AsChangeset))] -#[cfg_attr(feature = "full", table_name = "person_block")] +#[cfg_attr(feature = "full", diesel(table_name = person_block))] pub struct PersonBlockForm { pub person_id: PersonId, pub target_id: PersonId,