revamp2
This commit is contained in:
@@ -2,6 +2,7 @@ namespace maintenance.Data.Entities;
|
||||
|
||||
public sealed class GroupLookupEntity
|
||||
{
|
||||
public string GroupClaimValue { get; set; } = string.Empty;
|
||||
public string DisplayName { get; set; } = string.Empty;
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public int EmployeeId { get; set; }
|
||||
}
|
||||
|
||||
@@ -15,10 +15,12 @@ public sealed class GroupLookupDbContext : DbContext
|
||||
{
|
||||
modelBuilder.Entity<GroupLookupEntity>(e =>
|
||||
{
|
||||
e.ToTable("GroupLookup");
|
||||
e.HasKey(x => x.GroupClaimValue);
|
||||
e.Property(x => x.GroupClaimValue).HasMaxLength(256).IsRequired();
|
||||
e.Property(x => x.DisplayName).HasMaxLength(256).IsRequired();
|
||||
e.ToTable("EmployeeGroup");
|
||||
e.HasKey(x => x.Id);
|
||||
e.Property(x => x.Id).ValueGeneratedNever();
|
||||
e.Property(x => x.Name).HasMaxLength(256).IsRequired();
|
||||
e.Property(x => x.EmployeeId).IsRequired();
|
||||
e.HasIndex(x => x.Name);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user