Update survey response, adding EmployeeId , Location Id as int, adjust end point for ansers submission in batch

This commit is contained in:
Reginald Cherenfant Jasmin
2023-09-13 01:28:24 -04:00
parent 4cf7d9f891
commit 9109d0d793
68 changed files with 525 additions and 540 deletions

View File

@ -5,7 +5,9 @@ namespace DamageAssesment.Api.Employees.Db
public class Employee
{
[Key]
public string Id { get; set; }
public int Id { get; set; }
[StringLength(50)]
public string EmployeeCode { get; set; }
[StringLength(50)]
public string Name { get; set; }
@ -17,7 +19,7 @@ namespace DamageAssesment.Api.Employees.Db
[StringLength(50)]
public string Email { get; set; }
public bool IsActive {get;set;}
public bool IsActive { get; set; }
public string? PreferredLanguage { get; set; } = "en";
}
}

View File

@ -8,5 +8,14 @@ namespace DamageAssesment.Api.Employees.Db
public EmployeeDbContext(DbContextOptions options) : base(options)
{
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);
modelBuilder.Entity<Employee>()
.Property(item => item.Id)
.ValueGeneratedOnAdd();
}
}
}