29 lines
742 B
C#
29 lines
742 B
C#
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace Back.Data.Models
|
|
{
|
|
public class QuestionCategory
|
|
{
|
|
public int ID { get; set; }
|
|
public string Title { get; set; }
|
|
|
|
#region Navigation
|
|
public virtual ICollection<Question> questions { get; set; }
|
|
#endregion
|
|
}
|
|
public class Question
|
|
{
|
|
public int ID { get; set; }
|
|
public int QuestionCategoryID { get; set; }
|
|
public string Title { get; set; }
|
|
public string Answer { get; set; }
|
|
public bool Status { get; set; }
|
|
|
|
#region Navigation
|
|
[ForeignKey("QuestionCategoryID")]
|
|
public virtual QuestionCategory questionCategory { get; set; }
|
|
#endregion
|
|
|
|
}
|
|
}
|