forked from MDCPS/DamageAssessment_Backend
Copy from old Repository
This commit is contained in:
28
DamageAssesmentApi/DamageAssesment.Api.Surveys/Db/Survey.cs
Normal file
28
DamageAssesmentApi/DamageAssesment.Api.Surveys/Db/Survey.cs
Normal file
@ -0,0 +1,28 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace DamageAssesment.Api.Surveys.Db
|
||||
{
|
||||
public class Survey
|
||||
{
|
||||
[Key]
|
||||
public int Id { get; set; }
|
||||
|
||||
[StringLength(100)]
|
||||
[Required]
|
||||
public string Title { get; set; }
|
||||
|
||||
//[StringLength(1000)]
|
||||
//public string Description { get; set; }
|
||||
|
||||
public bool IsEnabled { get; set; }
|
||||
|
||||
public DateTime? StartDate { get; set; }
|
||||
|
||||
public DateTime? EndDate { get; set; }
|
||||
|
||||
//public DateTime CreatedDate { get; set; }
|
||||
|
||||
//[StringLength(6)]
|
||||
//public string EmployeeID { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace DamageAssesment.Api.Surveys.Db
|
||||
{
|
||||
public class SurveysDbContext:DbContext
|
||||
{
|
||||
public SurveysDbContext(DbContextOptions options) : base(options)
|
||||
{
|
||||
|
||||
}
|
||||
public DbSet<Db.Survey> Surveys { get; set; }
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user