first commit

This commit is contained in:
2026-06-03 18:31:41 +03:30
commit 01f87cc461
71 changed files with 10802 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace backend.Models;
public class UserQuizAttempt
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id { get; set; }
[Required]
public int UserId { get; set; }
public int ParticipationPoints { get; set; }
public int CorrectAnswersCount { get; set; }
public int TotalQuizPoints { get; set; }
public DateTime CompletedAt { get; set; } = DateTime.UtcNow;
// Navigation
[ForeignKey(nameof(UserId))]
public User User { get; set; } = null!;
public ICollection<UserQuizAnswer> Answers { get; set; } = new List<UserQuizAnswer>();
}