// using System; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using WorkFlowCheck.DL; #nullable disable namespace WorkFlowCheck.DL.Migrations { [DbContext(typeof(AppDbContext))] [Migration("20250303154744_Extend003")] partial class Extend003 { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "8.0.12") .HasAnnotation("Relational:MaxIdentifierLength", 128); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); modelBuilder.Entity("WorkFlowCheck.DL.Entities.CheckListHeader", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("CheckListTemplateHeaderId") .HasColumnType("int"); b.Property("CreatedAt") .HasColumnType("datetime2"); b.Property("CreatedBy") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Description") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("DocumentNumber") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("GuidNumber") .HasColumnType("uniqueidentifier"); b.Property("IsDeleted") .HasColumnType("bit"); b.Property("IsStorno") .HasColumnType("bit"); b.Property("LastModAt") .HasColumnType("datetime2"); b.Property("LastModBy") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("ShortName") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.HasIndex("CheckListTemplateHeaderId"); b.ToTable("CheckListHeader", (string)null); }); modelBuilder.Entity("WorkFlowCheck.DL.Entities.CheckListRow", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Answer") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("CheckListHeaderId") .HasColumnType("int"); b.Property("CheckListTemplateRowId") .HasColumnType("int"); b.Property("CreatedAt") .HasColumnType("datetime2"); b.Property("CreatedBy") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("GuidNumber") .HasColumnType("uniqueidentifier"); b.Property("IsDeleted") .HasColumnType("bit"); b.Property("LastModAt") .HasColumnType("datetime2"); b.Property("LastModBy") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Photo") .IsRequired() .HasColumnType("varbinary(max)"); b.HasKey("Id"); b.HasIndex("CheckListHeaderId"); b.HasIndex("CheckListTemplateRowId"); b.ToTable("CheckListRow", (string)null); }); modelBuilder.Entity("WorkFlowCheck.DL.Entities.CheckListTemplateHeader", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("CreatedAt") .HasColumnType("datetime2"); b.Property("CreatedBy") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Description") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("IsDeleted") .HasColumnType("bit"); b.Property("LastModAt") .HasColumnType("datetime2"); b.Property("LastModBy") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("ShortName") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.ToTable("CheckListTemplateHeader", (string)null); }); modelBuilder.Entity("WorkFlowCheck.DL.Entities.CheckListTemplateRow", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("AnswerType") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("CheckListTemplateHeaderId") .HasColumnType("int"); b.Property("CheckPointId") .HasColumnType("int"); b.Property("CreatedAt") .HasColumnType("datetime2"); b.Property("CreatedBy") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("EquipmentId") .HasColumnType("int"); b.Property("IsDeleted") .HasColumnType("bit"); b.Property("LastModAt") .HasColumnType("datetime2"); b.Property("LastModBy") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("OperationDescription") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("RowIndex") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("CheckListTemplateHeaderId"); b.HasIndex("CheckPointId"); b.HasIndex("EquipmentId"); b.ToTable("CheckListTemplateRow", (string)null); }); modelBuilder.Entity("WorkFlowCheck.DL.Entities.CheckPoint", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Code") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("CreatedAt") .HasColumnType("datetime2"); b.Property("CreatedBy") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("IsDeleted") .HasColumnType("bit"); b.Property("LastModAt") .HasColumnType("datetime2"); b.Property("LastModBy") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("ShortName") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.ToTable("CheckPoint", (string)null); }); modelBuilder.Entity("WorkFlowCheck.DL.Entities.Equipment", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("CreatedAt") .HasColumnType("datetime2"); b.Property("CreatedBy") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("EquipmentNumber") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("IsDeleted") .HasColumnType("bit"); b.Property("LastModAt") .HasColumnType("datetime2"); b.Property("LastModBy") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("ShortName") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.ToTable("Equipment", (string)null); }); modelBuilder.Entity("WorkFlowCheck.DL.Entities.Location", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("CreatedAt") .HasColumnType("datetime2"); b.Property("CreatedBy") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("FullName") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("IsDeleted") .HasColumnType("bit"); b.Property("LastModAt") .HasColumnType("datetime2"); b.Property("LastModBy") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.ToTable("Location", (string)null); }); modelBuilder.Entity("WorkFlowCheck.DL.Entities.Role", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("CreatedAt") .HasColumnType("datetime2"); b.Property("CreatedBy") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("IsDeleted") .HasColumnType("bit"); b.Property("LastModAt") .HasColumnType("datetime2"); b.Property("LastModBy") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("RoleName") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.ToTable("Roles", (string)null); }); modelBuilder.Entity("WorkFlowCheck.DL.Entities.RoleCheckListTemplateHeader", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("CheckListTemplateHeaderId") .HasColumnType("int"); b.Property("Enabled") .HasColumnType("bit"); b.Property("RoleId") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("CheckListTemplateHeaderId"); b.HasIndex("RoleId"); b.ToTable("RoleCheckListTemplateHeader", (string)null); }); modelBuilder.Entity("WorkFlowCheck.DL.Entities.User", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("CreatedAt") .HasColumnType("datetime2"); b.Property("CreatedBy") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Email") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("FirstName") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("IsDeleted") .HasColumnType("bit"); b.Property("LastModAt") .HasColumnType("datetime2"); b.Property("LastModBy") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("LastName") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("PasswordHash") .HasColumnType("nvarchar(max)"); b.Property("UserName") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.ToTable("Users", (string)null); b.HasData( new { Id = 1, CreatedAt = new DateTime(2025, 3, 3, 15, 47, 43, 353, DateTimeKind.Utc).AddTicks(3654), CreatedBy = "System", Email = "admin@nuvolar.hu", FirstName = "Administrator", IsDeleted = false, LastModAt = new DateTime(2025, 3, 3, 15, 47, 43, 353, DateTimeKind.Utc).AddTicks(3659), LastModBy = "System", LastName = "System", PasswordHash = "eGM0NUREZnJ0ISFFRDIxMKE5TYwthDBuUsTUEO1fBnCR3VdSCmdz47ue0RoVvnkY", UserName = "admin" }, new { Id = 2, CreatedAt = new DateTime(2025, 3, 3, 15, 47, 43, 364, DateTimeKind.Utc).AddTicks(9120), CreatedBy = "System", Email = "user@nuvolar.hu", FirstName = "User", IsDeleted = false, LastModAt = new DateTime(2025, 3, 3, 15, 47, 43, 364, DateTimeKind.Utc).AddTicks(9122), LastModBy = "System", LastName = "System", PasswordHash = "eGM0NUREZnJ0ISFFRDIxMPwM2D9sQSj7zmaSBIsOGe0I9hBFwCGPVbyrYMA5EnKG", UserName = "user" }); }); modelBuilder.Entity("WorkFlowCheck.DL.Entities.UserRole", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("RoleId") .HasColumnType("int"); b.Property("UserId") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("RoleId"); b.HasIndex("UserId"); b.ToTable("UserRoles", (string)null); }); modelBuilder.Entity("WorkFlowCheck.DL.Entities.CheckListHeader", b => { b.HasOne("WorkFlowCheck.DL.Entities.CheckListTemplateHeader", "CheckListTemplateHeader") .WithMany() .HasForeignKey("CheckListTemplateHeaderId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("CheckListTemplateHeader"); }); modelBuilder.Entity("WorkFlowCheck.DL.Entities.CheckListRow", b => { b.HasOne("WorkFlowCheck.DL.Entities.CheckListHeader", "CheckListHeader") .WithMany("CheckListRows") .HasForeignKey("CheckListHeaderId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("WorkFlowCheck.DL.Entities.CheckListTemplateRow", "CheckListTemplateRow") .WithMany() .HasForeignKey("CheckListTemplateRowId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("CheckListHeader"); b.Navigation("CheckListTemplateRow"); }); modelBuilder.Entity("WorkFlowCheck.DL.Entities.CheckListTemplateRow", b => { b.HasOne("WorkFlowCheck.DL.Entities.CheckListTemplateHeader", "CheckListTemplateHeader") .WithMany("CheckListTemplateRows") .HasForeignKey("CheckListTemplateHeaderId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("WorkFlowCheck.DL.Entities.CheckPoint", "CheckPoint") .WithMany() .HasForeignKey("CheckPointId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("WorkFlowCheck.DL.Entities.Equipment", "Equipment") .WithMany() .HasForeignKey("EquipmentId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("CheckListTemplateHeader"); b.Navigation("CheckPoint"); b.Navigation("Equipment"); }); modelBuilder.Entity("WorkFlowCheck.DL.Entities.RoleCheckListTemplateHeader", b => { b.HasOne("WorkFlowCheck.DL.Entities.CheckListTemplateHeader", "CheckListTemplateHeader") .WithMany() .HasForeignKey("CheckListTemplateHeaderId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("WorkFlowCheck.DL.Entities.Role", "Role") .WithMany() .HasForeignKey("RoleId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("CheckListTemplateHeader"); b.Navigation("Role"); }); modelBuilder.Entity("WorkFlowCheck.DL.Entities.UserRole", b => { b.HasOne("WorkFlowCheck.DL.Entities.Role", "Role") .WithMany() .HasForeignKey("RoleId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("WorkFlowCheck.DL.Entities.User", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Role"); b.Navigation("User"); }); modelBuilder.Entity("WorkFlowCheck.DL.Entities.CheckListHeader", b => { b.Navigation("CheckListRows"); }); modelBuilder.Entity("WorkFlowCheck.DL.Entities.CheckListTemplateHeader", b => { b.Navigation("CheckListTemplateRows"); }); #pragma warning restore 612, 618 } } }