erp-platform/api/src/Kurs.Platform.Application.Contracts/Blog/BlogPostDto.cs

94 lines
2.4 KiB
C#
Raw Normal View History

2025-06-19 14:51:10 +00:00
using System;
using System.Collections.Generic;
using Volo.Abp.Application.Dtos;
2025-08-11 06:34:44 +00:00
namespace Kurs.Platform.Blog;
public class BlogPostDto : FullAuditedEntityDto<Guid>
2025-06-19 14:51:10 +00:00
{
2025-08-11 06:34:44 +00:00
public Guid? TenantId { get; set; }
public string Title { get; set; }
public string Slug { get; set; }
public string ContentTr { get; set; }
public string ContentEn { get; set; }
public string Summary { get; set; }
public string CoverImage { get; set; }
public Guid CategoryId { get; set; }
public BlogCategoryDto Category { get; set; }
public AuthorDto Author { get; set; }
public int ViewCount { get; set; }
public int LikeCount { get; set; }
public int CommentCount { get; set; }
public bool IsPublished { get; set; }
public DateTime? PublishedAt { get; set; }
public List<string> Tags { get; set; }
public bool IsLiked { get; set; }
public BlogPostDto()
2025-06-19 14:51:10 +00:00
{
2025-08-11 06:34:44 +00:00
Tags = [];
2025-06-19 14:51:10 +00:00
}
2025-08-11 06:34:44 +00:00
}
public class AuthorDto
{
public Guid Id { get; set; }
public string Name { get; set; }
public string Avatar { get; set; }
}
public class CreateUpdateBlogPostDto
{
public Guid? TenantId { get; set; }
public string Title { get; set; }
public string Slug { get; set; }
public string ContentTr { get; set; }
public string ContentEn { get; set; }
public string Summary { get; set; }
public string ReadTime { get; set; }
public string CoverImage { get; set; }
public Guid CategoryId { get; set; }
public List<string> Tags { get; set; }
public bool IsPublished { get; set; }
public CreateUpdateBlogPostDto()
2025-06-19 14:51:10 +00:00
{
2025-08-11 06:34:44 +00:00
Tags = [];
2025-06-19 14:51:10 +00:00
}
2025-08-11 06:34:44 +00:00
}
public class BlogPostListDto : EntityDto<Guid>
{
public Guid? TenantId { get; set; }
public string Title { get; set; }
public string Slug { get; set; }
public string Summary { get; set; }
public string ReadTime { get; set; }
public string CoverImage { get; set; }
public string ContentTr { get; set; }
public string ContentEn { get; set; }
public BlogCategoryDto Category { get; set; }
public AuthorDto Author { get; set; }
public int ViewCount { get; set; }
public int LikeCount { get; set; }
public int CommentCount { get; set; }
public bool IsPublished { get; set; }
public DateTime? PublishedAt { get; set; }
public DateTime CreationTime { get; set; }
public List<string> Tags { get; set; }
public BlogPostListDto()
2025-06-19 14:51:10 +00:00
{
2025-08-11 06:34:44 +00:00
Tags = [];
2025-06-19 14:51:10 +00:00
}
}