isn/src/isnd/Migrations/ApplicationDbContextModelSnapshot.cs

314 lines
10 KiB
C#
Raw Normal View History

2021-04-25 12:12:50 +01:00
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
2021-08-15 19:09:01 +01:00
using isnd.Data;
2021-04-25 12:12:50 +01:00
2021-08-15 01:50:07 +01:00
namespace isndhost.Migrations
2021-04-25 12:12:50 +01:00
{
[DbContext(typeof(ApplicationDbContext))]
partial class ApplicationDbContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn)
.HasAnnotation("ProductVersion", "2.2.6-servicing-10079")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
{
b.Property<string>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken();
b.Property<string>("Name")
.HasMaxLength(256);
b.Property<string>("NormalizedName")
.HasMaxLength(256);
b.HasKey("Id");
b.HasIndex("NormalizedName")
.IsUnique()
.HasName("RoleNameIndex");
b.ToTable("AspNetRoles");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ClaimType");
b.Property<string>("ClaimValue");
b.Property<string>("RoleId")
.IsRequired();
b.HasKey("Id");
b.HasIndex("RoleId");
b.ToTable("AspNetRoleClaims");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ClaimType");
b.Property<string>("ClaimValue");
b.Property<string>("UserId")
.IsRequired();
b.HasKey("Id");
b.HasIndex("UserId");
b.ToTable("AspNetUserClaims");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
{
b.Property<string>("LoginProvider");
b.Property<string>("ProviderKey");
b.Property<string>("ProviderDisplayName");
b.Property<string>("UserId")
.IsRequired();
b.HasKey("LoginProvider", "ProviderKey");
b.HasIndex("UserId");
b.ToTable("AspNetUserLogins");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
{
b.Property<string>("UserId");
b.Property<string>("RoleId");
b.HasKey("UserId", "RoleId");
b.HasIndex("RoleId");
b.ToTable("AspNetUserRoles");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
{
b.Property<string>("UserId");
b.Property<string>("LoginProvider");
b.Property<string>("Name");
b.Property<string>("Value");
b.HasKey("UserId", "LoginProvider", "Name");
b.ToTable("AspNetUserTokens");
});
2021-07-05 12:55:52 +01:00
modelBuilder.Entity("isn.Data.ApiKeys.ApiKey", b =>
2021-05-02 16:37:03 +01:00
{
b.Property<string>("Id")
.ValueGeneratedOnAdd();
b.Property<DateTime>("CreationDate");
b.Property<string>("Name");
b.Property<string>("UserId")
.IsRequired();
b.Property<int>("ValidityPeriodInDays");
b.HasKey("Id");
b.HasIndex("UserId");
b.ToTable("ApiKeys");
});
2021-07-05 12:55:52 +01:00
modelBuilder.Entity("isn.Data.ApplicationUser", b =>
2021-04-25 12:12:50 +01:00
{
b.Property<string>("Id")
.ValueGeneratedOnAdd();
b.Property<int>("AccessFailedCount");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken();
b.Property<string>("Email")
.HasMaxLength(256);
b.Property<bool>("EmailConfirmed");
b.Property<string>("FullName");
b.Property<bool>("LockoutEnabled");
b.Property<DateTimeOffset?>("LockoutEnd");
b.Property<string>("NormalizedEmail")
.HasMaxLength(256);
b.Property<string>("NormalizedUserName")
.HasMaxLength(256);
b.Property<string>("PasswordHash");
b.Property<string>("PhoneNumber");
b.Property<bool>("PhoneNumberConfirmed");
b.Property<string>("SecurityStamp");
b.Property<bool>("TwoFactorEnabled");
b.Property<string>("UserName")
.HasMaxLength(256);
b.HasKey("Id");
b.HasIndex("NormalizedEmail")
.HasName("EmailIndex");
b.HasIndex("NormalizedUserName")
.IsUnique()
.HasName("UserNameIndex");
b.ToTable("AspNetUsers");
});
2021-07-05 12:55:52 +01:00
modelBuilder.Entity("isn.Data.Package", b =>
2021-05-16 14:07:14 +01:00
{
b.Property<string>("Id")
.ValueGeneratedOnAdd();
2021-06-21 23:38:05 +01:00
b.Property<string>("Description")
.HasMaxLength(1024);
2021-05-16 14:07:14 +01:00
b.Property<string>("OwnerId")
.IsRequired();
b.HasKey("Id");
b.HasIndex("OwnerId");
b.ToTable("Packages");
});
2021-07-05 12:55:52 +01:00
modelBuilder.Entity("isn.Data.PackageVersion", b =>
2021-05-16 14:07:14 +01:00
{
b.Property<string>("PackageId");
2021-05-16 14:07:14 +01:00
b.Property<string>("FullString")
.HasMaxLength(256);
2021-05-16 14:07:14 +01:00
2021-06-21 23:38:05 +01:00
b.Property<string>("Type")
.HasMaxLength(256);
2021-05-16 14:07:14 +01:00
b.Property<bool>("IsPrerelease");
b.Property<int>("Major");
b.Property<int>("Minor");
b.Property<int>("Patch");
2021-06-21 23:38:05 +01:00
b.HasKey("PackageId", "FullString", "Type");
2021-05-16 14:07:14 +01:00
b.ToTable("PackageVersions");
});
2021-04-25 12:12:50 +01:00
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
{
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole")
.WithMany()
.HasForeignKey("RoleId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
{
2021-07-05 12:55:52 +01:00
b.HasOne("isn.Data.ApplicationUser")
2021-04-25 12:12:50 +01:00
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
{
2021-07-05 12:55:52 +01:00
b.HasOne("isn.Data.ApplicationUser")
2021-04-25 12:12:50 +01:00
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
{
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole")
.WithMany()
.HasForeignKey("RoleId")
.OnDelete(DeleteBehavior.Cascade);
2021-07-05 12:55:52 +01:00
b.HasOne("isn.Data.ApplicationUser")
2021-04-25 12:12:50 +01:00
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
{
2021-07-05 12:55:52 +01:00
b.HasOne("isn.Data.ApplicationUser")
2021-04-25 12:12:50 +01:00
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
});
2021-05-02 16:37:03 +01:00
2021-07-05 12:55:52 +01:00
modelBuilder.Entity("isn.Data.ApiKeys.ApiKey", b =>
2021-05-02 16:37:03 +01:00
{
2021-07-05 12:55:52 +01:00
b.HasOne("isn.Data.ApplicationUser", "User")
2021-05-02 16:37:03 +01:00
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
});
2021-05-16 14:07:14 +01:00
2021-07-05 12:55:52 +01:00
modelBuilder.Entity("isn.Data.Package", b =>
2021-05-16 14:07:14 +01:00
{
2021-07-05 12:55:52 +01:00
b.HasOne("isn.Data.ApplicationUser", "Owner")
2021-05-16 14:07:14 +01:00
.WithMany()
.HasForeignKey("OwnerId")
.OnDelete(DeleteBehavior.Cascade);
});
2021-07-05 12:55:52 +01:00
modelBuilder.Entity("isn.Data.PackageVersion", b =>
2021-05-16 14:07:14 +01:00
{
2021-07-05 12:55:52 +01:00
b.HasOne("isn.Data.Package", "Package")
2021-06-21 23:38:05 +01:00
.WithMany("Versions")
2021-05-16 14:07:14 +01:00
.HasForeignKey("PackageId")
.OnDelete(DeleteBehavior.Cascade);
});
2021-04-25 12:12:50 +01:00
#pragma warning restore 612, 618
}
}
}