358 lines
12 KiB
C#
358 lines
12 KiB
C#
using System;
|
|
using LEA.Data;
|
|
using LEA.Models;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Metadata;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using Pomelo.EntityFrameworkCore.MySql.Metadata;
|
|
|
|
#nullable disable
|
|
|
|
namespace LEA.Migrations
|
|
{
|
|
[DbContext(typeof(AppDbContext))]
|
|
partial class AppDbContextModelSnapshot : ModelSnapshot
|
|
{
|
|
protected override void BuildModel(ModelBuilder modelBuilder)
|
|
{
|
|
modelBuilder
|
|
.HasAnnotation("ProductVersion", "8.0.8")
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
|
|
|
MySqlModelBuilderExtensions.HasCharSet(modelBuilder, "utf8mb4");
|
|
|
|
modelBuilder.Entity("LEA.Models.Application", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int")
|
|
.HasAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn);
|
|
|
|
b.Property<DateTime>("AppliedOn")
|
|
.HasColumnType("date");
|
|
|
|
b.Property<string>("Company")
|
|
.IsRequired()
|
|
.HasMaxLength(150)
|
|
.HasColumnType("varchar(150)");
|
|
|
|
b.Property<string>("Notes")
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<string>("Role")
|
|
.IsRequired()
|
|
.HasMaxLength(150)
|
|
.HasColumnType("varchar(150)");
|
|
|
|
b.Property<string>("Source")
|
|
.HasMaxLength(200)
|
|
.HasColumnType("varchar(200)");
|
|
|
|
b.Property<ApplicationStatus>("Status")
|
|
.HasMaxLength(50)
|
|
.HasColumnType("varchar(50)")
|
|
.HasConversion<string>();
|
|
|
|
b.Property<DateTime>("UpdatedAt")
|
|
.HasColumnType("datetime(6)");
|
|
|
|
b.Property<string>("UserId")
|
|
.IsRequired()
|
|
.HasColumnType("varchar(255)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("UserId");
|
|
|
|
b.ToTable("Applications");
|
|
|
|
b.HasOne("LEA.Models.ApplicationUser", "User")
|
|
.WithMany()
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Contact");
|
|
b.Navigation("User");
|
|
});
|
|
|
|
modelBuilder.Entity("LEA.Models.ApplicationUser", b =>
|
|
{
|
|
b.Property<string>("Id")
|
|
.HasColumnType("varchar(255)");
|
|
|
|
b.Property<int>("AccessFailedCount")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("ConcurrencyStamp")
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("datetime(6)");
|
|
|
|
b.Property<string>("Email")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("varchar(256)");
|
|
|
|
b.Property<bool>("EmailConfirmed")
|
|
.HasColumnType("tinyint(1)");
|
|
|
|
b.Property<string>("FullName")
|
|
.IsRequired()
|
|
.HasMaxLength(100)
|
|
.HasColumnType("varchar(100)");
|
|
|
|
b.Property<bool>("LockoutEnabled")
|
|
.HasColumnType("tinyint(1)");
|
|
|
|
b.Property<DateTimeOffset?>("LockoutEnd")
|
|
.HasColumnType("datetime(6)");
|
|
|
|
b.Property<string>("NormalizedEmail")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("varchar(256)");
|
|
|
|
b.Property<string>("NormalizedUserName")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("varchar(256)");
|
|
|
|
b.Property<string>("PasswordHash")
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<string>("PhoneNumber")
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<bool>("PhoneNumberConfirmed")
|
|
.HasColumnType("tinyint(1)");
|
|
|
|
b.Property<string>("SecurityStamp")
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<bool>("TwoFactorEnabled")
|
|
.HasColumnType("tinyint(1)");
|
|
|
|
b.Property<string>("UserName")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("varchar(256)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("NormalizedEmail")
|
|
.HasDatabaseName("EmailIndex");
|
|
|
|
b.HasIndex("NormalizedUserName")
|
|
.IsUnique()
|
|
.HasDatabaseName("UserNameIndex");
|
|
|
|
b.ToTable("AspNetUsers", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("LEA.Models.Contact", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int")
|
|
.HasAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn);
|
|
|
|
b.Property<int>("ApplicationId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("Email")
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<string>("FullName")
|
|
.HasMaxLength(100)
|
|
.HasColumnType("varchar(100)");
|
|
|
|
b.Property<string>("Phone")
|
|
.HasColumnType("longtext");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("ApplicationId")
|
|
.IsUnique();
|
|
|
|
b.ToTable("Contacts");
|
|
|
|
b.HasOne("LEA.Models.Application", "Application")
|
|
.WithOne("Contact")
|
|
.HasForeignKey("LEA.Models.Contact", "ApplicationId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Application");
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
|
|
{
|
|
b.Property<string>("Id")
|
|
.HasColumnType("varchar(255)");
|
|
|
|
b.Property<string>("ConcurrencyStamp")
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<string>("Name")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("varchar(256)");
|
|
|
|
b.Property<string>("NormalizedName")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("varchar(256)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("NormalizedName")
|
|
.IsUnique()
|
|
.HasDatabaseName("RoleNameIndex");
|
|
|
|
b.ToTable("AspNetRoles", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int")
|
|
.HasAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn);
|
|
|
|
b.Property<string>("ClaimType")
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<string>("ClaimValue")
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<string>("RoleId")
|
|
.IsRequired()
|
|
.HasColumnType("varchar(255)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("RoleId");
|
|
|
|
b.ToTable("AspNetRoleClaims", (string)null);
|
|
|
|
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
|
|
.WithMany()
|
|
.HasForeignKey("RoleId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int")
|
|
.HasAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn);
|
|
|
|
b.Property<string>("ClaimType")
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<string>("ClaimValue")
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<string>("UserId")
|
|
.IsRequired()
|
|
.HasColumnType("varchar(255)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("UserId");
|
|
|
|
b.ToTable("AspNetUserClaims", (string)null);
|
|
|
|
b.HasOne("LEA.Models.ApplicationUser", null)
|
|
.WithMany()
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
|
|
{
|
|
b.Property<string>("LoginProvider")
|
|
.HasMaxLength(128)
|
|
.HasColumnType("varchar(128)");
|
|
|
|
b.Property<string>("ProviderKey")
|
|
.HasMaxLength(128)
|
|
.HasColumnType("varchar(128)");
|
|
|
|
b.Property<string>("ProviderDisplayName")
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<string>("UserId")
|
|
.IsRequired()
|
|
.HasColumnType("varchar(255)");
|
|
|
|
b.HasKey("LoginProvider", "ProviderKey");
|
|
|
|
b.HasIndex("UserId");
|
|
|
|
b.ToTable("AspNetUserLogins", (string)null);
|
|
|
|
b.HasOne("LEA.Models.ApplicationUser", null)
|
|
.WithMany()
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
|
|
{
|
|
b.Property<string>("UserId")
|
|
.HasColumnType("varchar(255)");
|
|
|
|
b.Property<string>("RoleId")
|
|
.HasColumnType("varchar(255)");
|
|
|
|
b.HasKey("UserId", "RoleId");
|
|
|
|
b.HasIndex("RoleId");
|
|
|
|
b.ToTable("AspNetUserRoles", (string)null);
|
|
|
|
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
|
|
.WithMany()
|
|
.HasForeignKey("RoleId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("LEA.Models.ApplicationUser", null)
|
|
.WithMany()
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
|
|
{
|
|
b.Property<string>("UserId")
|
|
.HasColumnType("varchar(255)");
|
|
|
|
b.Property<string>("LoginProvider")
|
|
.HasMaxLength(128)
|
|
.HasColumnType("varchar(128)");
|
|
|
|
b.Property<string>("Name")
|
|
.HasMaxLength(128)
|
|
.HasColumnType("varchar(128)");
|
|
|
|
b.Property<string>("Value")
|
|
.HasColumnType("longtext");
|
|
|
|
b.HasKey("UserId", "LoginProvider", "Name");
|
|
|
|
b.ToTable("AspNetUserTokens", (string)null);
|
|
|
|
b.HasOne("LEA.Models.ApplicationUser", null)
|
|
.WithMany()
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
});
|
|
}
|
|
}
|
|
}
|