//
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("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("CompletedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property("Error")
.IsRequired()
.HasColumnType("text");
b.Property("LaunchMode")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("character varying(40)");
b.Property("LogPath")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("character varying(500)");
b.Property("Note")
.IsRequired()
.HasColumnType("text");
b.Property("RequestId")
.IsRequired()
.HasMaxLength(240)
.HasColumnType("character varying(240)");
b.Property("ResultPath")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("character varying(500)");
b.Property("StartedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property("StartedByUserAccountId")
.HasColumnType("uuid");
b.Property("Status")
.IsRequired()
.HasColumnType("text");
b.Property("TargetAgentIdentity")
.IsRequired()
.HasMaxLength(160)
.HasColumnType("character varying(160)");
b.Property("TargetRepoName")
.IsRequired()
.HasMaxLength(120)
.HasColumnType("character varying(120)");
b.Property("TargetRepositoryFullName")
.IsRequired()
.HasMaxLength(240)
.HasColumnType("character varying(240)");
b.Property("ThreadId")
.IsRequired()
.HasMaxLength(120)
.HasColumnType("character varying(120)");
b.Property("TurnId")
.IsRequired()
.HasMaxLength(120)
.HasColumnType("character varying(120)");
b.Property("UpdatedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property("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("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("ActivityKind")
.IsRequired()
.HasColumnType("text");
b.Property("ActorName")
.IsRequired()
.HasMaxLength(160)
.HasColumnType("character varying(160)");
b.Property("ActorUserAccountId")
.HasColumnType("uuid");
b.Property("Note")
.IsRequired()
.HasColumnType("text");
b.Property("OccurredAtUtc")
.HasColumnType("timestamp with time zone");
b.Property("RequestId")
.IsRequired()
.HasMaxLength(240)
.HasColumnType("character varying(240)");
b.Property("Status")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("character varying(40)");
b.Property("TargetAgentIdentity")
.IsRequired()
.HasMaxLength(160)
.HasColumnType("character varying(160)");
b.Property("TargetRepoName")
.IsRequired()
.HasMaxLength(120)
.HasColumnType("character varying(120)");
b.Property("TargetRepositoryFullName")
.IsRequired()
.HasMaxLength(240)
.HasColumnType("character varying(240)");
b.Property("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("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("AssignedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property("AssignedByUserAccountId")
.HasColumnType("uuid");
b.Property("Note")
.IsRequired()
.HasColumnType("text");
b.Property("UserAccountId")
.HasColumnType("uuid");
b.Property("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("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("Action")
.IsRequired()
.HasMaxLength(120)
.HasColumnType("character varying(120)");
b.Property("ActorUserAccountId")
.HasColumnType("uuid");
b.Property("Detail")
.IsRequired()
.HasColumnType("text");
b.Property("EntityId")
.IsRequired()
.HasMaxLength(120)
.HasColumnType("character varying(120)");
b.Property("EntityType")
.IsRequired()
.HasMaxLength(120)
.HasColumnType("character varying(120)");
b.Property("OccurredAtUtc")
.HasColumnType("timestamp with time zone");
b.HasKey("Id");
b.HasIndex("ActorUserAccountId");
b.ToTable("AuditEvents");
});
modelBuilder.Entity("Bifrost.Web.Domain.BridgeAction", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("ActionKind")
.IsRequired()
.HasColumnType("text");
b.Property("ActorKind")
.IsRequired()
.HasColumnType("text");
b.Property("ActorName")
.IsRequired()
.HasMaxLength(160)
.HasColumnType("character varying(160)");
b.Property("ActorUserAccountId")
.HasColumnType("uuid");
b.Property("AuthorityReference")
.IsRequired()
.HasMaxLength(240)
.HasColumnType("character varying(240)");
b.Property("BifrostIdentity")
.IsRequired()
.HasMaxLength(160)
.HasColumnType("character varying(160)");
b.Property("CompletedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property("EpiphanyAgentIdentity")
.IsRequired()
.HasMaxLength(160)
.HasColumnType("character varying(160)");
b.Property("EpiphanyLaneId")
.IsRequired()
.HasMaxLength(120)
.HasColumnType("character varying(120)");
b.Property("EpiphanyRunId")
.IsRequired()
.HasMaxLength(160)
.HasColumnType("character varying(160)");
b.Property("ExternalReceiptId")
.IsRequired()
.HasMaxLength(240)
.HasColumnType("character varying(240)");
b.Property("FailureReason")
.IsRequired()
.HasColumnType("text");
b.Property("HeimdallCapabilityReference")
.IsRequired()
.HasMaxLength(240)
.HasColumnType("character varying(240)");
b.Property("MotionId")
.HasColumnType("uuid");
b.Property("PolicyDecision")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("character varying(500)");
b.Property("ReceiptPayload")
.IsRequired()
.HasColumnType("text");
b.Property("ReceiptUrl")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("character varying(500)");
b.Property("RequestedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property("SourceId")
.IsRequired()
.HasMaxLength(240)
.HasColumnType("character varying(240)");
b.Property("SourceKind")
.IsRequired()
.HasMaxLength(120)
.HasColumnType("character varying(120)");
b.Property("StartedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property("Status")
.IsRequired()
.HasColumnType("text");
b.Property("Summary")
.IsRequired()
.HasColumnType("text");
b.Property("TargetLocator")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("character varying(500)");
b.Property("TargetRepositoryFullName")
.IsRequired()
.HasMaxLength(240)
.HasColumnType("character varying(240)");
b.Property("TargetSurface")
.IsRequired()
.HasColumnType("text");
b.Property("Title")
.IsRequired()
.HasMaxLength(240)
.HasColumnType("character varying(240)");
b.Property("UpdatedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property("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("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("Notes")
.IsRequired()
.HasColumnType("text");
b.Property("RanAtUtc")
.HasColumnType("timestamp with time zone");
b.Property("Rate")
.HasPrecision(8, 4)
.HasColumnType("numeric(8,4)");
b.HasKey("Id");
b.ToTable("DecayRuns");
});
modelBuilder.Entity("Bifrost.Web.Domain.GitHubIssueLink", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("IssueNumber")
.HasColumnType("integer");
b.Property("IssueUrl")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("character varying(500)");
b.Property("LastSynchronizedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property("RepositoryFullName")
.IsRequired()
.HasMaxLength(240)
.HasColumnType("character varying(240)");
b.Property("State")
.IsRequired()
.HasColumnType("text");
b.Property("TitleSnapshot")
.IsRequired()
.HasMaxLength(240)
.HasColumnType("character varying(240)");
b.Property("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("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("IsMerged")
.HasColumnType("boolean");
b.Property("LastSynchronizedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property("PullRequestNumber")
.HasColumnType("integer");
b.Property("PullRequestUrl")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("character varying(500)");
b.Property("RepositoryFullName")
.IsRequired()
.HasMaxLength(240)
.HasColumnType("character varying(240)");
b.Property("ReviewDecision")
.IsRequired()
.HasColumnType("text");
b.Property("State")
.IsRequired()
.HasColumnType("text");
b.Property("TitleSnapshot")
.IsRequired()
.HasMaxLength(240)
.HasColumnType("character varying(240)");
b.Property("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("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("ActivityKind")
.IsRequired()
.HasColumnType("text");
b.Property("ActorKind")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("character varying(40)");
b.Property("ActorName")
.IsRequired()
.HasMaxLength(160)
.HasColumnType("character varying(160)");
b.Property("ActorUserAccountId")
.HasColumnType("uuid");
b.Property("CommentId")
.IsRequired()
.HasMaxLength(120)
.HasColumnType("character varying(120)");
b.Property("DispatchRequestId")
.IsRequired()
.HasMaxLength(240)
.HasColumnType("character varying(240)");
b.Property("JurisdictionAgentIdentity")
.IsRequired()
.HasMaxLength(160)
.HasColumnType("character varying(160)");
b.Property("JurisdictionRepoName")
.IsRequired()
.HasMaxLength(120)
.HasColumnType("character varying(120)");
b.Property("Note")
.IsRequired()
.HasColumnType("text");
b.Property("OccurredAtUtc")
.HasColumnType("timestamp with time zone");
b.Property("Title")
.IsRequired()
.HasMaxLength(240)
.HasColumnType("character varying(240)");
b.Property("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("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("CreatedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property("CreatedByUserAccountId")
.HasColumnType("uuid");
b.Property("EffectiveAtUtc")
.HasColumnType("timestamp with time zone");
b.Property("EntryType")
.IsRequired()
.HasColumnType("text");
b.Property("NominalAmount")
.HasPrecision(18, 2)
.HasColumnType("numeric(18,2)");
b.Property("Note")
.IsRequired()
.HasColumnType("text");
b.Property("Points")
.HasPrecision(18, 2)
.HasColumnType("numeric(18,2)");
b.Property("ProjectId")
.HasColumnType("uuid");
b.Property("Status")
.IsRequired()
.HasColumnType("text");
b.Property("UserAccountId")
.HasColumnType("uuid");
b.Property("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("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("Availability")
.IsRequired()
.HasColumnType("text");
b.Property("Headline")
.IsRequired()
.HasMaxLength(240)
.HasColumnType("character varying(240)");
b.Property("Nickname")
.IsRequired()
.HasMaxLength(120)
.HasColumnType("character varying(120)");
b.Property("Notes")
.IsRequired()
.HasColumnType("text");
b.Property("PortfolioUrl")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("character varying(500)");
b.Property("Skills")
.IsRequired()
.HasColumnType("text");
b.Property("UpdatedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property("UserAccountId")
.HasColumnType("uuid");
b.HasKey("Id");
b.HasIndex("UserAccountId")
.IsUnique();
b.ToTable("MemberProfiles");
});
modelBuilder.Entity("Bifrost.Web.Domain.Membership", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("ApprovedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property("CanManageLedger")
.HasColumnType("boolean");
b.Property("CanManageProjects")
.HasColumnType("boolean");
b.Property("CanModerateMotions")
.HasColumnType("boolean");
b.Property("CreatedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property("IsPlatformAdmin")
.HasColumnType("boolean");
b.Property("Notes")
.IsRequired()
.HasColumnType("text");
b.Property("Status")
.IsRequired()
.HasColumnType("text");
b.Property("UserAccountId")
.HasColumnType("uuid");
b.HasKey("Id");
b.HasIndex("UserAccountId")
.IsUnique();
b.ToTable("Memberships");
});
modelBuilder.Entity("Bifrost.Web.Domain.MembershipInvitation", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("AcceptedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property("AcceptedByUserAccountId")
.HasColumnType("uuid");
b.Property("GitHubLogin")
.IsRequired()
.HasMaxLength(120)
.HasColumnType("character varying(120)");
b.Property("IssuedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property("IssuedByUserAccountId")
.HasColumnType("uuid");
b.Property("NormalizedGitHubLogin")
.IsRequired()
.HasMaxLength(120)
.HasColumnType("character varying(120)");
b.Property("Notes")
.IsRequired()
.HasColumnType("text");
b.Property("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("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("ApprovalThreshold")
.HasPrecision(6, 3)
.HasColumnType("numeric(6,3)");
b.Property("Category")
.IsRequired()
.HasColumnType("text");
b.Property("ClosesAtUtc")
.HasColumnType("timestamp with time zone");
b.Property("CreatedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property("CreatedByUserAccountId")
.HasColumnType("uuid");
b.Property("OpensAtUtc")
.HasColumnType("timestamp with time zone");
b.Property("ProjectId")
.HasColumnType("uuid");
b.Property("ResolutionNote")
.IsRequired()
.HasColumnType("text");
b.Property("ResolvedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property("Scope")
.IsRequired()
.HasColumnType("text");
b.Property("Status")
.IsRequired()
.HasColumnType("text");
b.Property("Summary")
.IsRequired()
.HasColumnType("text");
b.Property("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("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("Amount")
.HasPrecision(18, 2)
.HasColumnType("numeric(18,2)");
b.Property("CurrencyCode")
.IsRequired()
.HasMaxLength(12)
.HasColumnType("character varying(12)");
b.Property("ExternalSupportId")
.IsRequired()
.HasMaxLength(240)
.HasColumnType("character varying(240)");
b.Property("IsCurrentRecurringSupport")
.HasColumnType("boolean");
b.Property("Kind")
.IsRequired()
.HasColumnType("text");
b.Property("Notes")
.IsRequired()
.HasColumnType("text");
b.Property("Provider")
.IsRequired()
.HasColumnType("text");
b.Property("ProviderEventId")
.IsRequired()
.HasMaxLength(240)
.HasColumnType("character varying(240)");
b.Property("ProviderPayerId")
.IsRequired()
.HasMaxLength(240)
.HasColumnType("character varying(240)");
b.Property("ProviderSubscriptionId")
.IsRequired()
.HasMaxLength(240)
.HasColumnType("character varying(240)");
b.Property("RecordedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property("SupportedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property("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("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("CreatedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property("CreatedByUserAccountId")
.HasColumnType("uuid");
b.Property("Status")
.IsRequired()
.HasColumnType("text");
b.Property("Summary")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("CreatedByUserAccountId");
b.ToTable("PayoutProposalBatches");
});
modelBuilder.Entity("Bifrost.Web.Domain.PointTransaction", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("Amount")
.HasPrecision(18, 2)
.HasColumnType("numeric(18,2)");
b.Property("CreatedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property("IsDecaying")
.HasColumnType("boolean");
b.Property("Note")
.IsRequired()
.HasColumnType("text");
b.Property("ProjectId")
.HasColumnType("uuid");
b.Property("Type")
.IsRequired()
.HasColumnType("text");
b.Property("UserAccountId")
.HasColumnType("uuid");
b.Property("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("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("CreatedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property("GitHubRepository")
.IsRequired()
.HasMaxLength(240)
.HasColumnType("character varying(240)");
b.Property("Name")
.IsRequired()
.HasMaxLength(180)
.HasColumnType("character varying(180)");
b.Property("OwnerUserAccountId")
.HasColumnType("uuid");
b.Property("Slug")
.IsRequired()
.HasMaxLength(120)
.HasColumnType("character varying(120)");
b.Property("Status")
.IsRequired()
.HasColumnType("text");
b.Property("Summary")
.IsRequired()
.HasColumnType("text");
b.Property("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("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("Amount")
.HasPrecision(18, 2)
.HasColumnType("numeric(18,2)");
b.Property("CurrencyCode")
.IsRequired()
.HasMaxLength(12)
.HasColumnType("character varying(12)");
b.Property("Notes")
.IsRequired()
.HasColumnType("text");
b.Property("ProjectId")
.HasColumnType("uuid");
b.Property("ReceivedAtUtc")
.HasColumnType("timestamp with time zone");
b.HasKey("Id");
b.HasIndex("ProjectId");
b.ToTable("RevenueEvents");
});
modelBuilder.Entity("Bifrost.Web.Domain.RevenueShareBatch", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("CreatedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property("CreatedByUserAccountId")
.HasColumnType("uuid");
b.Property("RevenueEventId")
.HasColumnType("uuid");
b.Property("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("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("Amount")
.HasPrecision(18, 2)
.HasColumnType("numeric(18,2)");
b.Property("Basis")
.IsRequired()
.HasMaxLength(240)
.HasColumnType("character varying(240)");
b.Property("Notes")
.IsRequired()
.HasColumnType("text");
b.Property("ProjectId")
.HasColumnType("uuid");
b.Property("RevenueShareBatchId")
.HasColumnType("uuid");
b.Property("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("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("AssignedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property("AssignedByUserAccountId")
.HasColumnType("uuid");
b.Property("MembershipId")
.HasColumnType("uuid");
b.Property("Notes")
.IsRequired()
.HasColumnType("text");
b.Property("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("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("CapturedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property("EffectiveFromUtc")
.HasColumnType("timestamp with time zone");
b.Property("IsCurrent")
.HasColumnType("boolean");
b.Property("Kind")
.IsRequired()
.HasColumnType("text");
b.Property("Label")
.IsRequired()
.HasMaxLength(120)
.HasColumnType("character varying(120)");
b.Property("MembershipId")
.HasColumnType("uuid");
b.Property("Notes")
.IsRequired()
.HasColumnType("text");
b.Property("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("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("AvatarUrl")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("character varying(500)");
b.Property("BifrostIdentity")
.IsRequired()
.HasMaxLength(120)
.HasColumnType("character varying(120)");
b.Property("CreatedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property("DisplayName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("character varying(200)");
b.Property("GitHubLogin")
.IsRequired()
.HasMaxLength(120)
.HasColumnType("character varying(120)");
b.Property("GitHubUserId")
.HasColumnType("bigint");
b.Property("HeimdallAccountId")
.IsRequired()
.HasMaxLength(160)
.HasColumnType("character varying(160)");
b.Property("LastSeenAtUtc")
.HasColumnType("timestamp with time zone");
b.Property("NormalizedBifrostIdentity")
.IsRequired()
.HasMaxLength(120)
.HasColumnType("character varying(120)");
b.Property("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("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("CreatedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property("Note")
.IsRequired()
.HasColumnType("text");
b.Property("Status")
.IsRequired()
.HasColumnType("text");
b.Property("UserAccountId")
.HasColumnType("uuid");
b.Property("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("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("CastAtUtc")
.HasColumnType("timestamp with time zone");
b.Property("Choice")
.IsRequired()
.HasColumnType("text");
b.Property("Comment")
.IsRequired()
.HasColumnType("text");
b.Property("MotionId")
.HasColumnType("uuid");
b.Property