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

+50
View File
@@ -0,0 +1,50 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using HelpDesk.Models.Enums;
namespace HelpDesk.Models.Entities;
[Table("users")]
public class User
{
[Key]
public Guid Id { get; set; }
[Required]
[MaxLength(100)]
public string FirstName { get; set; } = string.Empty;
[Required]
[MaxLength(100)]
public string LastName { get; set; } = string.Empty;
[Required]
[MaxLength(256)]
public string Email { get; set; } = string.Empty;
[Required]
[MaxLength(500)]
public string PasswordHash { get; set; } = string.Empty;
[Required]
[MaxLength(50)]
public UserRole Role { get; set; } = UserRole.Customer;
public bool IsActive { get; set; } = true;
[MaxLength(50)]
public string? PhoneNumber { get; set; }
[MaxLength(500)]
public string? AvatarUrl { get; set; }
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
// Navigation
public ICollection<Ticket> RequestedTickets { get; set; } = new List<Ticket>();
public ICollection<Ticket> AssignedTickets { get; set; } = new List<Ticket>();
public ICollection<TicketComment> Comments { get; set; } = new List<TicketComment>();
public ICollection<KnowledgeBaseArticle> Articles { get; set; } = new List<KnowledgeBaseArticle>();
public ICollection<ActivityLog> ActivityLogs { get; set; } = new List<ActivityLog>();
}