forked from MDCPS/DamageAssessment_Backend
Update Question and Survey to support multilingual functionnality and Make language optional in URL
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace DamageAssesment.Api.Surveys.Db
|
||||
{
|
||||
@ -6,11 +7,6 @@ namespace DamageAssesment.Api.Surveys.Db
|
||||
{
|
||||
[Key]
|
||||
public int Id { get; set; }
|
||||
|
||||
[StringLength(100)]
|
||||
[Required]
|
||||
public string Title { get; set; }
|
||||
|
||||
//[StringLength(1000)]
|
||||
//public string Description { get; set; }
|
||||
|
||||
@ -20,9 +16,11 @@ namespace DamageAssesment.Api.Surveys.Db
|
||||
|
||||
public DateTime? EndDate { get; set; }
|
||||
|
||||
//public DateTime CreatedDate { get; set; }
|
||||
|
||||
//[StringLength(6)]
|
||||
//public string EmployeeID { get; set; }
|
||||
public DateTime CreatedDate { get; set; } = DateTime.Now;
|
||||
/*
|
||||
[StringLength(10)]
|
||||
[ForeignKey("Employee")]
|
||||
public string EmployeeId { get; set; }
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,23 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace DamageAssesment.Api.Surveys.Db
|
||||
{
|
||||
public class SurveyTranslation
|
||||
{
|
||||
[Key]
|
||||
public int Id { get; set; }
|
||||
[ForeignKey("Survey")]
|
||||
public int SurveyId { get; set; }
|
||||
|
||||
[StringLength(200)]
|
||||
[Required]
|
||||
public string Title { get; set; }
|
||||
public string Language { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -9,6 +9,6 @@ namespace DamageAssesment.Api.Surveys.Db
|
||||
|
||||
}
|
||||
public DbSet<Db.Survey> Surveys { get; set; }
|
||||
|
||||
public DbSet<Db.SurveyTranslation> SurveysTranslation { get; set; }
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user