diff --git a/src/WorkFlowCheck.DL/AppDbContext.cs b/src/WorkFlowCheck.DL/AppDbContext.cs index 3f6aa62..d22d1fc 100644 --- a/src/WorkFlowCheck.DL/AppDbContext.cs +++ b/src/WorkFlowCheck.DL/AppDbContext.cs @@ -46,8 +46,14 @@ namespace WorkFlowCheck.DL protected override void OnModelCreating(ModelBuilder modelBuilder) { + modelBuilder.ApplyConfiguration(new CheckListHeaderTypeConfiguration()); + modelBuilder.ApplyConfiguration(new CheckListTemplateHeaderTypeConfiguration()); + modelBuilder.ApplyConfiguration(new CheckListTemplateRowTypeConfiguration()); + modelBuilder.ApplyConfiguration(new CheckPointTypeConfiguration()); modelBuilder.ApplyConfiguration(new EquipmentTypeConfiguration()); modelBuilder.ApplyConfiguration(new LocationTypeConfiguration()); + modelBuilder.ApplyConfiguration(new RoleTypeConfiguration()); + modelBuilder.ApplyConfiguration(new UsersCheckListTemplateHeaderTypeConfiguration()); modelBuilder.ApplyConfiguration(new UserTypeConfiguration()); modelBuilder.RegisterSoftDeleteQueryFilters(); diff --git a/src/WorkFlowCheck.DL/Configurations/CheckListHeaderTypeConfiguration.cs b/src/WorkFlowCheck.DL/Configurations/CheckListHeaderTypeConfiguration.cs new file mode 100644 index 0000000..75a45b5 --- /dev/null +++ b/src/WorkFlowCheck.DL/Configurations/CheckListHeaderTypeConfiguration.cs @@ -0,0 +1,21 @@ +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Metadata.Builders; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace WorkFlowCheck.DL.Configurations +{ + public class CheckListHeaderTypeConfiguration : IEntityTypeConfiguration + { + public void Configure(EntityTypeBuilder builder) + { + builder.ToTable("CheckListHeader"); + builder.HasKey(e => e.Id); + builder.Property(e => e.Id).ValueGeneratedOnAdd(); + } + + } +} diff --git a/src/WorkFlowCheck.DL/Configurations/CheckListTemplateHeaderTypeConfiguration.cs b/src/WorkFlowCheck.DL/Configurations/CheckListTemplateHeaderTypeConfiguration.cs new file mode 100644 index 0000000..c640ae5 --- /dev/null +++ b/src/WorkFlowCheck.DL/Configurations/CheckListTemplateHeaderTypeConfiguration.cs @@ -0,0 +1,21 @@ +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Metadata.Builders; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace WorkFlowCheck.DL.Configurations +{ + public class CheckListTemplateHeaderTypeConfiguration : IEntityTypeConfiguration + { + public void Configure(EntityTypeBuilder builder) + { + builder.ToTable("CheckListTemplateHeader"); + builder.HasKey(e => e.Id); + builder.Property(e => e.Id).ValueGeneratedOnAdd(); + } + + } +} diff --git a/src/WorkFlowCheck.DL/Configurations/CheckListTemplateRowTypeConfiguration.cs b/src/WorkFlowCheck.DL/Configurations/CheckListTemplateRowTypeConfiguration.cs new file mode 100644 index 0000000..bf8084b --- /dev/null +++ b/src/WorkFlowCheck.DL/Configurations/CheckListTemplateRowTypeConfiguration.cs @@ -0,0 +1,21 @@ +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Metadata.Builders; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace WorkFlowCheck.DL.Configurations +{ + public class CheckListTemplateRowTypeConfiguration : IEntityTypeConfiguration + { + public void Configure(EntityTypeBuilder builder) + { + builder.ToTable("CheckListTemplateRow"); + builder.HasKey(e => e.Id); + builder.Property(e => e.Id).ValueGeneratedOnAdd(); + } + + } +} diff --git a/src/WorkFlowCheck.DL/Configurations/CheckPointTypeConfiguration.cs b/src/WorkFlowCheck.DL/Configurations/CheckPointTypeConfiguration.cs new file mode 100644 index 0000000..0ae9145 --- /dev/null +++ b/src/WorkFlowCheck.DL/Configurations/CheckPointTypeConfiguration.cs @@ -0,0 +1,21 @@ +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Metadata.Builders; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace WorkFlowCheck.DL.Configurations +{ + public class CheckPointTypeConfiguration : IEntityTypeConfiguration + { + public void Configure(EntityTypeBuilder builder) + { + builder.ToTable("CheckPoint"); + builder.HasKey(e => e.Id); + builder.Property(e => e.Id).ValueGeneratedOnAdd(); + } + + } +}