forked from MDCPS/DamageAssessment_Backend
Copy from old Repository
This commit is contained in:
20
DamageAssesmentApi/DamageAssesment.Api.Answers/Db/Answer.cs
Normal file
20
DamageAssesmentApi/DamageAssesment.Api.Answers/Db/Answer.cs
Normal file
@ -0,0 +1,20 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace DamageAssesment.Api.Answers.Db
|
||||
{
|
||||
public class Answer
|
||||
{
|
||||
[Key]
|
||||
public int Id { get; set; }
|
||||
[ForeignKey("Question")]
|
||||
public int QuestionId { get; set; }
|
||||
|
||||
[StringLength(250)]
|
||||
public string AnswerText { get; set; }
|
||||
public string Comment { get; set; }
|
||||
[ForeignKey("SurveyResponse")]
|
||||
public int? SurveyResponseId { get; set; }
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace DamageAssesment.Api.Answers.Db
|
||||
{
|
||||
public class AnswerDbContext:DbContext
|
||||
{
|
||||
|
||||
public AnswerDbContext(DbContextOptions options):base(options)
|
||||
{
|
||||
|
||||
}
|
||||
public DbSet<Db.Answer> Answers { get; set; }
|
||||
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user