//
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using RpgRoller.Data;
#nullable disable
namespace RpgRoller.Migrations
{
[DbContext(typeof(RpgRollerDbContext))]
[Migration("20260226160859_AddAuthorizationRolesAndCampaignDeletion")]
partial class AddAuthorizationRolesAndCampaignDeletion
{
///
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "10.0.2");
modelBuilder.Entity("RpgRoller.Domain.Campaign", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property("GmUserId")
.HasColumnType("TEXT");
b.Property("Name")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("Ruleset")
.IsRequired()
.HasColumnType("TEXT");
b.Property("Version")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("GmUserId");
b.ToTable("Campaigns");
});
modelBuilder.Entity("RpgRoller.Domain.Character", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property("CampaignId")
.HasColumnType("TEXT");
b.Property("Name")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("OwnerUserId")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("CampaignId");
b.HasIndex("OwnerUserId");
b.ToTable("Characters");
});
modelBuilder.Entity("RpgRoller.Domain.RollLogEntry", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property("Breakdown")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("TEXT");
b.Property("CampaignId")
.HasColumnType("TEXT");
b.Property("CharacterId")
.HasColumnType("TEXT");
b.Property("Dice")
.IsRequired()
.HasColumnType("TEXT");
b.Property("Result")
.HasColumnType("INTEGER");
b.Property("RollerUserId")
.HasColumnType("TEXT");
b.Property("SkillId")
.HasColumnType("TEXT");
b.Property("TimestampUtc")
.HasColumnType("TEXT");
b.Property("Visibility")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("CampaignId");
b.HasIndex("CharacterId");
b.HasIndex("RollerUserId");
b.HasIndex("SkillId");
b.ToTable("RollLogEntries");
});
modelBuilder.Entity("RpgRoller.Domain.Skill", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property("AllowFumble")
.HasColumnType("INTEGER");
b.Property("CharacterId")
.HasColumnType("TEXT");
b.Property("DiceRollDefinition")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("Name")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("SkillGroupId")
.HasColumnType("TEXT");
b.Property("WildDice")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("CharacterId");
b.HasIndex("SkillGroupId");
b.ToTable("Skills");
});
modelBuilder.Entity("RpgRoller.Domain.SkillGroup", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property("AllowFumble")
.HasColumnType("INTEGER");
b.Property("CharacterId")
.HasColumnType("TEXT");
b.Property("DiceRollDefinition")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("Name")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("WildDice")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("CharacterId");
b.ToTable("SkillGroups");
});
modelBuilder.Entity("RpgRoller.Domain.UserAccount", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property("ActiveCharacterId")
.HasColumnType("TEXT");
b.Property("DisplayName")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("PasswordHash")
.IsRequired()
.HasColumnType("TEXT");
b.Property("Username")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property("UsernameNormalized")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("UsernameNormalized")
.IsUnique();
b.ToTable("Users");
});
modelBuilder.Entity("RpgRoller.Domain.UserSession", b =>
{
b.Property("Token")
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property("CreatedAtUtc")
.HasColumnType("TEXT");
b.Property("UserId")
.HasColumnType("TEXT");
b.HasKey("Token");
b.HasIndex("UserId");
b.ToTable("Sessions");
});
#pragma warning restore 612, 618
}
}
}