X-Git-Url: http://these/git/?a=blobdiff_plain;f=crates%2Fdb_views_actor%2Fsrc%2Fstructs.rs;h=af328f1dfd1aca72ceb2ef92de80cff165412db4;hb=985fe24669d3fdeecc0aa76cc74dd6570cbad5c8;hp=91d40e9627ee916940158f74be99fb83fbb133c1;hpb=48f187188bce9f5fa1ac8ee09615540ee4df8540;p=lemmy.git diff --git a/crates/db_views_actor/src/structs.rs b/crates/db_views_actor/src/structs.rs index 91d40e96..af328f1d 100644 --- a/crates/db_views_actor/src/structs.rs +++ b/crates/db_views_actor/src/structs.rs @@ -3,8 +3,8 @@ use lemmy_db_schema::{ source::{ comment::Comment, comment_reply::CommentReply, - community::CommunitySafe, - person::PersonSafe, + community::Community, + person::Person, person_mention::PersonMention, post::Post, }, @@ -14,31 +14,31 @@ use serde::{Deserialize, Serialize}; #[derive(Debug, Serialize, Deserialize, Clone)] pub struct CommunityBlockView { - pub person: PersonSafe, - pub community: CommunitySafe, + pub person: Person, + pub community: Community, } #[derive(Debug, Serialize, Deserialize, Clone)] pub struct CommunityFollowerView { - pub community: CommunitySafe, - pub follower: PersonSafe, + pub community: Community, + pub follower: Person, } #[derive(Debug, Serialize, Deserialize, Clone)] pub struct CommunityModeratorView { - pub community: CommunitySafe, - pub moderator: PersonSafe, + pub community: Community, + pub moderator: Person, } #[derive(Debug, Serialize, Deserialize, Clone)] pub struct CommunityPersonBanView { - pub community: CommunitySafe, - pub person: PersonSafe, + pub community: Community, + pub person: Person, } #[derive(Debug, Serialize, Deserialize, Clone)] pub struct CommunityView { - pub community: CommunitySafe, + pub community: Community, pub subscribed: SubscribedType, pub blocked: bool, pub counts: CommunityAggregates, @@ -46,18 +46,18 @@ pub struct CommunityView { #[derive(Debug, Serialize, Deserialize, Clone)] pub struct PersonBlockView { - pub person: PersonSafe, - pub target: PersonSafe, + pub person: Person, + pub target: Person, } #[derive(Debug, PartialEq, Eq, Serialize, Deserialize, Clone)] pub struct PersonMentionView { pub person_mention: PersonMention, pub comment: Comment, - pub creator: PersonSafe, + pub creator: Person, pub post: Post, - pub community: CommunitySafe, - pub recipient: PersonSafe, + pub community: Community, + pub recipient: Person, pub counts: CommentAggregates, pub creator_banned_from_community: bool, // Left Join to CommunityPersonBan pub subscribed: SubscribedType, // Left join to CommunityFollower @@ -70,10 +70,10 @@ pub struct PersonMentionView { pub struct CommentReplyView { pub comment_reply: CommentReply, pub comment: Comment, - pub creator: PersonSafe, + pub creator: Person, pub post: Post, - pub community: CommunitySafe, - pub recipient: PersonSafe, + pub community: Community, + pub recipient: Person, pub counts: CommentAggregates, pub creator_banned_from_community: bool, // Left Join to CommunityPersonBan pub subscribed: SubscribedType, // Left join to CommunityFollower @@ -83,7 +83,7 @@ pub struct CommentReplyView { } #[derive(Debug, Serialize, Deserialize, Clone)] -pub struct PersonViewSafe { - pub person: PersonSafe, +pub struct PersonView { + pub person: Person, pub counts: PersonAggregates, }