Files
Ghadir/backend/Models/User.cs
2026-06-03 18:31:41 +03:30

29 lines
772 B
C#

using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace backend.Models;
public class User
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id { get; set; }
[Required]
[MaxLength(100)]
public string FullName { get; set; } = string.Empty;
[Required]
[MaxLength(50)]
public string Contact { get; set; } = string.Empty;
[Required]
[MaxLength(4)]
public string TrackingCode { get; set; } = string.Empty;
// Navigation properties
public UserQuizAttempt? QuizAttempt { get; set; }
public ICollection<UserKhatmSelection> KhatmSelections { get; set; } = new List<UserKhatmSelection>();
public UserTotalScore? TotalScore { get; set; }
}