forked from MDCPS/DamageAssessment_Backend
Merged new dev changes
This commit is contained in:
@ -10,21 +10,22 @@ namespace DamageAssesment.Api.SurveyResponses.Db
|
||||
|
||||
[ForeignKey("Survey")]
|
||||
public int SurveyId { get; set; }
|
||||
|
||||
[StringLength(4)]
|
||||
[ForeignKey("Location")]
|
||||
public string LocationId { get; set; }
|
||||
public int LocationId { get; set; }
|
||||
|
||||
[StringLength(6)]
|
||||
[ForeignKey("Employee")]
|
||||
public string EmployeeId { get; set; }
|
||||
public int EmployeeId { get; set; }
|
||||
|
||||
//public DateTime? CreatedDate { get; set; }
|
||||
public DateTime? CreatedDate { get; set; } = DateTime.Now;
|
||||
|
||||
//[StringLength(50)]
|
||||
// public string ClientDevice { get; set; }
|
||||
[StringLength(50)]
|
||||
public string? ClientDevice { get; set; }
|
||||
|
||||
[StringLength(250)]
|
||||
public string? KeyAnswerResult { get; set; }
|
||||
public double? Longitute { get; set; }
|
||||
public double? Latitude { get; set; }
|
||||
|
||||
// [StringLength(250)]
|
||||
//public string KeyAnswerResult { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -15,5 +15,13 @@ namespace DamageAssesment.Api.SurveyResponses.Db
|
||||
options.UseSqlServer(_Configuration.GetConnectionString("SurveyResponseConnection"));
|
||||
}
|
||||
public DbSet<Db.SurveyResponse> SurveyResponses { get; set; }
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
base.OnModelCreating(modelBuilder);
|
||||
modelBuilder.Entity<SurveyResponse>()
|
||||
.Property(item => item.Id)
|
||||
.ValueGeneratedOnAdd();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user