Initial commit: HelpDesk ICHN - .NET 10 backend + Next.js 16 frontend

This commit is contained in:
Nurfog committed 2026-09-10 10:20:51 -03:00
commit 359f0caf85
90 files changed
+13395

No files matched your search

+48
View File
@@ -0,0 +1,48 @@
using HelpDesk.Models.Enums;
namespace HelpDesk.Models.DTOs;
public class LoginRequest
{
public string Email { get; set; } = string.Empty;
public string Password { get; set; } = string.Empty;
}
public class RegisterRequest
{
public string Email { get; set; } = string.Empty;
public string Password { get; set; } = string.Empty;
public string FirstName { get; set; } = string.Empty;
public string LastName { get; set; } = string.Empty;
}
public class AuthResponse
{
public string Token { get; set; } = string.Empty;
public DateTime Expiration { get; set; }
public UserDto User { get; set; } = null!;
}
public class UserDto
{
public Guid Id { get; set; }
public string Email { get; set; } = string.Empty;
public string FirstName { get; set; } = string.Empty;
public string LastName { get; set; } = string.Empty;
public UserRole Role { get; set; }
public bool IsActive { get; set; }
public DateTime CreatedAt { get; set; }
public string? PhoneNumber { get; set; }
public string? AvatarUrl { get; set; }
}
public class UpdateUserRequest
{
public string? FirstName { get; set; }
public string? LastName { get; set; }
public string? Email { get; set; }
public string? PhoneNumber { get; set; }
public string? AvatarUrl { get; set; }
public UserRole? Role { get; set; }
public bool? IsActive { get; set; }
}
@@ -0,0 +1,28 @@
using HelpDesk.Models.Enums;
namespace HelpDesk.Models.DTOs;
public class DashboardStatsDto
{
public int TotalTickets { get; set; }
public int OpenTickets { get; set; }
public int InProgressTickets { get; set; }
public int PendingTickets { get; set; }
public int ResolvedTickets { get; set; }
public int ClosedTickets { get; set; }
public int CriticalTickets { get; set; }
public int HighTickets { get; set; }
public int MediumTickets { get; set; }
public int LowTickets { get; set; }
public double AverageResponseTimeMinutes { get; set; }
public double AverageResolutionTimeMinutes { get; set; }
public List<AgentWorkloadDto> AgentWorkloads { get; set; } = new();
}
public class AgentWorkloadDto
{
public Guid UserId { get; set; }
public string UserName { get; set; } = string.Empty;
public int ActiveTickets { get; set; }
public int ResolvedThisWeek { get; set; }
}
+16
View File
@@ -0,0 +1,16 @@
namespace HelpDesk.Models.DTOs;
public class GroupDto
{
public Guid Id { get; set; }
public string Name { get; set; } = string.Empty;
public string? Description { get; set; }
public bool IsActive { get; set; }
public DateTime CreatedAt { get; set; }
}
public class CreateGroupRequest
{
public string Name { get; set; } = string.Empty;
public string? Description { get; set; }
}
@@ -0,0 +1,49 @@
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; }
}
+29
View File
@@ -0,0 +1,29 @@
namespace HelpDesk.Models.DTOs;
public class SLADto
{
public Guid Id { get; set; }
public string Name { get; set; } = string.Empty;
public string? Description { get; set; }
public int ResponseTimeHours { get; set; }
public int ResolutionTimeHours { get; set; }
public bool IsActive { get; set; }
public DateTime CreatedAt { get; set; }
}
public class CreateSLARequest
{
public string Name { get; set; } = string.Empty;
public string? Description { get; set; }
public int ResponseTimeHours { get; set; }
public int ResolutionTimeHours { get; set; }
}
public class UpdateSLARequest
{
public string? Name { get; set; }
public string? Description { get; set; }
public int? ResponseTimeHours { get; set; }
public int? ResolutionTimeHours { get; set; }
public bool? IsActive { get; set; }
}
@@ -0,0 +1,86 @@
using HelpDesk.Models.Enums;
namespace HelpDesk.Models.DTOs;
public class CreateTicketRequest
{
public string Title { get; set; } = string.Empty;
public string Description { get; set; } = string.Empty;
public TicketPriority Priority { get; set; } = TicketPriority.Medium;
public Guid? GroupId { get; set; }
public Guid? SlaPolicyId { get; set; }
}
public class UpdateTicketRequest
{
public string? Title { get; set; }
public string? Description { get; set; }
public TicketPriority? Priority { get; set; }
}
public class TicketDto
{
public Guid Id { get; set; }
public string Title { get; set; } = string.Empty;
public string Description { get; set; } = string.Empty;
public TicketStatus Status { get; set; }
public TicketPriority Priority { get; set; }
public string TicketNumber { get; set; } = string.Empty;
public Guid RequesterId { get; set; }
public string RequesterName { get; set; } = string.Empty;
public Guid? AssigneeId { get; set; }
public string? AssigneeName { get; set; }
public Guid? GroupId { get; set; }
public string? GroupName { get; set; }
public Guid? SlaPolicyId { get; set; }
public string? SlaPolicyName { get; set; }
public DateTime CreatedAt { get; set; }
public DateTime? UpdatedAt { get; set; }
public DateTime? ResolvedAt { get; set; }
public int CommentCount { get; set; }
}
public class TicketListResponse
{
public List<TicketDto> Items { get; set; } = new();
public int TotalCount { get; set; }
public int Page { get; set; }
public int PageSize { get; set; }
}
public class TicketStatsDto
{
public int TotalTickets { get; set; }
public int OpenTickets { get; set; }
public int InProgressTickets { get; set; }
public int PendingTickets { get; set; }
public int ResolvedTickets { get; set; }
public int ClosedTickets { get; set; }
}
public class AddCommentRequest
{
public string Content { get; set; } = string.Empty;
public bool IsInternal { get; set; }
}
public class CommentDto
{
public Guid Id { get; set; }
public Guid TicketId { get; set; }
public Guid UserId { get; set; }
public string UserName { get; set; } = string.Empty;
public string Content { get; set; } = string.Empty;
public bool IsInternal { get; set; }
public DateTime CreatedAt { get; set; }
}
public class UpdateStatusRequest
{
public TicketStatus Status { get; set; }
}
public class AssignTicketRequest
{
public Guid? AssigneeId { get; set; }
}