139 lines
5.0 KiB
C#
139 lines
5.0 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using GerstITS.Examples.Data;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
|
|
#nullable disable
|
|
|
|
namespace GerstITS.Examples.Data.Migrations
|
|
{
|
|
[DbContext(typeof(CustomerDbContext))]
|
|
[Migration("20260703100412_InitialCreate")]
|
|
partial class InitialCreate
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void BuildTargetModel(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<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityAlwaysColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<DateTime>("Created")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<string>("CreatedBy")
|
|
.HasMaxLength(100)
|
|
.HasColumnType("character varying(100)");
|
|
|
|
b.Property<DateTime?>("Deactivated")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<string>("DeactivatedBy")
|
|
.HasMaxLength(100)
|
|
.HasColumnType("character varying(100)");
|
|
|
|
b.Property<string>("EMail")
|
|
.IsRequired()
|
|
.HasMaxLength(250)
|
|
.HasColumnType("character varying(250)");
|
|
|
|
b.Property<string>("FirstName")
|
|
.IsRequired()
|
|
.HasMaxLength(100)
|
|
.HasColumnType("character varying(100)");
|
|
|
|
b.Property<bool>("IsActive")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<string>("LastName")
|
|
.IsRequired()
|
|
.HasMaxLength(100)
|
|
.HasColumnType("character varying(100)");
|
|
|
|
b.Property<DateTime?>("Modified")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<string>("ModifiedBy")
|
|
.HasMaxLength(100)
|
|
.HasColumnType("character varying(100)");
|
|
|
|
b.Property<int>("Version")
|
|
.IsConcurrencyToken()
|
|
.HasColumnType("integer");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Customers", "examples");
|
|
});
|
|
|
|
modelBuilder.Entity("GerstITS.Examples.Data.Entities.CustomerNoteEntity", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityAlwaysColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<DateTime>("Created")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<string>("CreatedBy")
|
|
.HasMaxLength(100)
|
|
.HasColumnType("character varying(100)");
|
|
|
|
b.Property<int>("CustomerId")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<string>("HistorySet")
|
|
.HasMaxLength(50)
|
|
.HasColumnType("character varying(50)");
|
|
|
|
b.Property<string>("Text")
|
|
.IsRequired()
|
|
.HasMaxLength(2000)
|
|
.HasColumnType("character varying(2000)");
|
|
|
|
b.Property<DateTime>("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
|
|
}
|
|
}
|
|
}
|