Files
helpdesk/backend/HelpDesk.Models/DTOs/KnowledgeBaseDtos.cs
T

50 lines
1.4 KiB
C#

namespace HelpDesk.Models.DTOs;
public class ArticleDto
{
public Guid Id { get; set; }
public string Title { get; set; } = string.Empty;
public string Content { get; set; } = string.Empty;
public bool IsPublished { get; set; }
public Guid CategoryId { get; set; }
public string CategoryName { get; set; } = string.Empty;
public Guid AuthorId { get; set; }
public string AuthorName { get; set; } = string.Empty;
public int ViewCount { get; set; }
public DateTime CreatedAt { get; set; }
public DateTime? UpdatedAt { get; set; }
}
public class CreateArticleRequest
{
public string Title { get; set; } = string.Empty;
public string Content { get; set; } = string.Empty;
public Guid CategoryId { get; set; }
public bool IsPublished { get; set; }
}
public class UpdateArticleRequest
{
public string? Title { get; set; }
public string? Content { get; set; }
public Guid? CategoryId { get; set; }
public bool? IsPublished { get; set; }
}
public class CategoryDto
{
public Guid Id { get; set; }
public string Name { get; set; } = string.Empty;
public string? Description { get; set; }
public int SortOrder { get; set; }
public int ArticleCount { get; set; }
public DateTime CreatedAt { get; set; }
}
public class CreateCategoryRequest
{
public string Name { get; set; } = string.Empty;
public string? Description { get; set; }
public int SortOrder { get; set; }
}