♻️ Move most of models to the Shared package

This commit is contained in:
2025-07-06 22:34:52 +08:00
parent cb4acbb3fc
commit 65450e8511
170 changed files with 679 additions and 101121 deletions

View File

@ -69,7 +69,7 @@ public partial class PostService(
}
public async Task<Post> PostAsync(
Account.Account user,
Shared.Models.Account user,
Post post,
List<string>? attachments = null,
List<string>? tags = null,
@ -391,7 +391,7 @@ public partial class PostService(
public async Task<bool> ModifyPostVotes(
Post post,
PostReaction reaction,
Account.Account sender,
Shared.Models.Account sender,
bool isRemoving,
bool isSelfReact
)
@ -563,7 +563,7 @@ public partial class PostService(
return posts;
}
public async Task<List<Post>> LoadInteractive(List<Post> posts, Account.Account? currentUser = null)
public async Task<List<Post>> LoadInteractive(List<Post> posts, Shared.Models.Account? currentUser = null)
{
if (posts.Count == 0) return posts;
@ -605,7 +605,7 @@ public partial class PostService(
);
}
public async Task<List<Post>> LoadPostInfo(List<Post> posts, Account.Account? currentUser = null,
public async Task<List<Post>> LoadPostInfo(List<Post> posts, Shared.Models.Account? currentUser = null,
bool truncate = false)
{
if (posts.Count == 0) return posts;
@ -619,7 +619,7 @@ public partial class PostService(
return posts;
}
public async Task<Post> LoadPostInfo(Post post, Account.Account? currentUser = null, bool truncate = false)
public async Task<Post> LoadPostInfo(Post post, Shared.Models.Account? currentUser = null, bool truncate = false)
{
// Convert single post to list, process it, then return the single post
var posts = await LoadPostInfo([post], currentUser, truncate);
@ -631,9 +631,9 @@ public static class PostQueryExtensions
{
public static IQueryable<Post> FilterWithVisibility(
this IQueryable<Post> source,
Account.Account? currentUser,
Shared.Models.Account? currentUser,
List<Guid> userFriends,
List<Publisher.Publisher> publishers,
List<Shared.Models.Publisher> publishers,
bool isListing = false
)
{