Bifrost/src/Bifrost.Web/Data/Migrations/BifrostDbContextModelSnapshot.cs
2026-06-22 15:07:22 +01:00

2075 lines
74 KiB
C#

// <auto-generated />
using System;
using Bifrost.Web.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace Bifrost.Web.Data.Migrations
{
[DbContext(typeof(BifrostDbContext))]
partial class BifrostDbContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "8.0.0")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("Bifrost.Web.Domain.AgentDispatchRun", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<DateTimeOffset?>("CompletedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<string>("Error")
.IsRequired()
.HasColumnType("text");
b.Property<string>("LaunchMode")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("character varying(40)");
b.Property<string>("LogPath")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("character varying(500)");
b.Property<string>("Note")
.IsRequired()
.HasColumnType("text");
b.Property<string>("RequestId")
.IsRequired()
.HasMaxLength(240)
.HasColumnType("character varying(240)");
b.Property<string>("ResultPath")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("character varying(500)");
b.Property<DateTimeOffset>("StartedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<Guid?>("StartedByUserAccountId")
.HasColumnType("uuid");
b.Property<string>("Status")
.IsRequired()
.HasColumnType("text");
b.Property<string>("TargetAgentIdentity")
.IsRequired()
.HasMaxLength(160)
.HasColumnType("character varying(160)");
b.Property<string>("TargetRepoName")
.IsRequired()
.HasMaxLength(120)
.HasColumnType("character varying(120)");
b.Property<string>("TargetRepositoryFullName")
.IsRequired()
.HasMaxLength(240)
.HasColumnType("character varying(240)");
b.Property<string>("ThreadId")
.IsRequired()
.HasMaxLength(120)
.HasColumnType("character varying(120)");
b.Property<string>("TurnId")
.IsRequired()
.HasMaxLength(120)
.HasColumnType("character varying(120)");
b.Property<DateTimeOffset>("UpdatedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<int?>("WorkerProcessId")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("RequestId");
b.HasIndex("StartedByUserAccountId");
b.HasIndex("Status");
b.HasIndex("TargetRepoName", "TargetAgentIdentity", "Status");
b.ToTable("AgentDispatchRuns");
});
modelBuilder.Entity("Bifrost.Web.Domain.AgentTransportReceipt", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<string>("ActivityKind")
.IsRequired()
.HasColumnType("text");
b.Property<string>("ActorName")
.IsRequired()
.HasMaxLength(160)
.HasColumnType("character varying(160)");
b.Property<Guid?>("ActorUserAccountId")
.HasColumnType("uuid");
b.Property<string>("Note")
.IsRequired()
.HasColumnType("text");
b.Property<DateTimeOffset>("OccurredAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<string>("RequestId")
.IsRequired()
.HasMaxLength(240)
.HasColumnType("character varying(240)");
b.Property<string>("Status")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("character varying(40)");
b.Property<string>("TargetAgentIdentity")
.IsRequired()
.HasMaxLength(160)
.HasColumnType("character varying(160)");
b.Property<string>("TargetRepoName")
.IsRequired()
.HasMaxLength(120)
.HasColumnType("character varying(120)");
b.Property<string>("TargetRepositoryFullName")
.IsRequired()
.HasMaxLength(240)
.HasColumnType("character varying(240)");
b.Property<string>("Title")
.IsRequired()
.HasMaxLength(240)
.HasColumnType("character varying(240)");
b.HasKey("Id");
b.HasIndex("ActorUserAccountId");
b.HasIndex("OccurredAtUtc");
b.HasIndex("RequestId");
b.HasIndex("TargetRepoName", "TargetAgentIdentity", "ActivityKind");
b.ToTable("AgentTransportReceipts");
});
modelBuilder.Entity("Bifrost.Web.Domain.Assignment", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<DateTimeOffset>("AssignedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<Guid>("AssignedByUserAccountId")
.HasColumnType("uuid");
b.Property<string>("Note")
.IsRequired()
.HasColumnType("text");
b.Property<Guid>("UserAccountId")
.HasColumnType("uuid");
b.Property<Guid>("WorkItemId")
.HasColumnType("uuid");
b.HasKey("Id");
b.HasIndex("AssignedByUserAccountId");
b.HasIndex("UserAccountId");
b.HasIndex("WorkItemId");
b.ToTable("Assignments");
});
modelBuilder.Entity("Bifrost.Web.Domain.AuditEvent", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<string>("Action")
.IsRequired()
.HasMaxLength(120)
.HasColumnType("character varying(120)");
b.Property<Guid?>("ActorUserAccountId")
.HasColumnType("uuid");
b.Property<string>("Detail")
.IsRequired()
.HasColumnType("text");
b.Property<string>("EntityId")
.IsRequired()
.HasMaxLength(120)
.HasColumnType("character varying(120)");
b.Property<string>("EntityType")
.IsRequired()
.HasMaxLength(120)
.HasColumnType("character varying(120)");
b.Property<DateTimeOffset>("OccurredAtUtc")
.HasColumnType("timestamp with time zone");
b.HasKey("Id");
b.HasIndex("ActorUserAccountId");
b.ToTable("AuditEvents");
});
modelBuilder.Entity("Bifrost.Web.Domain.BridgeAction", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<string>("ActionKind")
.IsRequired()
.HasColumnType("text");
b.Property<string>("ActorKind")
.IsRequired()
.HasColumnType("text");
b.Property<string>("ActorName")
.IsRequired()
.HasMaxLength(160)
.HasColumnType("character varying(160)");
b.Property<Guid?>("ActorUserAccountId")
.HasColumnType("uuid");
b.Property<string>("AuthorityReference")
.IsRequired()
.HasMaxLength(240)
.HasColumnType("character varying(240)");
b.Property<string>("BifrostIdentity")
.IsRequired()
.HasMaxLength(160)
.HasColumnType("character varying(160)");
b.Property<DateTimeOffset?>("CompletedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<string>("EpiphanyAgentIdentity")
.IsRequired()
.HasMaxLength(160)
.HasColumnType("character varying(160)");
b.Property<string>("EpiphanyLaneId")
.IsRequired()
.HasMaxLength(120)
.HasColumnType("character varying(120)");
b.Property<string>("EpiphanyRunId")
.IsRequired()
.HasMaxLength(160)
.HasColumnType("character varying(160)");
b.Property<string>("ExternalReceiptId")
.IsRequired()
.HasMaxLength(240)
.HasColumnType("character varying(240)");
b.Property<string>("FailureReason")
.IsRequired()
.HasColumnType("text");
b.Property<string>("HeimdallCapabilityReference")
.IsRequired()
.HasMaxLength(240)
.HasColumnType("character varying(240)");
b.Property<Guid?>("MotionId")
.HasColumnType("uuid");
b.Property<string>("PolicyDecision")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("character varying(500)");
b.Property<string>("ReceiptPayload")
.IsRequired()
.HasColumnType("text");
b.Property<string>("ReceiptUrl")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("character varying(500)");
b.Property<DateTimeOffset>("RequestedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<string>("SourceId")
.IsRequired()
.HasMaxLength(240)
.HasColumnType("character varying(240)");
b.Property<string>("SourceKind")
.IsRequired()
.HasMaxLength(120)
.HasColumnType("character varying(120)");
b.Property<DateTimeOffset?>("StartedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<string>("Status")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Summary")
.IsRequired()
.HasColumnType("text");
b.Property<string>("TargetLocator")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("character varying(500)");
b.Property<string>("TargetRepositoryFullName")
.IsRequired()
.HasMaxLength(240)
.HasColumnType("character varying(240)");
b.Property<string>("TargetSurface")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Title")
.IsRequired()
.HasMaxLength(240)
.HasColumnType("character varying(240)");
b.Property<DateTimeOffset>("UpdatedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<Guid?>("WorkItemId")
.HasColumnType("uuid");
b.HasKey("Id");
b.HasIndex("ActorUserAccountId");
b.HasIndex("BifrostIdentity");
b.HasIndex("HeimdallCapabilityReference");
b.HasIndex("MotionId");
b.HasIndex("Status");
b.HasIndex("WorkItemId");
b.HasIndex("ActorKind", "ActorName");
b.HasIndex("SourceKind", "SourceId");
b.HasIndex("TargetSurface", "ActionKind", "Status");
b.ToTable("BridgeActions");
});
modelBuilder.Entity("Bifrost.Web.Domain.DecayRun", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<string>("Notes")
.IsRequired()
.HasColumnType("text");
b.Property<DateTimeOffset>("RanAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<decimal>("Rate")
.HasPrecision(8, 4)
.HasColumnType("numeric(8,4)");
b.HasKey("Id");
b.ToTable("DecayRuns");
});
modelBuilder.Entity("Bifrost.Web.Domain.GitHubIssueLink", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<int>("IssueNumber")
.HasColumnType("integer");
b.Property<string>("IssueUrl")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("character varying(500)");
b.Property<DateTimeOffset>("LastSynchronizedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<string>("RepositoryFullName")
.IsRequired()
.HasMaxLength(240)
.HasColumnType("character varying(240)");
b.Property<string>("State")
.IsRequired()
.HasColumnType("text");
b.Property<string>("TitleSnapshot")
.IsRequired()
.HasMaxLength(240)
.HasColumnType("character varying(240)");
b.Property<Guid>("WorkItemId")
.HasColumnType("uuid");
b.HasKey("Id");
b.HasIndex("WorkItemId")
.IsUnique();
b.HasIndex("RepositoryFullName", "IssueNumber")
.IsUnique();
b.ToTable("GitHubIssueLinks");
});
modelBuilder.Entity("Bifrost.Web.Domain.GitHubPullRequestLink", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<bool>("IsMerged")
.HasColumnType("boolean");
b.Property<DateTimeOffset>("LastSynchronizedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<int>("PullRequestNumber")
.HasColumnType("integer");
b.Property<string>("PullRequestUrl")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("character varying(500)");
b.Property<string>("RepositoryFullName")
.IsRequired()
.HasMaxLength(240)
.HasColumnType("character varying(240)");
b.Property<string>("ReviewDecision")
.IsRequired()
.HasColumnType("text");
b.Property<string>("State")
.IsRequired()
.HasColumnType("text");
b.Property<string>("TitleSnapshot")
.IsRequired()
.HasMaxLength(240)
.HasColumnType("character varying(240)");
b.Property<Guid>("WorkItemId")
.HasColumnType("uuid");
b.HasKey("Id");
b.HasIndex("WorkItemId");
b.HasIndex("RepositoryFullName", "PullRequestNumber")
.IsUnique();
b.ToTable("GitHubPullRequestLinks");
});
modelBuilder.Entity("Bifrost.Web.Domain.GovernanceActivityReceipt", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<string>("ActivityKind")
.IsRequired()
.HasColumnType("text");
b.Property<string>("ActorKind")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("character varying(40)");
b.Property<string>("ActorName")
.IsRequired()
.HasMaxLength(160)
.HasColumnType("character varying(160)");
b.Property<Guid?>("ActorUserAccountId")
.HasColumnType("uuid");
b.Property<string>("CommentId")
.IsRequired()
.HasMaxLength(120)
.HasColumnType("character varying(120)");
b.Property<string>("DispatchRequestId")
.IsRequired()
.HasMaxLength(240)
.HasColumnType("character varying(240)");
b.Property<string>("JurisdictionAgentIdentity")
.IsRequired()
.HasMaxLength(160)
.HasColumnType("character varying(160)");
b.Property<string>("JurisdictionRepoName")
.IsRequired()
.HasMaxLength(120)
.HasColumnType("character varying(120)");
b.Property<string>("Note")
.IsRequired()
.HasColumnType("text");
b.Property<DateTimeOffset>("OccurredAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<string>("Title")
.IsRequired()
.HasMaxLength(240)
.HasColumnType("character varying(240)");
b.Property<string>("TopicId")
.IsRequired()
.HasMaxLength(120)
.HasColumnType("character varying(120)");
b.HasKey("Id");
b.HasIndex("ActorUserAccountId");
b.HasIndex("OccurredAtUtc");
b.HasIndex("TopicId");
b.HasIndex("JurisdictionRepoName", "JurisdictionAgentIdentity", "ActivityKind");
b.ToTable("GovernanceActivityReceipts");
});
modelBuilder.Entity("Bifrost.Web.Domain.LedgerEntry", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<DateTimeOffset>("CreatedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<Guid>("CreatedByUserAccountId")
.HasColumnType("uuid");
b.Property<DateTimeOffset>("EffectiveAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<string>("EntryType")
.IsRequired()
.HasColumnType("text");
b.Property<decimal>("NominalAmount")
.HasPrecision(18, 2)
.HasColumnType("numeric(18,2)");
b.Property<string>("Note")
.IsRequired()
.HasColumnType("text");
b.Property<decimal>("Points")
.HasPrecision(18, 2)
.HasColumnType("numeric(18,2)");
b.Property<Guid?>("ProjectId")
.HasColumnType("uuid");
b.Property<string>("Status")
.IsRequired()
.HasColumnType("text");
b.Property<Guid>("UserAccountId")
.HasColumnType("uuid");
b.Property<Guid?>("WorkItemId")
.HasColumnType("uuid");
b.HasKey("Id");
b.HasIndex("CreatedByUserAccountId");
b.HasIndex("ProjectId");
b.HasIndex("UserAccountId");
b.HasIndex("WorkItemId");
b.ToTable("LedgerEntries");
});
modelBuilder.Entity("Bifrost.Web.Domain.MemberProfile", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<string>("Availability")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Headline")
.IsRequired()
.HasMaxLength(240)
.HasColumnType("character varying(240)");
b.Property<string>("Nickname")
.IsRequired()
.HasMaxLength(120)
.HasColumnType("character varying(120)");
b.Property<string>("Notes")
.IsRequired()
.HasColumnType("text");
b.Property<string>("PortfolioUrl")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("character varying(500)");
b.Property<string>("Skills")
.IsRequired()
.HasColumnType("text");
b.Property<DateTimeOffset>("UpdatedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<Guid>("UserAccountId")
.HasColumnType("uuid");
b.HasKey("Id");
b.HasIndex("UserAccountId")
.IsUnique();
b.ToTable("MemberProfiles");
});
modelBuilder.Entity("Bifrost.Web.Domain.Membership", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<DateTimeOffset?>("ApprovedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<bool>("CanManageLedger")
.HasColumnType("boolean");
b.Property<bool>("CanManageProjects")
.HasColumnType("boolean");
b.Property<bool>("CanModerateMotions")
.HasColumnType("boolean");
b.Property<DateTimeOffset>("CreatedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<bool>("IsPlatformAdmin")
.HasColumnType("boolean");
b.Property<string>("Notes")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Status")
.IsRequired()
.HasColumnType("text");
b.Property<Guid>("UserAccountId")
.HasColumnType("uuid");
b.HasKey("Id");
b.HasIndex("UserAccountId")
.IsUnique();
b.ToTable("Memberships");
});
modelBuilder.Entity("Bifrost.Web.Domain.MembershipInvitation", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<DateTimeOffset?>("AcceptedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<Guid?>("AcceptedByUserAccountId")
.HasColumnType("uuid");
b.Property<string>("GitHubLogin")
.IsRequired()
.HasMaxLength(120)
.HasColumnType("character varying(120)");
b.Property<DateTimeOffset>("IssuedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<Guid?>("IssuedByUserAccountId")
.HasColumnType("uuid");
b.Property<string>("NormalizedGitHubLogin")
.IsRequired()
.HasMaxLength(120)
.HasColumnType("character varying(120)");
b.Property<string>("Notes")
.IsRequired()
.HasColumnType("text");
b.Property<DateTimeOffset?>("RevokedAtUtc")
.HasColumnType("timestamp with time zone");
b.HasKey("Id");
b.HasIndex("AcceptedByUserAccountId");
b.HasIndex("IssuedByUserAccountId");
b.HasIndex("NormalizedGitHubLogin")
.IsUnique();
b.ToTable("MembershipInvitations");
});
modelBuilder.Entity("Bifrost.Web.Domain.Motion", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<decimal>("ApprovalThreshold")
.HasPrecision(6, 3)
.HasColumnType("numeric(6,3)");
b.Property<string>("Category")
.IsRequired()
.HasColumnType("text");
b.Property<DateTimeOffset>("ClosesAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<DateTimeOffset>("CreatedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<Guid>("CreatedByUserAccountId")
.HasColumnType("uuid");
b.Property<DateTimeOffset>("OpensAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<Guid?>("ProjectId")
.HasColumnType("uuid");
b.Property<string>("ResolutionNote")
.IsRequired()
.HasColumnType("text");
b.Property<DateTimeOffset?>("ResolvedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<string>("Scope")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Status")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Summary")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Title")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("CreatedByUserAccountId");
b.HasIndex("ProjectId");
b.ToTable("Motions");
});
modelBuilder.Entity("Bifrost.Web.Domain.PatronSupportEvent", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<decimal>("Amount")
.HasPrecision(18, 2)
.HasColumnType("numeric(18,2)");
b.Property<string>("CurrencyCode")
.IsRequired()
.HasMaxLength(12)
.HasColumnType("character varying(12)");
b.Property<string>("ExternalSupportId")
.IsRequired()
.HasMaxLength(240)
.HasColumnType("character varying(240)");
b.Property<bool>("IsCurrentRecurringSupport")
.HasColumnType("boolean");
b.Property<string>("Kind")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Notes")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Provider")
.IsRequired()
.HasColumnType("text");
b.Property<string>("ProviderEventId")
.IsRequired()
.HasMaxLength(240)
.HasColumnType("character varying(240)");
b.Property<string>("ProviderPayerId")
.IsRequired()
.HasMaxLength(240)
.HasColumnType("character varying(240)");
b.Property<string>("ProviderSubscriptionId")
.IsRequired()
.HasMaxLength(240)
.HasColumnType("character varying(240)");
b.Property<DateTimeOffset>("RecordedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<DateTimeOffset>("SupportedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<Guid>("UserAccountId")
.HasColumnType("uuid");
b.HasKey("Id");
b.HasIndex("Provider", "ProviderEventId")
.IsUnique()
.HasFilter("\"ProviderEventId\" <> ''");
b.HasIndex("UserAccountId", "Kind", "IsCurrentRecurringSupport");
b.ToTable("PatronSupportEvents");
});
modelBuilder.Entity("Bifrost.Web.Domain.PayoutProposalBatch", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<DateTimeOffset>("CreatedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<Guid>("CreatedByUserAccountId")
.HasColumnType("uuid");
b.Property<string>("Status")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Summary")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("CreatedByUserAccountId");
b.ToTable("PayoutProposalBatches");
});
modelBuilder.Entity("Bifrost.Web.Domain.PointTransaction", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<decimal>("Amount")
.HasPrecision(18, 2)
.HasColumnType("numeric(18,2)");
b.Property<DateTimeOffset>("CreatedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<bool>("IsDecaying")
.HasColumnType("boolean");
b.Property<string>("Note")
.IsRequired()
.HasColumnType("text");
b.Property<Guid?>("ProjectId")
.HasColumnType("uuid");
b.Property<string>("Type")
.IsRequired()
.HasColumnType("text");
b.Property<Guid>("UserAccountId")
.HasColumnType("uuid");
b.Property<Guid?>("WorkItemId")
.HasColumnType("uuid");
b.HasKey("Id");
b.HasIndex("ProjectId");
b.HasIndex("UserAccountId");
b.HasIndex("WorkItemId");
b.ToTable("PointTransactions");
});
modelBuilder.Entity("Bifrost.Web.Domain.Project", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<DateTimeOffset>("CreatedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<string>("GitHubRepository")
.IsRequired()
.HasMaxLength(240)
.HasColumnType("character varying(240)");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(180)
.HasColumnType("character varying(180)");
b.Property<Guid>("OwnerUserAccountId")
.HasColumnType("uuid");
b.Property<string>("Slug")
.IsRequired()
.HasMaxLength(120)
.HasColumnType("character varying(120)");
b.Property<string>("Status")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Summary")
.IsRequired()
.HasColumnType("text");
b.Property<DateTimeOffset>("UpdatedAtUtc")
.HasColumnType("timestamp with time zone");
b.HasKey("Id");
b.HasIndex("GitHubRepository");
b.HasIndex("OwnerUserAccountId");
b.HasIndex("Slug")
.IsUnique();
b.ToTable("Projects");
});
modelBuilder.Entity("Bifrost.Web.Domain.RevenueEvent", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<decimal>("Amount")
.HasPrecision(18, 2)
.HasColumnType("numeric(18,2)");
b.Property<string>("CurrencyCode")
.IsRequired()
.HasMaxLength(12)
.HasColumnType("character varying(12)");
b.Property<string>("Notes")
.IsRequired()
.HasColumnType("text");
b.Property<Guid?>("ProjectId")
.HasColumnType("uuid");
b.Property<DateTimeOffset>("ReceivedAtUtc")
.HasColumnType("timestamp with time zone");
b.HasKey("Id");
b.HasIndex("ProjectId");
b.ToTable("RevenueEvents");
});
modelBuilder.Entity("Bifrost.Web.Domain.RevenueShareBatch", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<DateTimeOffset>("CreatedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<Guid>("CreatedByUserAccountId")
.HasColumnType("uuid");
b.Property<Guid?>("RevenueEventId")
.HasColumnType("uuid");
b.Property<string>("Summary")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("CreatedByUserAccountId");
b.HasIndex("RevenueEventId");
b.ToTable("RevenueShareBatches");
});
modelBuilder.Entity("Bifrost.Web.Domain.RevenueShareLine", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<decimal>("Amount")
.HasPrecision(18, 2)
.HasColumnType("numeric(18,2)");
b.Property<string>("Basis")
.IsRequired()
.HasMaxLength(240)
.HasColumnType("character varying(240)");
b.Property<string>("Notes")
.IsRequired()
.HasColumnType("text");
b.Property<Guid?>("ProjectId")
.HasColumnType("uuid");
b.Property<Guid>("RevenueShareBatchId")
.HasColumnType("uuid");
b.Property<Guid?>("UserAccountId")
.HasColumnType("uuid");
b.HasKey("Id");
b.HasIndex("ProjectId");
b.HasIndex("RevenueShareBatchId");
b.HasIndex("UserAccountId");
b.ToTable("RevenueShareLines");
});
modelBuilder.Entity("Bifrost.Web.Domain.RoleAssignment", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<DateTimeOffset>("AssignedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<Guid?>("AssignedByUserAccountId")
.HasColumnType("uuid");
b.Property<Guid>("MembershipId")
.HasColumnType("uuid");
b.Property<string>("Notes")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Role")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("AssignedByUserAccountId");
b.HasIndex("MembershipId", "Role")
.IsUnique();
b.ToTable("RoleAssignments");
});
modelBuilder.Entity("Bifrost.Web.Domain.TierSnapshot", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<DateTimeOffset>("CapturedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<DateTimeOffset>("EffectiveFromUtc")
.HasColumnType("timestamp with time zone");
b.Property<bool>("IsCurrent")
.HasColumnType("boolean");
b.Property<string>("Kind")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Label")
.IsRequired()
.HasMaxLength(120)
.HasColumnType("character varying(120)");
b.Property<Guid>("MembershipId")
.HasColumnType("uuid");
b.Property<string>("Notes")
.IsRequired()
.HasColumnType("text");
b.Property<decimal>("Weight")
.HasPrecision(18, 2)
.HasColumnType("numeric(18,2)");
b.HasKey("Id");
b.HasIndex("MembershipId", "Kind", "IsCurrent");
b.ToTable("TierSnapshots");
});
modelBuilder.Entity("Bifrost.Web.Domain.UserAccount", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<string>("AvatarUrl")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("character varying(500)");
b.Property<string>("BifrostIdentity")
.IsRequired()
.HasMaxLength(120)
.HasColumnType("character varying(120)");
b.Property<DateTimeOffset>("CreatedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<string>("DisplayName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("character varying(200)");
b.Property<string>("GitHubLogin")
.IsRequired()
.HasMaxLength(120)
.HasColumnType("character varying(120)");
b.Property<long?>("GitHubUserId")
.HasColumnType("bigint");
b.Property<string>("HeimdallAccountId")
.IsRequired()
.HasMaxLength(160)
.HasColumnType("character varying(160)");
b.Property<DateTimeOffset>("LastSeenAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<string>("NormalizedBifrostIdentity")
.IsRequired()
.HasMaxLength(120)
.HasColumnType("character varying(120)");
b.Property<string>("NormalizedGitHubLogin")
.IsRequired()
.HasMaxLength(120)
.HasColumnType("character varying(120)");
b.HasKey("Id");
b.HasIndex("GitHubUserId")
.IsUnique()
.HasFilter("\"GitHubUserId\" IS NOT NULL");
b.HasIndex("HeimdallAccountId")
.IsUnique()
.HasFilter("\"HeimdallAccountId\" <> ''");
b.HasIndex("NormalizedBifrostIdentity")
.IsUnique()
.HasFilter("\"NormalizedBifrostIdentity\" <> ''");
b.HasIndex("NormalizedGitHubLogin")
.IsUnique()
.HasFilter("\"NormalizedGitHubLogin\" <> ''");
b.ToTable("UserAccounts");
});
modelBuilder.Entity("Bifrost.Web.Domain.VolunteerClaim", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<DateTimeOffset>("CreatedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<string>("Note")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Status")
.IsRequired()
.HasColumnType("text");
b.Property<Guid>("UserAccountId")
.HasColumnType("uuid");
b.Property<Guid>("WorkItemId")
.HasColumnType("uuid");
b.HasKey("Id");
b.HasIndex("UserAccountId");
b.HasIndex("WorkItemId", "UserAccountId")
.IsUnique();
b.ToTable("VolunteerClaims");
});
modelBuilder.Entity("Bifrost.Web.Domain.Vote", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<DateTimeOffset>("CastAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<string>("Choice")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Comment")
.IsRequired()
.HasColumnType("text");
b.Property<Guid>("MotionId")
.HasColumnType("uuid");
b.Property<Guid>("UserAccountId")
.HasColumnType("uuid");
b.Property<decimal>("Weight")
.HasPrecision(18, 2)
.HasColumnType("numeric(18,2)");
b.HasKey("Id");
b.HasIndex("UserAccountId");
b.HasIndex("MotionId", "UserAccountId")
.IsUnique();
b.ToTable("Votes");
});
modelBuilder.Entity("Bifrost.Web.Domain.WorkItem", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<Guid?>("AssignedToUserAccountId")
.HasColumnType("uuid");
b.Property<string>("Category")
.IsRequired()
.HasMaxLength(120)
.HasColumnType("character varying(120)");
b.Property<DateTimeOffset?>("CompletedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<decimal>("ContributionPoints")
.HasPrecision(18, 2)
.HasColumnType("numeric(18,2)");
b.Property<DateTimeOffset>("CreatedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<decimal>("EstimatedHours")
.HasPrecision(18, 2)
.HasColumnType("numeric(18,2)");
b.Property<string>("ExternalSourceId")
.IsRequired()
.HasMaxLength(240)
.HasColumnType("character varying(240)");
b.Property<Guid>("ProjectId")
.HasColumnType("uuid");
b.Property<Guid>("RequestedByUserAccountId")
.HasColumnType("uuid");
b.Property<string>("ReviewStatus")
.IsRequired()
.HasColumnType("text");
b.Property<string>("SkillLevel")
.IsRequired()
.HasColumnType("text");
b.Property<string>("SourceType")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Status")
.IsRequired()
.HasColumnType("text");
b.Property<DateTimeOffset?>("SubmittedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<string>("Summary")
.IsRequired()
.HasColumnType("text");
b.Property<DateTimeOffset?>("TargetDateUtc")
.HasColumnType("timestamp with time zone");
b.Property<string>("Title")
.IsRequired()
.HasMaxLength(180)
.HasColumnType("character varying(180)");
b.Property<DateTimeOffset>("UpdatedAtUtc")
.HasColumnType("timestamp with time zone");
b.HasKey("Id");
b.HasIndex("AssignedToUserAccountId");
b.HasIndex("ProjectId");
b.HasIndex("RequestedByUserAccountId");
b.ToTable("WorkItems");
});
modelBuilder.Entity("Bifrost.Web.Domain.WorkLog", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<string>("ApprovalStatus")
.IsRequired()
.HasColumnType("text");
b.Property<DateTimeOffset>("CreatedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<decimal>("Hours")
.HasPrecision(18, 2)
.HasColumnType("numeric(18,2)");
b.Property<string>("Note")
.IsRequired()
.HasColumnType("text");
b.Property<DateTimeOffset?>("ReviewedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<Guid?>("ReviewedByUserAccountId")
.HasColumnType("uuid");
b.Property<Guid>("UserAccountId")
.HasColumnType("uuid");
b.Property<Guid>("WorkItemId")
.HasColumnType("uuid");
b.HasKey("Id");
b.HasIndex("ReviewedByUserAccountId");
b.HasIndex("UserAccountId");
b.HasIndex("WorkItemId");
b.ToTable("WorkLogs");
});
modelBuilder.Entity("Bifrost.Web.Domain.WorkReview", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<string>("Note")
.IsRequired()
.HasColumnType("text");
b.Property<DateTimeOffset>("ReviewedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<string>("ReviewerName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("character varying(200)");
b.Property<Guid?>("ReviewerUserAccountId")
.HasColumnType("uuid");
b.Property<string>("Status")
.IsRequired()
.HasColumnType("text");
b.Property<Guid>("WorkItemId")
.HasColumnType("uuid");
b.HasKey("Id");
b.HasIndex("ReviewerUserAccountId");
b.HasIndex("WorkItemId");
b.ToTable("WorkReviews");
});
modelBuilder.Entity("Bifrost.Web.Domain.AgentDispatchRun", b =>
{
b.HasOne("Bifrost.Web.Domain.UserAccount", "StartedByUserAccount")
.WithMany("AgentDispatchRuns")
.HasForeignKey("StartedByUserAccountId")
.OnDelete(DeleteBehavior.SetNull);
b.Navigation("StartedByUserAccount");
});
modelBuilder.Entity("Bifrost.Web.Domain.AgentTransportReceipt", b =>
{
b.HasOne("Bifrost.Web.Domain.UserAccount", "ActorUserAccount")
.WithMany("AgentTransportReceipts")
.HasForeignKey("ActorUserAccountId")
.OnDelete(DeleteBehavior.SetNull);
b.Navigation("ActorUserAccount");
});
modelBuilder.Entity("Bifrost.Web.Domain.Assignment", b =>
{
b.HasOne("Bifrost.Web.Domain.UserAccount", "AssignedByUserAccount")
.WithMany()
.HasForeignKey("AssignedByUserAccountId")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.HasOne("Bifrost.Web.Domain.UserAccount", "UserAccount")
.WithMany("Assignments")
.HasForeignKey("UserAccountId")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.HasOne("Bifrost.Web.Domain.WorkItem", "WorkItem")
.WithMany("Assignments")
.HasForeignKey("WorkItemId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("AssignedByUserAccount");
b.Navigation("UserAccount");
b.Navigation("WorkItem");
});
modelBuilder.Entity("Bifrost.Web.Domain.AuditEvent", b =>
{
b.HasOne("Bifrost.Web.Domain.UserAccount", "ActorUserAccount")
.WithMany("AuditEvents")
.HasForeignKey("ActorUserAccountId")
.OnDelete(DeleteBehavior.SetNull);
b.Navigation("ActorUserAccount");
});
modelBuilder.Entity("Bifrost.Web.Domain.BridgeAction", b =>
{
b.HasOne("Bifrost.Web.Domain.UserAccount", "ActorUserAccount")
.WithMany("BridgeActions")
.HasForeignKey("ActorUserAccountId")
.OnDelete(DeleteBehavior.SetNull);
b.HasOne("Bifrost.Web.Domain.Motion", "Motion")
.WithMany()
.HasForeignKey("MotionId")
.OnDelete(DeleteBehavior.SetNull);
b.HasOne("Bifrost.Web.Domain.WorkItem", "WorkItem")
.WithMany()
.HasForeignKey("WorkItemId")
.OnDelete(DeleteBehavior.SetNull);
b.Navigation("ActorUserAccount");
b.Navigation("Motion");
b.Navigation("WorkItem");
});
modelBuilder.Entity("Bifrost.Web.Domain.GitHubIssueLink", b =>
{
b.HasOne("Bifrost.Web.Domain.WorkItem", "WorkItem")
.WithOne("GitHubIssueLink")
.HasForeignKey("Bifrost.Web.Domain.GitHubIssueLink", "WorkItemId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("WorkItem");
});
modelBuilder.Entity("Bifrost.Web.Domain.GitHubPullRequestLink", b =>
{
b.HasOne("Bifrost.Web.Domain.WorkItem", "WorkItem")
.WithMany("GitHubPullRequestLinks")
.HasForeignKey("WorkItemId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("WorkItem");
});
modelBuilder.Entity("Bifrost.Web.Domain.GovernanceActivityReceipt", b =>
{
b.HasOne("Bifrost.Web.Domain.UserAccount", "ActorUserAccount")
.WithMany("GovernanceActivityReceipts")
.HasForeignKey("ActorUserAccountId")
.OnDelete(DeleteBehavior.SetNull);
b.Navigation("ActorUserAccount");
});
modelBuilder.Entity("Bifrost.Web.Domain.LedgerEntry", b =>
{
b.HasOne("Bifrost.Web.Domain.UserAccount", "CreatedByUserAccount")
.WithMany()
.HasForeignKey("CreatedByUserAccountId")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.HasOne("Bifrost.Web.Domain.Project", "Project")
.WithMany("LedgerEntries")
.HasForeignKey("ProjectId")
.OnDelete(DeleteBehavior.SetNull);
b.HasOne("Bifrost.Web.Domain.UserAccount", "UserAccount")
.WithMany("LedgerEntries")
.HasForeignKey("UserAccountId")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.HasOne("Bifrost.Web.Domain.WorkItem", "WorkItem")
.WithMany("LedgerEntries")
.HasForeignKey("WorkItemId")
.OnDelete(DeleteBehavior.SetNull);
b.Navigation("CreatedByUserAccount");
b.Navigation("Project");
b.Navigation("UserAccount");
b.Navigation("WorkItem");
});
modelBuilder.Entity("Bifrost.Web.Domain.MemberProfile", b =>
{
b.HasOne("Bifrost.Web.Domain.UserAccount", "UserAccount")
.WithOne("MemberProfile")
.HasForeignKey("Bifrost.Web.Domain.MemberProfile", "UserAccountId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("UserAccount");
});
modelBuilder.Entity("Bifrost.Web.Domain.Membership", b =>
{
b.HasOne("Bifrost.Web.Domain.UserAccount", "UserAccount")
.WithOne("Membership")
.HasForeignKey("Bifrost.Web.Domain.Membership", "UserAccountId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("UserAccount");
});
modelBuilder.Entity("Bifrost.Web.Domain.MembershipInvitation", b =>
{
b.HasOne("Bifrost.Web.Domain.UserAccount", "AcceptedByUserAccount")
.WithMany()
.HasForeignKey("AcceptedByUserAccountId")
.OnDelete(DeleteBehavior.SetNull);
b.HasOne("Bifrost.Web.Domain.UserAccount", "IssuedByUserAccount")
.WithMany()
.HasForeignKey("IssuedByUserAccountId")
.OnDelete(DeleteBehavior.SetNull);
b.Navigation("AcceptedByUserAccount");
b.Navigation("IssuedByUserAccount");
});
modelBuilder.Entity("Bifrost.Web.Domain.Motion", b =>
{
b.HasOne("Bifrost.Web.Domain.UserAccount", "CreatedByUserAccount")
.WithMany("CreatedMotions")
.HasForeignKey("CreatedByUserAccountId")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.HasOne("Bifrost.Web.Domain.Project", "Project")
.WithMany("Motions")
.HasForeignKey("ProjectId")
.OnDelete(DeleteBehavior.SetNull);
b.Navigation("CreatedByUserAccount");
b.Navigation("Project");
});
modelBuilder.Entity("Bifrost.Web.Domain.PatronSupportEvent", b =>
{
b.HasOne("Bifrost.Web.Domain.UserAccount", "UserAccount")
.WithMany("PatronSupportEvents")
.HasForeignKey("UserAccountId")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.Navigation("UserAccount");
});
modelBuilder.Entity("Bifrost.Web.Domain.PayoutProposalBatch", b =>
{
b.HasOne("Bifrost.Web.Domain.UserAccount", "CreatedByUserAccount")
.WithMany()
.HasForeignKey("CreatedByUserAccountId")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.Navigation("CreatedByUserAccount");
});
modelBuilder.Entity("Bifrost.Web.Domain.PointTransaction", b =>
{
b.HasOne("Bifrost.Web.Domain.Project", "Project")
.WithMany("PointTransactions")
.HasForeignKey("ProjectId")
.OnDelete(DeleteBehavior.SetNull);
b.HasOne("Bifrost.Web.Domain.UserAccount", "UserAccount")
.WithMany("PointTransactions")
.HasForeignKey("UserAccountId")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.HasOne("Bifrost.Web.Domain.WorkItem", "WorkItem")
.WithMany("PointTransactions")
.HasForeignKey("WorkItemId")
.OnDelete(DeleteBehavior.SetNull);
b.Navigation("Project");
b.Navigation("UserAccount");
b.Navigation("WorkItem");
});
modelBuilder.Entity("Bifrost.Web.Domain.Project", b =>
{
b.HasOne("Bifrost.Web.Domain.UserAccount", "OwnerUserAccount")
.WithMany("OwnedProjects")
.HasForeignKey("OwnerUserAccountId")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.Navigation("OwnerUserAccount");
});
modelBuilder.Entity("Bifrost.Web.Domain.RevenueEvent", b =>
{
b.HasOne("Bifrost.Web.Domain.Project", "Project")
.WithMany("RevenueEvents")
.HasForeignKey("ProjectId")
.OnDelete(DeleteBehavior.SetNull);
b.Navigation("Project");
});
modelBuilder.Entity("Bifrost.Web.Domain.RevenueShareBatch", b =>
{
b.HasOne("Bifrost.Web.Domain.UserAccount", "CreatedByUserAccount")
.WithMany()
.HasForeignKey("CreatedByUserAccountId")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.HasOne("Bifrost.Web.Domain.RevenueEvent", "RevenueEvent")
.WithMany("RevenueShareBatches")
.HasForeignKey("RevenueEventId")
.OnDelete(DeleteBehavior.SetNull);
b.Navigation("CreatedByUserAccount");
b.Navigation("RevenueEvent");
});
modelBuilder.Entity("Bifrost.Web.Domain.RevenueShareLine", b =>
{
b.HasOne("Bifrost.Web.Domain.Project", "Project")
.WithMany("RevenueShareLines")
.HasForeignKey("ProjectId")
.OnDelete(DeleteBehavior.SetNull);
b.HasOne("Bifrost.Web.Domain.RevenueShareBatch", "RevenueShareBatch")
.WithMany("Lines")
.HasForeignKey("RevenueShareBatchId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("Bifrost.Web.Domain.UserAccount", "UserAccount")
.WithMany()
.HasForeignKey("UserAccountId")
.OnDelete(DeleteBehavior.SetNull);
b.Navigation("Project");
b.Navigation("RevenueShareBatch");
b.Navigation("UserAccount");
});
modelBuilder.Entity("Bifrost.Web.Domain.RoleAssignment", b =>
{
b.HasOne("Bifrost.Web.Domain.UserAccount", "AssignedByUserAccount")
.WithMany()
.HasForeignKey("AssignedByUserAccountId")
.OnDelete(DeleteBehavior.SetNull);
b.HasOne("Bifrost.Web.Domain.Membership", "Membership")
.WithMany("RoleAssignments")
.HasForeignKey("MembershipId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("AssignedByUserAccount");
b.Navigation("Membership");
});
modelBuilder.Entity("Bifrost.Web.Domain.TierSnapshot", b =>
{
b.HasOne("Bifrost.Web.Domain.Membership", "Membership")
.WithMany("TierSnapshots")
.HasForeignKey("MembershipId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Membership");
});
modelBuilder.Entity("Bifrost.Web.Domain.VolunteerClaim", b =>
{
b.HasOne("Bifrost.Web.Domain.UserAccount", "UserAccount")
.WithMany("VolunteerClaims")
.HasForeignKey("UserAccountId")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.HasOne("Bifrost.Web.Domain.WorkItem", "WorkItem")
.WithMany("VolunteerClaims")
.HasForeignKey("WorkItemId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("UserAccount");
b.Navigation("WorkItem");
});
modelBuilder.Entity("Bifrost.Web.Domain.Vote", b =>
{
b.HasOne("Bifrost.Web.Domain.Motion", "Motion")
.WithMany("Votes")
.HasForeignKey("MotionId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("Bifrost.Web.Domain.UserAccount", "UserAccount")
.WithMany("Votes")
.HasForeignKey("UserAccountId")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.Navigation("Motion");
b.Navigation("UserAccount");
});
modelBuilder.Entity("Bifrost.Web.Domain.WorkItem", b =>
{
b.HasOne("Bifrost.Web.Domain.UserAccount", "AssignedToUserAccount")
.WithMany("AssignedWorkItems")
.HasForeignKey("AssignedToUserAccountId")
.OnDelete(DeleteBehavior.SetNull);
b.HasOne("Bifrost.Web.Domain.Project", "Project")
.WithMany("WorkItems")
.HasForeignKey("ProjectId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("Bifrost.Web.Domain.UserAccount", "RequestedByUserAccount")
.WithMany("RequestedWorkItems")
.HasForeignKey("RequestedByUserAccountId")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.Navigation("AssignedToUserAccount");
b.Navigation("Project");
b.Navigation("RequestedByUserAccount");
});
modelBuilder.Entity("Bifrost.Web.Domain.WorkLog", b =>
{
b.HasOne("Bifrost.Web.Domain.UserAccount", "ReviewedByUserAccount")
.WithMany()
.HasForeignKey("ReviewedByUserAccountId")
.OnDelete(DeleteBehavior.SetNull);
b.HasOne("Bifrost.Web.Domain.UserAccount", "UserAccount")
.WithMany("WorkLogs")
.HasForeignKey("UserAccountId")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.HasOne("Bifrost.Web.Domain.WorkItem", "WorkItem")
.WithMany("WorkLogs")
.HasForeignKey("WorkItemId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("ReviewedByUserAccount");
b.Navigation("UserAccount");
b.Navigation("WorkItem");
});
modelBuilder.Entity("Bifrost.Web.Domain.WorkReview", b =>
{
b.HasOne("Bifrost.Web.Domain.UserAccount", "ReviewerUserAccount")
.WithMany("WorkReviews")
.HasForeignKey("ReviewerUserAccountId")
.OnDelete(DeleteBehavior.SetNull);
b.HasOne("Bifrost.Web.Domain.WorkItem", "WorkItem")
.WithMany("WorkReviews")
.HasForeignKey("WorkItemId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("ReviewerUserAccount");
b.Navigation("WorkItem");
});
modelBuilder.Entity("Bifrost.Web.Domain.Membership", b =>
{
b.Navigation("RoleAssignments");
b.Navigation("TierSnapshots");
});
modelBuilder.Entity("Bifrost.Web.Domain.Motion", b =>
{
b.Navigation("Votes");
});
modelBuilder.Entity("Bifrost.Web.Domain.Project", b =>
{
b.Navigation("LedgerEntries");
b.Navigation("Motions");
b.Navigation("PointTransactions");
b.Navigation("RevenueEvents");
b.Navigation("RevenueShareLines");
b.Navigation("WorkItems");
});
modelBuilder.Entity("Bifrost.Web.Domain.RevenueEvent", b =>
{
b.Navigation("RevenueShareBatches");
});
modelBuilder.Entity("Bifrost.Web.Domain.RevenueShareBatch", b =>
{
b.Navigation("Lines");
});
modelBuilder.Entity("Bifrost.Web.Domain.UserAccount", b =>
{
b.Navigation("AgentDispatchRuns");
b.Navigation("AgentTransportReceipts");
b.Navigation("AssignedWorkItems");
b.Navigation("Assignments");
b.Navigation("AuditEvents");
b.Navigation("BridgeActions");
b.Navigation("CreatedMotions");
b.Navigation("GovernanceActivityReceipts");
b.Navigation("LedgerEntries");
b.Navigation("MemberProfile");
b.Navigation("Membership");
b.Navigation("OwnedProjects");
b.Navigation("PatronSupportEvents");
b.Navigation("PointTransactions");
b.Navigation("RequestedWorkItems");
b.Navigation("VolunteerClaims");
b.Navigation("Votes");
b.Navigation("WorkLogs");
b.Navigation("WorkReviews");
});
modelBuilder.Entity("Bifrost.Web.Domain.WorkItem", b =>
{
b.Navigation("Assignments");
b.Navigation("GitHubIssueLink");
b.Navigation("GitHubPullRequestLinks");
b.Navigation("LedgerEntries");
b.Navigation("PointTransactions");
b.Navigation("VolunteerClaims");
b.Navigation("WorkLogs");
b.Navigation("WorkReviews");
});
#pragma warning restore 612, 618
}
}
}