29 lines
775 B
C#
29 lines
775 B
C#
using System.ComponentModel;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace Model
|
|
{
|
|
public class Question
|
|
{
|
|
public Question()
|
|
{
|
|
Answers=new List<Answer>();
|
|
}
|
|
public int Id { get; set; }
|
|
|
|
[DisplayName("Question")]
|
|
|
|
public string? Text { get; set; }
|
|
public QuestionType Type { get; set; }
|
|
|
|
|
|
public int QuestionnaireId { get; set; }
|
|
[ForeignKey("QuestionnaireId")]
|
|
public Questionnaire? Questionnaire { get; set; }
|
|
|
|
public List<Answer> Answers { get; set; }
|
|
|
|
public bool IsActive { get; set; } = true; // Default to active
|
|
public DateTime CreatedDate { get; set; } = DateTime.UtcNow; // Default to now
|
|
}
|
|
}
|