X-Git-Url: http://these/git/?a=blobdiff_plain;f=crates%2Fdb_schema%2Fsrc%2Fsource%2Flocal_user.rs;h=c38a5ac640558e6047532a1d502345dcdd18dace;hb=985fe24669d3fdeecc0aa76cc74dd6570cbad5c8;hp=37a559bc6da011d66c0d06098e6a70dd653a30d5;hpb=48f187188bce9f5fa1ac8ee09615540ee4df8540;p=lemmy.git diff --git a/crates/db_schema/src/source/local_user.rs b/crates/db_schema/src/source/local_user.rs index 37a559bc..c38a5ac6 100644 --- a/crates/db_schema/src/source/local_user.rs +++ b/crates/db_schema/src/source/local_user.rs @@ -10,6 +10,7 @@ use typed_builder::TypedBuilder; pub struct LocalUser { pub id: LocalUserId, pub person_id: PersonId, + #[serde(skip)] pub password_encrypted: String, pub email: Option, pub show_nsfw: bool, @@ -28,30 +29,6 @@ pub struct LocalUser { pub accepted_application: bool, } -/// A local user view that removes password encrypted -#[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)] -#[cfg_attr(feature = "full", derive(Queryable, Identifiable))] -#[cfg_attr(feature = "full", diesel(table_name = local_user))] -pub struct LocalUserSettings { - pub id: LocalUserId, - pub person_id: PersonId, - pub email: Option, - pub show_nsfw: bool, - pub theme: String, - pub default_sort_type: i16, - pub default_listing_type: i16, - pub interface_language: String, - pub show_avatars: bool, - pub send_notifications_to_email: bool, - pub validator_time: chrono::NaiveDateTime, - pub show_bot_accounts: bool, - pub show_scores: bool, - pub show_read_posts: bool, - pub show_new_post_notifs: bool, - pub email_verified: bool, - pub accepted_application: bool, -} - #[derive(Clone, TypedBuilder)] #[builder(field_defaults(default))] #[cfg_attr(feature = "full", derive(Insertable))]