//
using System;
using GerstITS.Examples.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace GerstITS.Examples.Data.Migrations
{
[DbContext(typeof(CustomerDbContext))]
partial class CustomerDbContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasDefaultSchema("examples")
.HasAnnotation("ProductVersion", "10.0.9")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityAlwaysColumns(modelBuilder);
modelBuilder.Entity("GerstITS.Examples.Data.Entities.CustomerEntity", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityAlwaysColumn(b.Property("Id"));
b.Property("Created")
.HasColumnType("timestamp with time zone");
b.Property("CreatedBy")
.HasMaxLength(100)
.HasColumnType("character varying(100)");
b.Property("Deactivated")
.HasColumnType("timestamp with time zone");
b.Property("DeactivatedBy")
.HasMaxLength(100)
.HasColumnType("character varying(100)");
b.Property("EMail")
.IsRequired()
.HasMaxLength(250)
.HasColumnType("character varying(250)");
b.Property("FirstName")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("character varying(100)");
b.Property("IsActive")
.HasColumnType("boolean");
b.Property("LastName")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("character varying(100)");
b.Property("Modified")
.HasColumnType("timestamp with time zone");
b.Property("ModifiedBy")
.HasMaxLength(100)
.HasColumnType("character varying(100)");
b.Property("Version")
.IsConcurrencyToken()
.HasColumnType("integer");
b.HasKey("Id");
b.ToTable("Customers", "examples");
});
modelBuilder.Entity("GerstITS.Examples.Data.Entities.CustomerNoteEntity", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityAlwaysColumn(b.Property("Id"));
b.Property("Created")
.HasColumnType("timestamp with time zone");
b.Property("CreatedBy")
.HasMaxLength(100)
.HasColumnType("character varying(100)");
b.Property("CustomerId")
.HasColumnType("integer");
b.Property("HistorySet")
.HasMaxLength(50)
.HasColumnType("character varying(50)");
b.Property("Text")
.IsRequired()
.HasMaxLength(2000)
.HasColumnType("character varying(2000)");
b.Property("ValidFrom")
.HasColumnType("timestamp with time zone");
b.HasKey("Id");
b.HasIndex("CustomerId");
b.ToTable("CustomerNotes", "examples");
});
modelBuilder.Entity("GerstITS.Examples.Data.Entities.CustomerNoteEntity", b =>
{
b.HasOne("GerstITS.Examples.Data.Entities.CustomerEntity", null)
.WithMany("Notes")
.HasForeignKey("CustomerId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("GerstITS.Examples.Data.Entities.CustomerEntity", b =>
{
b.Navigation("Notes");
});
#pragma warning restore 612, 618
}
}
}