first commit
This commit is contained in:
37
backend/Models/QuizQuestion.cs
Normal file
37
backend/Models/QuizQuestion.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace backend.Models;
|
||||
|
||||
public class QuizQuestion
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Required]
|
||||
[MaxLength(500)]
|
||||
public string QuestionText { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[MaxLength(200)]
|
||||
public string Option1 { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[MaxLength(200)]
|
||||
public string Option2 { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[MaxLength(200)]
|
||||
public string Option3 { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[MaxLength(200)]
|
||||
public string Option4 { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
public int CorrectOption { get; set; } // 1-4
|
||||
|
||||
// Navigation
|
||||
public ICollection<UserQuizAnswer> Answers { get; set; } = new List<UserQuizAnswer>();
|
||||
}
|
||||
Reference in New Issue
Block a user