// using System; using DataModel.Database.Common; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; #nullable disable namespace DataModel.Migrations { [DbContext(typeof(DataContext))] [Migration("20220709094035_202207AddSectionDataKey")] partial class _202207AddSectionDataKey { protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder.HasAnnotation("ProductVersion", "6.0.5"); modelBuilder.Entity("DataModel.Database.Section", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("DataKey") .IsRequired() .HasColumnType("TEXT"); b.Property("Name") .IsRequired() .HasColumnType("TEXT"); b.Property("ParentId") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("DataKey"); b.HasIndex("Id"); b.HasIndex("Name"); b.HasIndex("ParentId"); b.ToTable("Sections"); }); modelBuilder.Entity("DataModel.Database.Setting", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("BoolValue") .HasColumnType("INTEGER"); b.Property("GuidValue") .HasColumnType("TEXT"); b.Property("IntegerValue") .HasColumnType("INTEGER"); b.Property("Name") .IsRequired() .HasColumnType("TEXT"); b.Property("TextValue") .IsRequired() .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("BoolValue"); b.HasIndex("GuidValue"); b.HasIndex("Id"); b.HasIndex("IntegerValue"); b.HasIndex("Name") .IsUnique(); b.HasIndex("TextValue"); b.ToTable("Settings"); }); modelBuilder.Entity("DataModel.Database.TextElement", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("Code") .IsRequired() .HasColumnType("TEXT"); b.Property("SectionId") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("Code"); b.HasIndex("Id"); b.HasIndex("SectionId"); b.ToTable("TextElements"); }); modelBuilder.Entity("DataModel.Database.Translation", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("Culture") .IsRequired() .HasColumnType("TEXT"); b.Property("Text") .IsRequired() .HasColumnType("TEXT"); b.Property("TextElementId") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("Culture"); b.HasIndex("Id"); b.HasIndex("Text"); b.HasIndex("TextElementId"); b.ToTable("Translations"); }); modelBuilder.Entity("DataModel.Database.Section", b => { b.HasOne("DataModel.Database.Section", "Parent") .WithMany() .HasForeignKey("ParentId"); b.Navigation("Parent"); }); modelBuilder.Entity("DataModel.Database.TextElement", b => { b.HasOne("DataModel.Database.Section", "Section") .WithMany("TextElements") .HasForeignKey("SectionId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Section"); }); modelBuilder.Entity("DataModel.Database.Translation", b => { b.HasOne("DataModel.Database.TextElement", "TextElement") .WithMany("Translations") .HasForeignKey("TextElementId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("TextElement"); }); modelBuilder.Entity("DataModel.Database.Section", b => { b.Navigation("TextElements"); }); modelBuilder.Entity("DataModel.Database.TextElement", b => { b.Navigation("Translations"); }); #pragma warning restore 612, 618 } } }