X-Git-Url: http://these/git/?a=blobdiff_plain;f=crates%2Fdb_schema%2Fsrc%2Fsource%2Fperson.rs;h=d9d8050d1e2d8d4b0e5843868ff149169140c00d;hb=985fe24669d3fdeecc0aa76cc74dd6570cbad5c8;hp=9cbafbfce32a7ca6d49c4b88a66173b133ca5750;hpb=48f187188bce9f5fa1ac8ee09615540ee4df8540;p=lemmy.git diff --git a/crates/db_schema/src/source/person.rs b/crates/db_schema/src/source/person.rs index 9cbafbfc..d9d8050d 100644 --- a/crates/db_schema/src/source/person.rs +++ b/crates/db_schema/src/source/person.rs @@ -18,38 +18,17 @@ pub struct Person { pub actor_id: DbUrl, pub bio: Option, pub local: bool, + #[serde(skip)] pub private_key: Option, + #[serde(skip)] pub public_key: String, + #[serde(skip)] pub last_refreshed_at: chrono::NaiveDateTime, pub banner: Option, pub deleted: bool, + #[serde(skip_serializing)] pub inbox_url: DbUrl, - pub shared_inbox_url: Option, - pub matrix_user_id: Option, - pub admin: bool, - pub bot_account: bool, - pub ban_expires: Option, - pub instance_id: InstanceId, -} - -/// A safe representation of person, without the sensitive info -#[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)] -#[cfg_attr(feature = "full", derive(Queryable, Identifiable))] -#[cfg_attr(feature = "full", diesel(table_name = person))] -pub struct PersonSafe { - pub id: PersonId, - pub name: String, - pub display_name: Option, - pub avatar: Option, - pub banned: bool, - pub published: chrono::NaiveDateTime, - pub updated: Option, - pub actor_id: DbUrl, - pub bio: Option, - pub local: bool, - pub banner: Option, - pub deleted: bool, - pub inbox_url: DbUrl, + #[serde(skip)] pub shared_inbox_url: Option, pub matrix_user_id: Option, pub admin: bool,