// using System; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Repositories; namespace Repositories.Migrations { [DbContext(typeof(FwDbContext))] [Migration("20210706081036_v1")] partial class v1 { protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "3.1.16") .HasAnnotation("Relational:MaxIdentifierLength", 64); modelBuilder.Entity("Datamodels.DatabaseModels.Address", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("bigint"); b.Property("AddressTypeId") .HasColumnType("bigint"); b.Property("ChangedAt") .HasColumnType("datetime(6)"); b.Property("City") .HasColumnType("longtext CHARACTER SET utf8mb4"); b.Property("CreatedAt") .HasColumnType("datetime(6)"); b.Property("PersonId") .HasColumnType("bigint"); b.Property("StreetName") .HasColumnType("longtext CHARACTER SET utf8mb4"); b.Property("StreetNumber") .HasColumnType("int"); b.Property("Zip") .HasColumnType("longtext CHARACTER SET utf8mb4"); b.HasKey("Id"); b.HasIndex("AddressTypeId"); b.HasIndex("PersonId"); b.ToTable("Address"); }); modelBuilder.Entity("Datamodels.DatabaseModels.Communication", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("bigint"); b.Property("ChangedAt") .HasColumnType("datetime(6)"); b.Property("CommunicationTypeId") .HasColumnType("bigint"); b.Property("CommunicationValue") .HasColumnType("longtext CHARACTER SET utf8mb4"); b.Property("CreatedAt") .HasColumnType("datetime(6)"); b.Property("PersonId") .HasColumnType("bigint"); b.HasKey("Id"); b.HasIndex("CommunicationTypeId"); b.HasIndex("PersonId"); b.ToTable("Communication"); }); modelBuilder.Entity("Datamodels.DatabaseModels.Person", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("bigint"); b.Property("Birthday") .HasColumnType("datetime(6)"); b.Property("ChangedAt") .HasColumnType("datetime(6)"); b.Property("CreatedAt") .HasColumnType("datetime(6)"); b.Property("FirstName") .HasColumnType("longtext CHARACTER SET utf8mb4"); b.Property("GenderId") .HasColumnType("bigint"); b.Property("IsActive") .HasColumnType("tinyint(1)"); b.Property("LastName") .HasColumnType("longtext CHARACTER SET utf8mb4"); b.HasKey("Id"); b.HasIndex("GenderId"); b.ToTable("Person"); }); modelBuilder.Entity("Datamodels.Lookups.LookupCategory", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("bigint"); b.Property("CategoryName") .HasColumnType("longtext CHARACTER SET utf8mb4"); b.Property("IsActive") .HasColumnType("tinyint(1)"); b.HasKey("Id"); b.ToTable("LookupCategories"); }); modelBuilder.Entity("Datamodels.Lookups.LookupValue", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("bigint"); b.Property("IsActive") .HasColumnType("tinyint(1)"); b.Property("LookupCategoryId") .HasColumnType("bigint"); b.Property("Value") .HasColumnType("longtext CHARACTER SET utf8mb4"); b.HasKey("Id"); b.HasIndex("LookupCategoryId"); b.ToTable("LookupValues"); }); modelBuilder.Entity("Datamodels.DatabaseModels.Address", b => { b.HasOne("Datamodels.Lookups.LookupValue", "AddressType") .WithMany() .HasForeignKey("AddressTypeId"); b.HasOne("Datamodels.DatabaseModels.Person", "Person") .WithMany("Addresses") .HasForeignKey("PersonId"); }); modelBuilder.Entity("Datamodels.DatabaseModels.Communication", b => { b.HasOne("Datamodels.Lookups.LookupValue", "CommunicationType") .WithMany() .HasForeignKey("CommunicationTypeId"); b.HasOne("Datamodels.DatabaseModels.Person", "Person") .WithMany("Communications") .HasForeignKey("PersonId"); }); modelBuilder.Entity("Datamodels.DatabaseModels.Person", b => { b.HasOne("Datamodels.Lookups.LookupValue", "Gender") .WithMany() .HasForeignKey("GenderId"); }); modelBuilder.Entity("Datamodels.Lookups.LookupValue", b => { b.HasOne("Datamodels.Lookups.LookupCategory", "LookupCategory") .WithMany("LookupValues") .HasForeignKey("LookupCategoryId"); }); #pragma warning restore 612, 618 } } }