// using System; using GreenTree.Strohrmann.ERP.Domain.Model; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; namespace GreenTree.Strohrmann.ERP.Domain.Migrations { [DbContext(typeof(ERPDbContext))] [Migration("20200614195418_InitialCreate")] partial class InitialCreate { protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "3.1.5") .HasAnnotation("Relational:MaxIdentifierLength", 64); modelBuilder.Entity("GreenTree.Strohrmann.ERP.Core.Domain.Rights.Policy", b => { b.Property("Name") .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); b.HasKey("Name"); b.ToTable("Policies"); }); modelBuilder.Entity("GreenTree.Strohrmann.ERP.Core.Domain.Rights.User", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); b.Property("Accountname") .IsRequired() .HasColumnType("longtext CHARACTER SET utf8mb4"); b.Property("Birthdate") .HasColumnType("datetime(6)"); b.Property("Forename") .IsRequired() .HasColumnType("longtext CHARACTER SET utf8mb4"); b.Property("Lastname") .IsRequired() .HasColumnType("longtext CHARACTER SET utf8mb4"); b.HasKey("Id"); b.ToTable("Users"); }); modelBuilder.Entity("GreenTree.Strohrmann.ERP.Core.Domain.Rights.UserPolicy", b => { b.Property("UserId") .HasColumnType("int"); b.Property("PolicyName") .HasColumnType("varchar(255) CHARACTER SET utf8mb4"); b.HasKey("UserId", "PolicyName"); b.ToTable("UserPolicies"); }); modelBuilder.Entity("GreenTree.Strohrmann.ERP.Core.Domain.Rights.UserPolicy", b => { b.HasOne("GreenTree.Strohrmann.ERP.Core.Domain.Rights.User", "User") .WithMany("Policies") .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); #pragma warning restore 612, 618 } } }