using CMSMicroservice.Domain.Enums;

namespace CMSMicroservice.Application.BlogPostCQ.Queries.GetBlogPost;

public class BlogPostDto
{
    public long Id { get; set; }
    public string Title { get; set; } = string.Empty;
    public string Slug { get; set; } = string.Empty;
    public string? Summary { get; set; }
    public string HtmlContent { get; set; } = string.Empty;
    public string? FeaturedImagePath { get; set; }
    public string? FeaturedImageThumbnailPath { get; set; }
    public BlogPostStatus Status { get; set; }
    public string StatusName { get; set; } = string.Empty;
    public DateTime? PublishedAt { get; set; }
    public int ViewCount { get; set; }
    public long AuthorUserId { get; set; }
    public bool IsFeatured { get; set; }
    public int SortOrder { get; set; }
    public DateTime Created { get; set; }
    public DateTime? LastModified { get; set; }
    public List<BlogPostCategoryDto> Categories { get; set; } = new();
    public List<BlogPostTagDto> Tags { get; set; } = new();
}

public class BlogPostCategoryDto
{
    public long Id { get; set; }
    public string Title { get; set; } = string.Empty;
    public string Slug { get; set; } = string.Empty;
}

public class BlogPostTagDto
{
    public long Id { get; set; }
    public string Title { get; set; } = string.Empty;
    public string Name { get; set; } = string.Empty;
}
