SurveyVista/Model/Question.cs
2024-03-08 11:20:36 +01:00

24 lines
636 B
C#

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Model
{
public class Question
{
public int Id { get; set; }
public string? Text { get; set; }
public QuestionType Type { get; set; }
// Foreign key for Questionnaire
public int QuestionnaireId { get; set; } // Foreign key for Questionnaire
[ForeignKey("QuestionnaireId")]
public Questionnaire? Questionnaire { get; set; }
public List<Answer>? Answers { get; set; }
}
}