1053 lines
36 KiB
C#
1053 lines
36 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using KoogleApp.Data;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Metadata;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
|
|
#nullable disable
|
|
|
|
namespace Koogle.Infrastructure.Data.Migrations
|
|
{
|
|
[DbContext(typeof(AppDbContext))]
|
|
partial class AppDbContextModelSnapshot : ModelSnapshot
|
|
{
|
|
protected override void BuildModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder
|
|
.HasDefaultSchema("app")
|
|
.HasAnnotation("ProductVersion", "9.0.11")
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
|
|
|
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
|
|
|
modelBuilder.Entity("Koogle.Domain.Entities.Club", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<Guid?>("CreatedById")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<int>("ExpenseCalculation")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<bool>("IsDeleted")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<DateTime?>("ModifiedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<Guid?>("ModifiedById")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(200)
|
|
.HasColumnType("nvarchar(200)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("Name");
|
|
|
|
b.ToTable("Clubs", "app");
|
|
});
|
|
|
|
modelBuilder.Entity("Koogle.Domain.Entities.ClubInvitation", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<Guid>("ClubId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<Guid?>("CreatedById")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<DateTime>("ExpiresAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<bool>("IsDeleted")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<int?>("MaxUses")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<DateTime?>("ModifiedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<Guid?>("ModifiedById")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<string>("Token")
|
|
.IsRequired()
|
|
.HasMaxLength(64)
|
|
.HasColumnType("nvarchar(64)");
|
|
|
|
b.Property<int>("UsedCount")
|
|
.HasColumnType("int");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("ClubId");
|
|
|
|
b.HasIndex("Token")
|
|
.IsUnique();
|
|
|
|
b.ToTable("ClubInvitations", "app");
|
|
});
|
|
|
|
modelBuilder.Entity("Koogle.Domain.Entities.Day", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<Guid>("ClubId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<Guid?>("ClubId1")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<Guid?>("CreatedById")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<bool>("IsDeleted")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<DateTime?>("ModifiedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<Guid?>("ModifiedById")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<DateTime>("PostDate")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<int>("Status")
|
|
.HasColumnType("int");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("ClubId1");
|
|
|
|
b.HasIndex("ClubId", "PostDate");
|
|
|
|
b.ToTable("Days", "app");
|
|
});
|
|
|
|
modelBuilder.Entity("Koogle.Domain.Entities.DayPerson", b =>
|
|
{
|
|
b.Property<Guid>("DayId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<Guid>("PersonId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<Guid>("ClubId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.HasKey("DayId", "PersonId");
|
|
|
|
b.HasIndex("ClubId");
|
|
|
|
b.HasIndex("DayId");
|
|
|
|
b.HasIndex("PersonId");
|
|
|
|
b.HasIndex("DayId", "ClubId");
|
|
|
|
b.HasIndex("PersonId", "ClubId");
|
|
|
|
b.ToTable("DayPersons", "app");
|
|
});
|
|
|
|
modelBuilder.Entity("Koogle.Domain.Entities.Expense", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<Guid>("ClubId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<Guid?>("ClubId1")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<Guid?>("CreatedById")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<string>("Description")
|
|
.IsRequired()
|
|
.HasMaxLength(2000)
|
|
.HasColumnType("nvarchar(2000)");
|
|
|
|
b.Property<int>("ExpenseType")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<bool>("IsDeleted")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<bool>("IsInverse")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<bool>("IsOneClick")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<bool>("IsVariable")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<DateTime?>("ModifiedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<Guid?>("ModifiedById")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(200)
|
|
.HasColumnType("nvarchar(200)");
|
|
|
|
b.Property<decimal>("Price")
|
|
.HasPrecision(18, 2)
|
|
.HasColumnType("decimal(18,2)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("ClubId");
|
|
|
|
b.HasIndex("ClubId1");
|
|
|
|
b.HasIndex("ClubId", "Name");
|
|
|
|
b.ToTable("Expenses", "app");
|
|
});
|
|
|
|
modelBuilder.Entity("Koogle.Domain.Entities.ExpenseTrigger", b =>
|
|
{
|
|
b.Property<Guid>("ClubId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<Guid>("ExpenseId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<Guid>("TriggerId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<DateTime>("AssignedAt")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("datetime2")
|
|
.HasDefaultValueSql("SYSUTCDATETIME()");
|
|
|
|
b.Property<Guid>("AssignedById")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.HasKey("ClubId", "ExpenseId", "TriggerId");
|
|
|
|
b.HasIndex("ClubId");
|
|
|
|
b.HasIndex("ExpenseId");
|
|
|
|
b.HasIndex("TriggerId");
|
|
|
|
b.HasIndex("ExpenseId", "ClubId");
|
|
|
|
b.ToTable("ExpenseTriggers", "app");
|
|
});
|
|
|
|
modelBuilder.Entity("Koogle.Domain.Entities.Game", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<Guid>("ClubId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<DateTime?>("CompletedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<Guid?>("CreatedById")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<Guid>("DayId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<string>("GameData")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("GameType")
|
|
.IsRequired()
|
|
.HasMaxLength(50)
|
|
.HasColumnType("nvarchar(50)");
|
|
|
|
b.Property<bool>("IsDeleted")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<DateTime?>("ModifiedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<Guid?>("ModifiedById")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<byte[]>("RowVersion")
|
|
.IsConcurrencyToken()
|
|
.ValueGeneratedOnAddOrUpdate()
|
|
.HasColumnType("rowversion");
|
|
|
|
b.Property<DateTime?>("StartedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("Status")
|
|
.IsRequired()
|
|
.HasMaxLength(20)
|
|
.HasColumnType("nvarchar(20)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("ClubId");
|
|
|
|
b.HasIndex("DayId");
|
|
|
|
b.HasIndex("DayId", "Status");
|
|
|
|
b.ToTable("Games", "app", t =>
|
|
{
|
|
t.HasCheckConstraint("CK_Games_GameData_IsJson", "ISJSON([GameData]) > 0");
|
|
});
|
|
});
|
|
|
|
modelBuilder.Entity("Koogle.Domain.Entities.GamePerson", b =>
|
|
{
|
|
b.Property<Guid>("GameId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<Guid>("PersonId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<Guid>("ClubId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.HasKey("GameId", "PersonId");
|
|
|
|
b.HasIndex("ClubId");
|
|
|
|
b.HasIndex("GameId");
|
|
|
|
b.HasIndex("PersonId");
|
|
|
|
b.ToTable("GamePersons", "app");
|
|
});
|
|
|
|
modelBuilder.Entity("Koogle.Domain.Entities.Person", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<Guid>("ClubId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<Guid?>("ClubId1")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<Guid?>("CreatedById")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<bool>("IsDeleted")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<DateTime?>("ModifiedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<Guid?>("ModifiedById")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(200)
|
|
.HasColumnType("nvarchar(200)");
|
|
|
|
b.Property<int>("PersonStatus")
|
|
.HasColumnType("int");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("ClubId");
|
|
|
|
b.HasIndex("ClubId1");
|
|
|
|
b.ToTable("Persons", "app");
|
|
});
|
|
|
|
modelBuilder.Entity("Koogle.Domain.Entities.PersonExpense", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<Guid>("AssignedById")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<Guid>("ClubId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<Guid?>("CreatedById")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<Guid>("DayId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<Guid>("ExpenseId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<int>("ExpenseType")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<Guid?>("GameId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<bool>("IsDeleted")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<DateTime?>("ModifiedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<Guid?>("ModifiedById")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(200)
|
|
.HasColumnType("nvarchar(200)");
|
|
|
|
b.Property<int>("PersonExpenseStatus")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<Guid>("PersonId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<decimal>("Price")
|
|
.HasPrecision(18, 2)
|
|
.HasColumnType("decimal(18,2)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("ClubId");
|
|
|
|
b.HasIndex("DayId");
|
|
|
|
b.HasIndex("ExpenseId");
|
|
|
|
b.HasIndex("GameId");
|
|
|
|
b.HasIndex("PersonId", "DayId");
|
|
|
|
b.ToTable("PersonExpenses", "app");
|
|
});
|
|
|
|
modelBuilder.Entity("Koogle.Domain.Entities.PlayerGameStatistics", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<int>("BellCount")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int>("CircleCount")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int>("ClearedCount")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<Guid>("ClubId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<Guid?>("CreatedById")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<Guid>("GameId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<int>("GutterCount")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<bool>("IsDeleted")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<DateTime?>("ModifiedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<Guid?>("ModifiedById")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<Guid>("PersonId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<int>("PinCount")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int>("StrikeCount")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int>("ThrowCount")
|
|
.HasColumnType("int");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("ClubId");
|
|
|
|
b.HasIndex("GameId");
|
|
|
|
b.HasIndex("PersonId");
|
|
|
|
b.HasIndex("GameId", "PersonId")
|
|
.IsUnique();
|
|
|
|
b.ToTable("PlayerGameStatistics", "app");
|
|
});
|
|
|
|
modelBuilder.Entity("Koogle.Domain.Entities.Trigger", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<Guid?>("CreatedById")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<string>("Description")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<int>("ExpenseTriggerType")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<bool>("IsDeleted")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<DateTime?>("ModifiedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<Guid?>("ModifiedById")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(200)
|
|
.HasColumnType("nvarchar(200)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("ExpenseTriggerType");
|
|
|
|
b.ToTable("Triggers", "app");
|
|
});
|
|
|
|
modelBuilder.Entity("Koogle.Domain.Entities.UserProfile", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<Guid?>("CreatedById")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<Guid?>("CurrentClubId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<string>("DisplayName")
|
|
.IsRequired()
|
|
.HasMaxLength(200)
|
|
.HasColumnType("nvarchar(200)");
|
|
|
|
b.Property<Guid>("IdentityUserId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<bool>("IsDeleted")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<string>("Locale")
|
|
.HasMaxLength(20)
|
|
.IsUnicode(false)
|
|
.HasColumnType("varchar(20)");
|
|
|
|
b.Property<DateTime?>("ModifiedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<Guid?>("ModifiedById")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<string>("TimeZone")
|
|
.HasMaxLength(64)
|
|
.IsUnicode(false)
|
|
.HasColumnType("varchar(64)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("CurrentClubId");
|
|
|
|
b.HasIndex("IdentityUserId")
|
|
.IsUnique();
|
|
|
|
b.ToTable("UserProfiles", "app");
|
|
});
|
|
|
|
modelBuilder.Entity("Koogle.Domain.Entities.UserProfileClub", b =>
|
|
{
|
|
b.Property<Guid>("UserProfileId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<Guid>("ClubId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<DateTime?>("ApprovedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<Guid?>("ApprovedById")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<DateTime>("AssignedAt")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("datetime2")
|
|
.HasDefaultValueSql("SYSUTCDATETIME()");
|
|
|
|
b.Property<Guid>("AssignedById")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<Guid?>("ClubId1")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<bool>("IsDefault")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<DateTime?>("RejectedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<Guid?>("RejectedById")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<string>("RejectionReason")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<int>("Status")
|
|
.HasColumnType("int");
|
|
|
|
b.HasKey("UserProfileId", "ClubId");
|
|
|
|
b.HasIndex("ClubId");
|
|
|
|
b.HasIndex("ClubId1");
|
|
|
|
b.HasIndex("UserProfileId")
|
|
.IsUnique()
|
|
.HasFilter("[IsDefault] = 1");
|
|
|
|
b.ToTable("UserProfileClubs", "app");
|
|
});
|
|
|
|
modelBuilder.Entity("Koogle.Domain.Entities.UserProfileClubRoleAssignment", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<DateTime>("AssignedAt")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("datetime2")
|
|
.HasDefaultValueSql("SYSUTCDATETIME()");
|
|
|
|
b.Property<Guid>("AssignedById")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<Guid>("ClubId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<Guid?>("CreatedById")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<bool>("IsDeleted")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<DateTime?>("ModifiedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<Guid?>("ModifiedById")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<Guid>("RoleId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<string>("RoleName")
|
|
.IsRequired()
|
|
.HasMaxLength(200)
|
|
.HasColumnType("nvarchar(200)");
|
|
|
|
b.Property<Guid>("UserProfileId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("ClubId");
|
|
|
|
b.HasIndex("RoleId");
|
|
|
|
b.HasIndex("UserProfileId", "ClubId", "RoleId")
|
|
.IsUnique()
|
|
.HasFilter("[IsDeleted] = 0");
|
|
|
|
b.ToTable("UserProfileClubRoleAssignments", "app");
|
|
});
|
|
|
|
modelBuilder.Entity("Koogle.Domain.Entities.ClubInvitation", b =>
|
|
{
|
|
b.HasOne("Koogle.Domain.Entities.Club", "Club")
|
|
.WithMany()
|
|
.HasForeignKey("ClubId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Club");
|
|
});
|
|
|
|
modelBuilder.Entity("Koogle.Domain.Entities.Day", b =>
|
|
{
|
|
b.HasOne("Koogle.Domain.Entities.Club", "Club")
|
|
.WithMany()
|
|
.HasForeignKey("ClubId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.HasOne("Koogle.Domain.Entities.Club", null)
|
|
.WithMany("Days")
|
|
.HasForeignKey("ClubId1");
|
|
|
|
b.Navigation("Club");
|
|
});
|
|
|
|
modelBuilder.Entity("Koogle.Domain.Entities.DayPerson", b =>
|
|
{
|
|
b.HasOne("Koogle.Domain.Entities.Club", "Club")
|
|
.WithMany()
|
|
.HasForeignKey("ClubId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.HasOne("Koogle.Domain.Entities.Day", "Day")
|
|
.WithMany("DayPersons")
|
|
.HasForeignKey("DayId", "ClubId")
|
|
.HasPrincipalKey("Id", "ClubId")
|
|
.OnDelete(DeleteBehavior.NoAction)
|
|
.IsRequired();
|
|
|
|
b.HasOne("Koogle.Domain.Entities.Person", "Person")
|
|
.WithMany("DayPersons")
|
|
.HasForeignKey("PersonId", "ClubId")
|
|
.HasPrincipalKey("Id", "ClubId")
|
|
.OnDelete(DeleteBehavior.NoAction)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Club");
|
|
|
|
b.Navigation("Day");
|
|
|
|
b.Navigation("Person");
|
|
});
|
|
|
|
modelBuilder.Entity("Koogle.Domain.Entities.Expense", b =>
|
|
{
|
|
b.HasOne("Koogle.Domain.Entities.Club", "Club")
|
|
.WithMany()
|
|
.HasForeignKey("ClubId")
|
|
.OnDelete(DeleteBehavior.NoAction)
|
|
.IsRequired();
|
|
|
|
b.HasOne("Koogle.Domain.Entities.Club", null)
|
|
.WithMany("Expenses")
|
|
.HasForeignKey("ClubId1");
|
|
|
|
b.Navigation("Club");
|
|
});
|
|
|
|
modelBuilder.Entity("Koogle.Domain.Entities.ExpenseTrigger", b =>
|
|
{
|
|
b.HasOne("Koogle.Domain.Entities.Club", "Club")
|
|
.WithMany()
|
|
.HasForeignKey("ClubId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.HasOne("Koogle.Domain.Entities.Trigger", "Trigger")
|
|
.WithMany()
|
|
.HasForeignKey("TriggerId")
|
|
.OnDelete(DeleteBehavior.NoAction)
|
|
.IsRequired();
|
|
|
|
b.HasOne("Koogle.Domain.Entities.Expense", "Expense")
|
|
.WithMany()
|
|
.HasForeignKey("ExpenseId", "ClubId")
|
|
.HasPrincipalKey("Id", "ClubId")
|
|
.OnDelete(DeleteBehavior.NoAction)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Club");
|
|
|
|
b.Navigation("Expense");
|
|
|
|
b.Navigation("Trigger");
|
|
});
|
|
|
|
modelBuilder.Entity("Koogle.Domain.Entities.Game", b =>
|
|
{
|
|
b.HasOne("Koogle.Domain.Entities.Club", "Club")
|
|
.WithMany()
|
|
.HasForeignKey("ClubId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("Koogle.Domain.Entities.Day", "Day")
|
|
.WithMany()
|
|
.HasForeignKey("DayId")
|
|
.OnDelete(DeleteBehavior.NoAction)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Club");
|
|
|
|
b.Navigation("Day");
|
|
});
|
|
|
|
modelBuilder.Entity("Koogle.Domain.Entities.GamePerson", b =>
|
|
{
|
|
b.HasOne("Koogle.Domain.Entities.Club", "Club")
|
|
.WithMany()
|
|
.HasForeignKey("ClubId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("Koogle.Domain.Entities.Game", "Game")
|
|
.WithMany("GamePersons")
|
|
.HasForeignKey("GameId")
|
|
.OnDelete(DeleteBehavior.NoAction)
|
|
.IsRequired();
|
|
|
|
b.HasOne("Koogle.Domain.Entities.Person", "Person")
|
|
.WithMany()
|
|
.HasForeignKey("PersonId")
|
|
.OnDelete(DeleteBehavior.NoAction)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Club");
|
|
|
|
b.Navigation("Game");
|
|
|
|
b.Navigation("Person");
|
|
});
|
|
|
|
modelBuilder.Entity("Koogle.Domain.Entities.Person", b =>
|
|
{
|
|
b.HasOne("Koogle.Domain.Entities.Club", "Club")
|
|
.WithMany()
|
|
.HasForeignKey("ClubId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.HasOne("Koogle.Domain.Entities.Club", null)
|
|
.WithMany("Persons")
|
|
.HasForeignKey("ClubId1");
|
|
|
|
b.Navigation("Club");
|
|
});
|
|
|
|
modelBuilder.Entity("Koogle.Domain.Entities.PersonExpense", b =>
|
|
{
|
|
b.HasOne("Koogle.Domain.Entities.Club", "Club")
|
|
.WithMany()
|
|
.HasForeignKey("ClubId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("Koogle.Domain.Entities.Day", "Day")
|
|
.WithMany()
|
|
.HasForeignKey("DayId")
|
|
.OnDelete(DeleteBehavior.NoAction)
|
|
.IsRequired();
|
|
|
|
b.HasOne("Koogle.Domain.Entities.Expense", "Expense")
|
|
.WithMany()
|
|
.HasForeignKey("ExpenseId")
|
|
.OnDelete(DeleteBehavior.NoAction)
|
|
.IsRequired();
|
|
|
|
b.HasOne("Koogle.Domain.Entities.Game", "Game")
|
|
.WithMany()
|
|
.HasForeignKey("GameId")
|
|
.OnDelete(DeleteBehavior.NoAction);
|
|
|
|
b.HasOne("Koogle.Domain.Entities.Person", "Person")
|
|
.WithMany("Expenses")
|
|
.HasForeignKey("PersonId")
|
|
.OnDelete(DeleteBehavior.NoAction)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Club");
|
|
|
|
b.Navigation("Day");
|
|
|
|
b.Navigation("Expense");
|
|
|
|
b.Navigation("Game");
|
|
|
|
b.Navigation("Person");
|
|
});
|
|
|
|
modelBuilder.Entity("Koogle.Domain.Entities.PlayerGameStatistics", b =>
|
|
{
|
|
b.HasOne("Koogle.Domain.Entities.Club", "Club")
|
|
.WithMany()
|
|
.HasForeignKey("ClubId")
|
|
.OnDelete(DeleteBehavior.NoAction)
|
|
.IsRequired();
|
|
|
|
b.HasOne("Koogle.Domain.Entities.Game", "Game")
|
|
.WithMany()
|
|
.HasForeignKey("GameId")
|
|
.OnDelete(DeleteBehavior.NoAction)
|
|
.IsRequired();
|
|
|
|
b.HasOne("Koogle.Domain.Entities.Person", "Person")
|
|
.WithMany()
|
|
.HasForeignKey("PersonId")
|
|
.OnDelete(DeleteBehavior.NoAction)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Club");
|
|
|
|
b.Navigation("Game");
|
|
|
|
b.Navigation("Person");
|
|
});
|
|
|
|
modelBuilder.Entity("Koogle.Domain.Entities.UserProfile", b =>
|
|
{
|
|
b.HasOne("Koogle.Domain.Entities.Club", "CurrentClub")
|
|
.WithMany()
|
|
.HasForeignKey("CurrentClubId");
|
|
|
|
b.Navigation("CurrentClub");
|
|
});
|
|
|
|
modelBuilder.Entity("Koogle.Domain.Entities.UserProfileClub", b =>
|
|
{
|
|
b.HasOne("Koogle.Domain.Entities.Club", "Club")
|
|
.WithMany()
|
|
.HasForeignKey("ClubId")
|
|
.OnDelete(DeleteBehavior.NoAction)
|
|
.IsRequired();
|
|
|
|
b.HasOne("Koogle.Domain.Entities.Club", null)
|
|
.WithMany("Users")
|
|
.HasForeignKey("ClubId1");
|
|
|
|
b.HasOne("Koogle.Domain.Entities.UserProfile", "UserProfile")
|
|
.WithMany("Clubs")
|
|
.HasForeignKey("UserProfileId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Club");
|
|
|
|
b.Navigation("UserProfile");
|
|
});
|
|
|
|
modelBuilder.Entity("Koogle.Domain.Entities.UserProfileClubRoleAssignment", b =>
|
|
{
|
|
b.HasOne("Koogle.Domain.Entities.UserProfileClub", "UserProfileClub")
|
|
.WithMany("RoleAssignments")
|
|
.HasForeignKey("UserProfileId", "ClubId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("UserProfileClub");
|
|
});
|
|
|
|
modelBuilder.Entity("Koogle.Domain.Entities.Club", b =>
|
|
{
|
|
b.Navigation("Days");
|
|
|
|
b.Navigation("Expenses");
|
|
|
|
b.Navigation("Persons");
|
|
|
|
b.Navigation("Users");
|
|
});
|
|
|
|
modelBuilder.Entity("Koogle.Domain.Entities.Day", b =>
|
|
{
|
|
b.Navigation("DayPersons");
|
|
});
|
|
|
|
modelBuilder.Entity("Koogle.Domain.Entities.Game", b =>
|
|
{
|
|
b.Navigation("GamePersons");
|
|
});
|
|
|
|
modelBuilder.Entity("Koogle.Domain.Entities.Person", b =>
|
|
{
|
|
b.Navigation("DayPersons");
|
|
|
|
b.Navigation("Expenses");
|
|
});
|
|
|
|
modelBuilder.Entity("Koogle.Domain.Entities.UserProfile", b =>
|
|
{
|
|
b.Navigation("Clubs");
|
|
});
|
|
|
|
modelBuilder.Entity("Koogle.Domain.Entities.UserProfileClub", b =>
|
|
{
|
|
b.Navigation("RoleAssignments");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|