Files
demo-contact/Sufi.Demo.PeopleDirectory.Persistence/Migrations/20250527161934_InitialSchema.Designer.cs
2026-02-03 10:44:31 +08:00

458 lines
17 KiB
C#

// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using Sufi.Demo.PeopleDirectory.Persistence.Contexts;
#nullable disable
namespace Sufi.Demo.PeopleDirectory.Persistence.Migrations
{
[DbContext(typeof(ApplicationDbContext))]
[Migration("20250527161934_InitialSchema")]
partial class InitialSchema
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "8.0.11")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("ClaimType")
.HasColumnType("text");
b.Property<string>("ClaimValue")
.HasColumnType("text");
b.Property<string>("UserId")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("UserId");
b.ToTable("UserClaims", "Identity");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
{
b.Property<string>("LoginProvider")
.HasColumnType("text");
b.Property<string>("ProviderKey")
.HasColumnType("text");
b.Property<string>("ProviderDisplayName")
.HasColumnType("text");
b.Property<string>("UserId")
.IsRequired()
.HasColumnType("text");
b.HasKey("LoginProvider", "ProviderKey");
b.HasIndex("UserId");
b.ToTable("UserLogins", "Identity");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
{
b.Property<string>("UserId")
.HasColumnType("text");
b.Property<string>("RoleId")
.HasColumnType("text");
b.HasKey("UserId", "RoleId");
b.HasIndex("RoleId");
b.ToTable("UserRoles", "Identity");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
{
b.Property<string>("UserId")
.HasColumnType("text");
b.Property<string>("LoginProvider")
.HasColumnType("text");
b.Property<string>("Name")
.HasColumnType("text");
b.Property<string>("Value")
.HasColumnType("text");
b.HasKey("UserId", "LoginProvider", "Name");
b.ToTable("UserTokens", "Identity");
});
modelBuilder.Entity("Sufi.Demo.PeopleDirectory.Domain.Entities.Misc.Contact", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("CreatedBy")
.HasColumnType("character varying(100)");
b.Property<DateTime>("CreatedOn")
.HasColumnType("timestamp with time zone");
b.Property<string>("Email")
.IsRequired()
.HasColumnType("character varying(100)");
b.Property<string>("Hobby")
.IsRequired()
.HasColumnType("character varying(255)");
b.Property<string>("LastModifiedBy")
.HasColumnType("character varying(100)");
b.Property<DateTime?>("LastModifiedOn")
.HasColumnType("timestamp with time zone");
b.Property<string>("Phone")
.IsRequired()
.HasColumnType("character varying(20)");
b.Property<string>("SkillSets")
.IsRequired()
.HasColumnType("character varying(255)");
b.Property<string>("UserName")
.IsRequired()
.HasColumnType("character varying(50)");
b.HasKey("Id");
b.ToTable("Contacts");
});
modelBuilder.Entity("Sufi.Demo.PeopleDirectory.Domain.Entities.Misc.ServerInfo", b =>
{
b.Property<string>("Id")
.HasColumnType("text");
b.Property<string>("CreatedBy")
.HasColumnType("character varying(100)");
b.Property<DateTime>("CreatedOn")
.HasColumnType("timestamp with time zone");
b.Property<string>("LastModifiedBy")
.HasColumnType("character varying(100)");
b.Property<DateTime?>("LastModifiedOn")
.HasColumnType("timestamp with time zone");
b.Property<string>("Value")
.IsRequired()
.HasColumnType("character varying(255)");
b.HasKey("Id");
b.ToTable("ServerInfos");
});
modelBuilder.Entity("Sufi.Demo.PeopleDirectory.Infrastructure.Models.Audit.Audit", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("AffectedColumns")
.HasColumnType("character varying(100)");
b.Property<DateTime>("DateTime")
.HasColumnType("timestamp with time zone");
b.Property<string>("NewValues")
.HasColumnType("character varying(255)");
b.Property<string>("OldValues")
.HasColumnType("character varying(255)");
b.Property<string>("PrimaryKey")
.IsRequired()
.HasColumnType("character varying(100)");
b.Property<string>("TableName")
.IsRequired()
.HasColumnType("character varying(50)");
b.Property<string>("Type")
.IsRequired()
.HasColumnType("character varying(20)");
b.Property<string>("UserId")
.HasColumnType("character varying(100)");
b.HasKey("Id");
b.ToTable("AuditTrails", "Audit");
});
modelBuilder.Entity("Sufi.Demo.PeopleDirectory.Infrastructure.Models.Identity.AppRole", b =>
{
b.Property<string>("Id")
.HasColumnType("text");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnType("text");
b.Property<string>("CreatedBy")
.HasColumnType("character varying(100)");
b.Property<DateTime>("CreatedOn")
.HasColumnType("timestamp with time zone");
b.Property<string>("Description")
.HasColumnType("character varying(100)");
b.Property<string>("LastModifiedBy")
.HasColumnType("character varying(100)");
b.Property<DateTime?>("LastModifiedOn")
.HasColumnType("timestamp with time zone");
b.Property<string>("Name")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<string>("NormalizedName")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.HasKey("Id");
b.HasIndex("NormalizedName")
.IsUnique()
.HasDatabaseName("RoleNameIndex");
b.ToTable("Roles", "Identity");
});
modelBuilder.Entity("Sufi.Demo.PeopleDirectory.Infrastructure.Models.Identity.AppRoleClaim", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("AppRoleId")
.HasColumnType("text");
b.Property<string>("ClaimType")
.HasColumnType("text");
b.Property<string>("ClaimValue")
.HasColumnType("text");
b.Property<string>("CreatedBy")
.HasColumnType("character varying(100)");
b.Property<DateTime>("CreatedOn")
.HasColumnType("timestamp with time zone");
b.Property<string>("Description")
.HasColumnType("character varying(100)");
b.Property<string>("Group")
.HasColumnType("character varying(100)");
b.Property<string>("LastModifiedBy")
.HasColumnType("character varying(100)");
b.Property<DateTime?>("LastModifiedOn")
.HasColumnType("timestamp with time zone");
b.Property<string>("RoleId")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("AppRoleId");
b.HasIndex("RoleId");
b.ToTable("RoleClaims", "Identity");
});
modelBuilder.Entity("Sufi.Demo.PeopleDirectory.Infrastructure.Models.Identity.AppUser", b =>
{
b.Property<string>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("text");
b.Property<int>("AccessFailedCount")
.HasColumnType("integer");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnType("text");
b.Property<string>("CreatedBy")
.HasColumnType("character varying(100)");
b.Property<DateTime>("CreatedOn")
.HasColumnType("timestamp with time zone");
b.Property<DateTime?>("DeletedOn")
.HasColumnType("timestamp with time zone");
b.Property<string>("Email")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<bool>("EmailConfirmed")
.HasColumnType("boolean");
b.Property<bool>("IsActive")
.HasColumnType("boolean");
b.Property<bool>("IsDeleted")
.HasColumnType("boolean");
b.Property<string>("LastModifiedBy")
.HasColumnType("character varying(100)");
b.Property<DateTime?>("LastModifiedOn")
.HasColumnType("timestamp with time zone");
b.Property<bool>("LockoutEnabled")
.HasColumnType("boolean");
b.Property<DateTimeOffset?>("LockoutEnd")
.HasColumnType("timestamp with time zone");
b.Property<string>("NormalizedEmail")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<string>("NormalizedUserName")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<string>("PasswordHash")
.HasColumnType("text");
b.Property<string>("PhoneNumber")
.HasColumnType("text");
b.Property<bool>("PhoneNumberConfirmed")
.HasColumnType("boolean");
b.Property<string>("SecurityStamp")
.HasColumnType("text");
b.Property<bool>("TwoFactorEnabled")
.HasColumnType("boolean");
b.Property<string>("UserName")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.HasKey("Id");
b.HasIndex("NormalizedEmail")
.HasDatabaseName("EmailIndex");
b.HasIndex("NormalizedUserName")
.IsUnique()
.HasDatabaseName("UserNameIndex");
b.ToTable("Users", "Identity");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
{
b.HasOne("Sufi.Demo.PeopleDirectory.Infrastructure.Models.Identity.AppUser", null)
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
{
b.HasOne("Sufi.Demo.PeopleDirectory.Infrastructure.Models.Identity.AppUser", null)
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
{
b.HasOne("Sufi.Demo.PeopleDirectory.Infrastructure.Models.Identity.AppRole", null)
.WithMany()
.HasForeignKey("RoleId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("Sufi.Demo.PeopleDirectory.Infrastructure.Models.Identity.AppUser", null)
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
{
b.HasOne("Sufi.Demo.PeopleDirectory.Infrastructure.Models.Identity.AppUser", null)
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Sufi.Demo.PeopleDirectory.Infrastructure.Models.Identity.AppRoleClaim", b =>
{
b.HasOne("Sufi.Demo.PeopleDirectory.Infrastructure.Models.Identity.AppRole", null)
.WithMany("RoleClaims")
.HasForeignKey("AppRoleId");
b.HasOne("Sufi.Demo.PeopleDirectory.Infrastructure.Models.Identity.AppRole", null)
.WithMany()
.HasForeignKey("RoleId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Sufi.Demo.PeopleDirectory.Infrastructure.Models.Identity.AppRole", b =>
{
b.Navigation("RoleClaims");
});
#pragma warning restore 612, 618
}
}
}