214 lines
6.9 KiB
C#
214 lines
6.9 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("20210214232542_InitialCreate")]
|
|
partial class InitialCreate
|
|
{
|
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder
|
|
.HasAnnotation("ProductVersion", "5.0.3");
|
|
|
|
modelBuilder.Entity("Sledgemapper.Api.Models.Campaign", b =>
|
|
{
|
|
b.Property<int>("CampaignId")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("CampaignName")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<int>("OwnerUserId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.HasKey("CampaignId");
|
|
|
|
b.ToTable("Campaigns");
|
|
});
|
|
|
|
modelBuilder.Entity("Sledgemapper.Api.Models.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<int>("UserId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.HasKey("MapLogId");
|
|
|
|
b.ToTable("MapLogs");
|
|
});
|
|
|
|
modelBuilder.Entity("Sledgemapper.Api.Models.Session", b =>
|
|
{
|
|
b.Property<int>("SessionId")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int>("OwnerUserId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("SessionName")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("SessionId");
|
|
|
|
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.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int?>("CampaignId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("FirstName")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Initials")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("LastName")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<byte[]>("PasswordHash")
|
|
.HasColumnType("BLOB");
|
|
|
|
b.Property<byte[]>("PasswordSalt")
|
|
.HasColumnType("BLOB");
|
|
|
|
b.Property<string>("Username")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("CampaignId");
|
|
|
|
b.ToTable("Users");
|
|
});
|
|
|
|
modelBuilder.Entity("Sledgemapper.Entities.User", b =>
|
|
{
|
|
b.HasOne("Sledgemapper.Api.Models.Campaign", null)
|
|
.WithMany("InvitedUsers")
|
|
.HasForeignKey("CampaignId");
|
|
});
|
|
|
|
modelBuilder.Entity("Sledgemapper.Api.Models.Campaign", b =>
|
|
{
|
|
b.Navigation("InvitedUsers");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|