Response.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. namespace Application.Features.Api.Feed.GetPost;
  2. public sealed class Response
  3. {
  4. public int PostID { get; init; }
  5. public string? AuthorSID { get; init; }
  6. public string? AuthorName { get; init; }
  7. public string? AuthorThumb { get; init; }
  8. public bool IsCreator { get; init; }
  9. public string? ChannelSID { get; init; }
  10. public required string Content { get; init; }
  11. public required IReadOnlyList<ImageItem> Images { get; init; }
  12. public required IReadOnlyList<string> Medias { get; init; }
  13. public int Likes { get; init; }
  14. public int Comments { get; init; }
  15. public int Bookmarks { get; init; }
  16. public int Views { get; init; }
  17. public required IReadOnlyList<TagRef> Tags { get; init; }
  18. public DateTime CreatedAt { get; init; }
  19. public bool HasLike { get; init; }
  20. public bool HasBookmark { get; init; }
  21. public bool IsOwner { get; init; }
  22. public sealed class ImageItem
  23. {
  24. public required string Url { get; init; }
  25. public short? Width { get; init; }
  26. public short? Height { get; init; }
  27. }
  28. public sealed class TagRef
  29. {
  30. public required string Name { get; init; }
  31. public required string Slug { get; init; }
  32. }
  33. }