508 lines
17 KiB
C#
508 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 Sledgemapper.Api.Infrastructure.Data;
|
|
|
|
namespace Sledgemapper.Api.Migrations
|
|
{
|
|
[DbContext(typeof(SledgemapperDbContext))]
|
|
[Migration("20210901223606_uniquesessionindex")]
|
|
partial class uniquesessionindex
|
|
{
|
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder
|
|
.HasAnnotation("ProductVersion", "5.0.6");
|
|
|
|
modelBuilder.Entity("CampaignUser", b =>
|
|
{
|
|
b.Property<Guid>("CampaignsCampaignId")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("InvitedUsersId")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("CampaignsCampaignId", "InvitedUsersId");
|
|
|
|
b.HasIndex("InvitedUsersId");
|
|
|
|
b.ToTable("CampaignUser");
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
|
|
{
|
|
b.Property<string>("Id")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("ConcurrencyStamp")
|
|
.IsConcurrencyToken()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Name")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("NormalizedName")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("NormalizedName")
|
|
.IsUnique()
|
|
.HasDatabaseName("RoleNameIndex");
|
|
|
|
b.ToTable("AspNetRoles");
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("ClaimType")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("ClaimValue")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("RoleId")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("RoleId");
|
|
|
|
b.ToTable("AspNetRoleClaims");
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUser", b =>
|
|
{
|
|
b.Property<string>("Id")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<int>("AccessFailedCount")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("ConcurrencyStamp")
|
|
.IsConcurrencyToken()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Email")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<bool>("EmailConfirmed")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<bool>("LockoutEnabled")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<DateTimeOffset?>("LockoutEnd")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("NormalizedEmail")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("NormalizedUserName")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("PasswordHash")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("PhoneNumber")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<bool>("PhoneNumberConfirmed")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("SecurityStamp")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<bool>("TwoFactorEnabled")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("UserName")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("NormalizedEmail")
|
|
.HasDatabaseName("EmailIndex");
|
|
|
|
b.HasIndex("NormalizedUserName")
|
|
.IsUnique()
|
|
.HasDatabaseName("UserNameIndex");
|
|
|
|
b.ToTable("AspNetUsers");
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
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("AspNetUserClaims");
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
|
|
{
|
|
b.Property<string>("LoginProvider")
|
|
.HasMaxLength(128)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("ProviderKey")
|
|
.HasMaxLength(128)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("ProviderDisplayName")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("UserId")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("LoginProvider", "ProviderKey");
|
|
|
|
b.HasIndex("UserId");
|
|
|
|
b.ToTable("AspNetUserLogins");
|
|
});
|
|
|
|
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("AspNetUserRoles");
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
|
|
{
|
|
b.Property<string>("UserId")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("LoginProvider")
|
|
.HasMaxLength(128)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Name")
|
|
.HasMaxLength(128)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Value")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("UserId", "LoginProvider", "Name");
|
|
|
|
b.ToTable("AspNetUserTokens");
|
|
});
|
|
|
|
modelBuilder.Entity("Sledgemapper.Api.Core.Entities.Campaign", b =>
|
|
{
|
|
b.Property<Guid>("CampaignId")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("CampaignName")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("OwnerId")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("CampaignId");
|
|
|
|
b.HasIndex("OwnerId");
|
|
|
|
b.HasIndex("CampaignName", "OwnerId")
|
|
.IsUnique();
|
|
|
|
b.ToTable("Campaigns");
|
|
});
|
|
|
|
modelBuilder.Entity("Sledgemapper.Api.Core.Entities.Map", b =>
|
|
{
|
|
b.Property<int>("MapId")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int>("CampaignId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("MapName")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("MapId");
|
|
|
|
b.ToTable("Maps");
|
|
});
|
|
|
|
modelBuilder.Entity("Sledgemapper.Api.Models.MapLog", b =>
|
|
{
|
|
b.Property<int>("MapLogId")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Object")
|
|
.IsRequired()
|
|
.HasMaxLength(256)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Operation")
|
|
.IsRequired()
|
|
.HasMaxLength(1)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<int>("SessionId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<double>("Timestamp")
|
|
.HasColumnType("REAL");
|
|
|
|
b.Property<string>("Type")
|
|
.IsRequired()
|
|
.HasMaxLength(256)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("UserId")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("MapLogId");
|
|
|
|
b.ToTable("MapLogs");
|
|
});
|
|
|
|
modelBuilder.Entity("Sledgemapper.Api.Models.Session", b =>
|
|
{
|
|
b.Property<int>("SessionId")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<Guid>("CampaignId")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("OwnerUserId")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("SessionName")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("SessionId");
|
|
|
|
b.HasIndex("CampaignId", "SessionId")
|
|
.IsUnique();
|
|
|
|
b.ToTable("Sessions");
|
|
});
|
|
|
|
modelBuilder.Entity("Sledgemapper.Api.Models.SessionUser", b =>
|
|
{
|
|
b.Property<int>("SessionUserId")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int>("SessionId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int>("UserId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.HasKey("SessionUserId");
|
|
|
|
b.ToTable("SessionUsers");
|
|
});
|
|
|
|
modelBuilder.Entity("Sledgemapper.Api.Models.Snapshot", b =>
|
|
{
|
|
b.Property<int>("SnapshotId")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Object")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<int>("SessionId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<double>("Timestamp")
|
|
.HasColumnType("REAL");
|
|
|
|
b.HasKey("SnapshotId");
|
|
|
|
b.ToTable("Snapshots");
|
|
});
|
|
|
|
modelBuilder.Entity("Sledgemapper.Api.Models.UserConnection", b =>
|
|
{
|
|
b.Property<int>("UserConnectionId")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("ConnectionId")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<int>("UserId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.HasKey("UserConnectionId");
|
|
|
|
b.ToTable("UserConnections");
|
|
});
|
|
|
|
modelBuilder.Entity("Sledgemapper.Entities.User", b =>
|
|
{
|
|
b.HasBaseType("Microsoft.AspNetCore.Identity.IdentityUser");
|
|
|
|
b.Property<string>("FirstName")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Initials")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("LastName")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<byte[]>("PasswordSalt")
|
|
.HasColumnType("BLOB");
|
|
|
|
b.ToTable("Users");
|
|
});
|
|
|
|
modelBuilder.Entity("CampaignUser", b =>
|
|
{
|
|
b.HasOne("Sledgemapper.Api.Core.Entities.Campaign", null)
|
|
.WithMany()
|
|
.HasForeignKey("CampaignsCampaignId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("Sledgemapper.Entities.User", null)
|
|
.WithMany()
|
|
.HasForeignKey("InvitedUsersId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
|
|
{
|
|
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
|
|
.WithMany()
|
|
.HasForeignKey("RoleId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
|
|
{
|
|
b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null)
|
|
.WithMany()
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
|
|
{
|
|
b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null)
|
|
.WithMany()
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
|
|
{
|
|
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
|
|
.WithMany()
|
|
.HasForeignKey("RoleId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null)
|
|
.WithMany()
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
|
|
{
|
|
b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null)
|
|
.WithMany()
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
});
|
|
|
|
modelBuilder.Entity("Sledgemapper.Api.Core.Entities.Campaign", b =>
|
|
{
|
|
b.HasOne("Sledgemapper.Entities.User", "Owner")
|
|
.WithMany()
|
|
.HasForeignKey("OwnerId");
|
|
|
|
b.Navigation("Owner");
|
|
});
|
|
|
|
modelBuilder.Entity("Sledgemapper.Api.Models.Session", b =>
|
|
{
|
|
b.HasOne("Sledgemapper.Api.Core.Entities.Campaign", null)
|
|
.WithMany("Maps")
|
|
.HasForeignKey("CampaignId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
});
|
|
|
|
modelBuilder.Entity("Sledgemapper.Entities.User", b =>
|
|
{
|
|
b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null)
|
|
.WithOne()
|
|
.HasForeignKey("Sledgemapper.Entities.User", "Id")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
});
|
|
|
|
modelBuilder.Entity("Sledgemapper.Api.Core.Entities.Campaign", b =>
|
|
{
|
|
b.Navigation("Maps");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|