using Femto.Common.Domain; using Femto.Modules.Blog.Application.Queries.GetPosts.Dto; namespace Femto.Modules.Blog.Application.Queries.GetPosts; /// /// Get posts in reverse chronological order /// /// public record GetPostsQuery(Guid? CurrentUserId) : IQuery { /// /// Id of the specific post to load. If specified, After and Amount are ignored /// public Guid? PostId { get; } /// /// If specified, loads posts from after the given Id. Used for paging /// public Guid? After { get; init; } public int Amount { get; init; } = 20; public Guid? AuthorId { get; init; } public string? Author { get; init; } public GetPostsQuery(Guid postId, Guid? currentUserId) : this(currentUserId) { this.PostId = postId; } }