Merged new dev changes

This commit is contained in:
uppuv
2023-09-13 13:16:42 -04:00
137 changed files with 2247 additions and 1254 deletions

View File

@ -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; }
}
}

View File

@ -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();
}
}
}