//
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using PostFundManagement.Infrastructure.Database;
#nullable disable
namespace PostFundManagement.Infrastructure.Database.Migrations
{
[DbContext(typeof(ApplicationDbContext))]
[Migration("20260820113615_AddedActivityNotification")]
partial class AddedActivityNotification
{
///
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "10.0.11")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("PostFundManagement.Domain.Entities.Activity", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
b.Property("Amount")
.HasPrecision(18, 2)
.HasColumnType("numeric(18,2)");
b.Property("ApprovedBy")
.HasColumnType("uuid");
b.Property("Category")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property("CreatedAt")
.ValueGeneratedOnAdd()
.HasColumnType("timestamp with time zone")
.HasDefaultValueSql("now()");
b.Property("CreatedBy")
.HasColumnType("uuid");
b.Property("Description")
.IsRequired()
.HasMaxLength(1024)
.HasColumnType("character varying(1024)");
b.Property("MilestoneId")
.HasColumnType("bigint");
b.Property("PerformedAt")
.HasColumnType("timestamp with time zone");
b.Property("ProjectId")
.HasColumnType("bigint");
b.Property("Status")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasDefaultValueSql("1");
b.Property("Title")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property("UpdatedAt")
.HasColumnType("timestamp with time zone");
b.Property("UpdatedBy")
.HasColumnType("uuid");
b.HasKey("Id");
b.HasIndex("ApprovedBy");
b.HasIndex("CreatedBy");
b.HasIndex("MilestoneId");
b.HasIndex("ProjectId");
b.HasIndex("UpdatedBy");
b.ToTable("Activities", (string)null);
});
modelBuilder.Entity("PostFundManagement.Domain.Entities.AuditLog", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
b.Property("Action")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("character varying(100)");
b.PrimitiveCollection("Changes")
.HasColumnType("jsonb");
b.Property("EntityId")
.HasColumnType("bigint");
b.Property("EntityName")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property("PerformedBy")
.HasColumnType("uuid");
b.Property("Timestamp")
.ValueGeneratedOnAdd()
.HasColumnType("timestamp with time zone")
.HasDefaultValueSql("now()");
b.HasKey("Id");
b.HasIndex("PerformedBy");
b.ToTable("AuditLogs", (string)null);
});
modelBuilder.Entity("PostFundManagement.Domain.Entities.Award", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
b.Property("Amount")
.HasPrecision(18, 2)
.HasColumnType("numeric(18,2)");
b.Property("ApprovedBy")
.HasColumnType("uuid");
b.Property("CreatedAt")
.ValueGeneratedOnAdd()
.HasColumnType("timestamp with time zone")
.HasDefaultValueSql("now()");
b.Property("CreatedBy")
.HasColumnType("uuid");
b.Property("OrganisationId")
.HasColumnType("bigint");
b.Property("ProgrammeId")
.HasColumnType("bigint");
b.Property("ProjectId")
.HasColumnType("bigint");
b.Property("Status")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasDefaultValueSql("1");
b.Property("UpdatedAt")
.HasColumnType("timestamp with time zone");
b.Property("UpdatedBy")
.HasColumnType("uuid");
b.HasKey("Id");
b.HasIndex("ApprovedBy");
b.HasIndex("CreatedBy");
b.HasIndex("OrganisationId");
b.HasIndex("ProgrammeId");
b.HasIndex("ProjectId");
b.HasIndex("UpdatedBy");
b.ToTable("Awards", (string)null);
});
modelBuilder.Entity("PostFundManagement.Domain.Entities.Beneficiary", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
b.Property("Category")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("character varying(100)");
b.Property("CreatedAt")
.ValueGeneratedOnAdd()
.HasColumnType("timestamp with time zone")
.HasDefaultValueSql("now()");
b.Property("CreatedBy")
.HasColumnType("uuid");
b.Property("Location")
.IsRequired()
.HasColumnType("text");
b.Property("Name")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property("ProjectId")
.HasColumnType("bigint");
b.Property("ReachedCount")
.HasColumnType("integer");
b.Property("TargetCount")
.HasColumnType("integer");
b.Property("UserId")
.HasColumnType("uuid");
b.HasKey("Id");
b.HasIndex("CreatedBy");
b.HasIndex("ProjectId");
b.HasIndex("UserId");
b.ToTable("Beneficiaries", (string)null);
});
modelBuilder.Entity("PostFundManagement.Domain.Entities.Budget", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
b.Property("Amount")
.HasPrecision(18, 2)
.HasColumnType("numeric(18,2)");
b.Property("ApprovedBy")
.HasColumnType("uuid");
b.Property("CreatedAt")
.ValueGeneratedOnAdd()
.HasColumnType("timestamp with time zone")
.HasDefaultValueSql("now()");
b.Property("CreatedBy")
.HasColumnType("uuid");
b.Property("Name")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property("ProjectId")
.HasColumnType("bigint");
b.Property("UpdatedAt")
.HasColumnType("timestamp with time zone");
b.HasKey("Id");
b.HasIndex("ApprovedBy");
b.HasIndex("CreatedBy");
b.HasIndex("ProjectId");
b.ToTable("Budgets", (string)null);
});
modelBuilder.Entity("PostFundManagement.Domain.Entities.ChangeRequest", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
b.Property("ApprovedBy")
.HasColumnType("uuid");
b.Property("CreatedAt")
.ValueGeneratedOnAdd()
.HasColumnType("timestamp with time zone")
.HasDefaultValueSql("now()");
b.Property("CreatedBy")
.HasColumnType("uuid");
b.Property("Justification")
.IsRequired()
.HasMaxLength(1024)
.HasColumnType("character varying(1024)");
b.Property("ProjectId")
.HasColumnType("bigint");
b.Property("RevisedBudget")
.HasPrecision(18, 2)
.HasColumnType("numeric(18,2)");
b.Property("RevisedEndedAt")
.HasColumnType("timestamp with time zone");
b.Property("Status")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasDefaultValueSql("1");
b.Property("Title")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property("UpdatedAt")
.HasColumnType("timestamp with time zone");
b.HasKey("Id");
b.HasIndex("ApprovedBy");
b.HasIndex("CreatedBy");
b.HasIndex("ProjectId");
b.ToTable("ChangeRequests", (string)null);
});
modelBuilder.Entity("PostFundManagement.Domain.Entities.ComplianceItem", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
b.Property("CreatedAt")
.ValueGeneratedOnAdd()
.HasColumnType("timestamp with time zone")
.HasDefaultValueSql("now()");
b.Property("CreatedBy")
.HasColumnType("uuid");
b.Property("ProjectId")
.HasColumnType("bigint");
b.Property("Requirements")
.IsRequired()
.HasMaxLength(2048)
.HasColumnType("character varying(2048)");
b.Property("Status")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasDefaultValueSql("1");
b.Property("Title")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property("UpdatedAt")
.HasColumnType("timestamp with time zone");
b.Property("VerifiedBy")
.HasColumnType("uuid");
b.HasKey("Id");
b.HasIndex("CreatedBy");
b.HasIndex("ProjectId");
b.HasIndex("VerifiedBy");
b.ToTable("ComplianceItems", (string)null);
});
modelBuilder.Entity("PostFundManagement.Domain.Entities.Contract", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
b.Property("AwardId")
.HasColumnType("bigint");
b.Property("CreatedAt")
.ValueGeneratedOnAdd()
.HasColumnType("timestamp with time zone")
.HasDefaultValueSql("now()");
b.Property("CreatedBy")
.HasColumnType("uuid");
b.Property("EffectiveAt")
.HasColumnType("timestamp with time zone");
b.Property("ExpiresAt")
.HasColumnType("timestamp with time zone");
b.Property("ExternalSignatureId")
.HasColumnType("text");
b.Property("SignedDocumentUrl")
.HasColumnType("text");
b.Property("Status")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasDefaultValueSql("1");
b.Property("TotalValue")
.HasPrecision(18, 2)
.HasColumnType("numeric(18,2)");
b.HasKey("Id");
b.HasIndex("AwardId")
.IsUnique();
b.HasIndex("CreatedBy");
b.ToTable("Contracts", (string)null);
});
modelBuilder.Entity("PostFundManagement.Domain.Entities.Disbursement", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
b.Property("Amount")
.HasPrecision(18, 2)
.HasColumnType("numeric(18,2)");
b.Property("CreatedAt")
.ValueGeneratedOnAdd()
.HasColumnType("timestamp with time zone")
.HasDefaultValueSql("now()");
b.Property("CreatedBy")
.HasColumnType("uuid");
b.Property("MilestoneId")
.HasColumnType("bigint");
b.Property("ProjectId")
.HasColumnType("bigint");
b.Property("Status")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasDefaultValueSql("1");
b.Property("UpdatedAt")
.HasColumnType("timestamp with time zone");
b.Property("UpdatedBy")
.HasColumnType("uuid");
b.HasKey("Id");
b.HasIndex("CreatedBy");
b.HasIndex("MilestoneId");
b.HasIndex("ProjectId");
b.HasIndex("UpdatedBy");
b.ToTable("Disbursements", (string)null);
});
modelBuilder.Entity("PostFundManagement.Domain.Entities.Evidence", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
b.Property("ActivityId")
.HasColumnType("bigint");
b.Property("CreatedAt")
.ValueGeneratedOnAdd()
.HasColumnType("timestamp with time zone")
.HasDefaultValueSql("now()");
b.Property("CreatedBy")
.HasColumnType("uuid");
b.Property("DocumentUrl")
.IsRequired()
.HasColumnType("text");
b.Property("IndicatorId")
.HasColumnType("bigint");
b.Property("MilestoneId")
.HasColumnType("bigint");
b.Property("ProjectId")
.HasColumnType("bigint");
b.Property("Status")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasDefaultValueSql("1");
b.Property("Type")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasDefaultValueSql("9");
b.Property("UpdatedAt")
.HasColumnType("timestamp with time zone");
b.Property("UpdatedBy")
.HasColumnType("uuid");
b.Property("Version")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasDefaultValue(1);
b.HasKey("Id");
b.HasIndex("ActivityId");
b.HasIndex("CreatedBy");
b.HasIndex("IndicatorId");
b.HasIndex("MilestoneId");
b.HasIndex("ProjectId");
b.HasIndex("UpdatedBy");
b.ToTable("Evidences", (string)null);
});
modelBuilder.Entity("PostFundManagement.Domain.Entities.Indicator", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
b.Property("ActualAmount")
.HasPrecision(18, 2)
.HasColumnType("numeric(18,2)");
b.Property("BaselineAmount")
.HasPrecision(18, 2)
.HasColumnType("numeric(18,2)");
b.Property("CreatedAt")
.ValueGeneratedOnAdd()
.HasColumnType("timestamp with time zone")
.HasDefaultValueSql("now()");
b.Property("CreatedBy")
.HasColumnType("uuid");
b.Property("Name")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property("ProjectId")
.HasColumnType("bigint");
b.Property("TargetAmount")
.HasPrecision(18, 2)
.HasColumnType("numeric(18,2)");
b.Property("UnitOfMeasure")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasDefaultValueSql("2");
b.HasKey("Id");
b.HasIndex("CreatedBy");
b.HasIndex("ProjectId");
b.ToTable("Indicators", (string)null);
});
modelBuilder.Entity("PostFundManagement.Domain.Entities.Instrument", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
b.Property("Code")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("character varying(100)");
b.Property("CreatedAt")
.ValueGeneratedOnAdd()
.HasColumnType("timestamp with time zone")
.HasDefaultValueSql("now()");
b.Property("CreatedBy")
.HasColumnType("uuid");
b.Property("Description")
.HasMaxLength(1024)
.HasColumnType("character varying(1024)");
b.Property("Name")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property("ProgrammeId")
.HasColumnType("bigint");
b.Property("Status")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasDefaultValueSql("2");
b.HasKey("Id");
b.HasIndex("CreatedBy");
b.HasIndex("ProgrammeId");
b.ToTable("Instruments", (string)null);
});
modelBuilder.Entity("PostFundManagement.Domain.Entities.Invite", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
b.Property("AwardId")
.HasColumnType("bigint");
b.Property("ContractId")
.HasColumnType("bigint");
b.Property("CreatedAt")
.ValueGeneratedOnAdd()
.HasColumnType("timestamp with time zone")
.HasDefaultValueSql("now()");
b.Property("CreatedBy")
.HasColumnType("uuid");
b.Property("InvitedOrganisationId")
.HasColumnType("bigint");
b.Property("OrganisationId")
.HasColumnType("bigint");
b.Property("Recipient")
.HasColumnType("uuid");
b.Property("UpdatedAt")
.HasColumnType("timestamp with time zone");
b.Property("UpdatedBy")
.HasColumnType("uuid");
b.HasKey("Id");
b.HasIndex("AwardId");
b.HasIndex("ContractId");
b.HasIndex("InvitedOrganisationId");
b.HasIndex("OrganisationId");
b.HasIndex("Recipient");
b.ToTable("Invites", (string)null);
});
modelBuilder.Entity("PostFundManagement.Domain.Entities.Issue", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
b.Property("AssignedTo")
.HasColumnType("uuid");
b.Property("CreatedAt")
.ValueGeneratedOnAdd()
.HasColumnType("timestamp with time zone")
.HasDefaultValueSql("now()");
b.Property("CreatedBy")
.HasColumnType("uuid");
b.Property("Description")
.IsRequired()
.HasMaxLength(1024)
.HasColumnType("character varying(1024)");
b.Property("Priority")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasDefaultValueSql("1");
b.Property("ProjectId")
.HasColumnType("bigint");
b.Property("Resolution")
.IsRequired()
.HasColumnType("text");
b.Property("ResolvedAt")
.HasColumnType("timestamp with time zone");
b.Property("Status")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasDefaultValueSql("1");
b.Property("Title")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.HasKey("Id");
b.HasIndex("AssignedTo");
b.HasIndex("CreatedBy");
b.HasIndex("ProjectId");
b.ToTable("Issues", (string)null);
});
modelBuilder.Entity("PostFundManagement.Domain.Entities.Milestone", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
b.Property("CreatedAt")
.ValueGeneratedOnAdd()
.HasColumnType("timestamp with time zone")
.HasDefaultValueSql("now()");
b.Property("CreatedBy")
.HasColumnType("uuid");
b.Property("DueAt")
.HasColumnType("timestamp with time zone");
b.Property("Name")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property("Priority")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasDefaultValueSql("1");
b.Property("ProjectId")
.HasColumnType("bigint");
b.Property("Status")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasDefaultValueSql("1");
b.Property("UpdatedAt")
.HasColumnType("timestamp with time zone");
b.Property("UpdatedBy")
.HasColumnType("uuid");
b.HasKey("Id");
b.HasIndex("CreatedBy");
b.HasIndex("ProjectId");
b.HasIndex("UpdatedBy");
b.ToTable("Milestones", (string)null);
});
modelBuilder.Entity("PostFundManagement.Domain.Entities.Notification", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
b.Property("CreatedAt")
.ValueGeneratedOnAdd()
.HasColumnType("timestamp with time zone")
.HasDefaultValueSql("now()");
b.Property("Destination")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property("Error")
.HasColumnType("text");
b.Property("Message")
.IsRequired()
.HasMaxLength(4096)
.HasColumnType("character varying(4096)");
b.Property("OrganisationId")
.HasColumnType("bigint");
b.Property("Platform")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasDefaultValueSql("1");
b.Property("Recipient")
.HasColumnType("uuid");
b.Property("SentAt")
.HasColumnType("timestamp with time zone");
b.Property("Status")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasDefaultValueSql("1");
b.Property("Subject")
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property("UpdatedAt")
.HasColumnType("timestamp with time zone");
b.HasKey("Id");
b.HasIndex("OrganisationId");
b.HasIndex("Recipient");
b.ToTable("Notifications", (string)null);
});
modelBuilder.Entity("PostFundManagement.Domain.Entities.Organisation", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
b.Property("CreatedAt")
.ValueGeneratedOnAdd()
.HasColumnType("timestamp with time zone")
.HasDefaultValueSql("now()");
b.Property("CreatedBy")
.HasColumnType("uuid");
b.Property("Email")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property("Name")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property("RegistrationNo")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property("Status")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasDefaultValueSql("1");
b.Property("Type")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasDefaultValueSql("5");
b.HasKey("Id");
b.HasIndex("CreatedBy");
b.ToTable("Organisations", (string)null);
});
modelBuilder.Entity("PostFundManagement.Domain.Entities.Outcome", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
b.Property("BeneficiaryId")
.HasColumnType("bigint");
b.Property("CreatedAt")
.ValueGeneratedOnAdd()
.HasColumnType("timestamp with time zone")
.HasDefaultValueSql("now()");
b.Property("CreatedBy")
.HasColumnType("uuid");
b.Property("Description")
.IsRequired()
.HasMaxLength(1024)
.HasColumnType("character varying(1024)");
b.Property("Name")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.HasKey("Id");
b.HasIndex("BeneficiaryId");
b.HasIndex("CreatedBy");
b.ToTable("Outcomes", (string)null);
});
modelBuilder.Entity("PostFundManagement.Domain.Entities.Portfolio", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
b.Property("CreatedAt")
.ValueGeneratedOnAdd()
.HasColumnType("timestamp with time zone")
.HasDefaultValueSql("now()");
b.Property("CreatedBy")
.HasColumnType("uuid");
b.Property("Description")
.HasMaxLength(1024)
.HasColumnType("character varying(1024)");
b.Property("Name")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property("OwnedBy")
.HasColumnType("uuid");
b.HasKey("Id");
b.HasIndex("CreatedBy");
b.HasIndex("OwnedBy");
b.ToTable("Portfolios", (string)null);
});
modelBuilder.Entity("PostFundManagement.Domain.Entities.Programme", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
b.Property("CreatedAt")
.ValueGeneratedOnAdd()
.HasColumnType("timestamp with time zone")
.HasDefaultValueSql("now()");
b.Property("CreatedBy")
.HasColumnType("uuid");
b.Property("Name")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property("OwnedBy")
.HasColumnType("uuid");
b.Property("PortfolioId")
.HasColumnType("bigint");
b.Property("Status")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasDefaultValueSql("1");
b.Property("UpdatedAt")
.HasColumnType("timestamp with time zone");
b.Property("UpdatedBy")
.HasColumnType("uuid");
b.HasKey("Id");
b.HasIndex("CreatedBy");
b.HasIndex("OwnedBy");
b.HasIndex("PortfolioId");
b.ToTable("Programmes", (string)null);
});
modelBuilder.Entity("PostFundManagement.Domain.Entities.Project", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
b.Property("CreatedAt")
.ValueGeneratedOnAdd()
.HasColumnType("timestamp with time zone")
.HasDefaultValueSql("now()");
b.Property("CreatedBy")
.HasColumnType("uuid");
b.Property("Description")
.IsRequired()
.HasMaxLength(1024)
.HasColumnType("character varying(1024)");
b.Property("EndedAt")
.HasColumnType("timestamp with time zone");
b.Property("Name")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property("ProgrammeId")
.HasColumnType("bigint");
b.Property("ProjectType")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasDefaultValueSql("10");
b.Property("Sector")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasDefaultValueSql("11");
b.Property("StartedAt")
.HasColumnType("timestamp with time zone");
b.Property("Status")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasDefaultValueSql("1");
b.Property("UpdatedAt")
.HasColumnType("timestamp with time zone");
b.Property("UpdatedBy")
.HasColumnType("uuid");
b.HasKey("Id");
b.HasIndex("CreatedBy");
b.HasIndex("ProgrammeId");
b.HasIndex("UpdatedBy");
b.ToTable("Projects", (string)null);
});
modelBuilder.Entity("PostFundManagement.Domain.Entities.Risk", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
b.Property("CreatedAt")
.ValueGeneratedOnAdd()
.HasColumnType("timestamp with time zone")
.HasDefaultValueSql("now()");
b.Property("CreatedBy")
.HasColumnType("uuid");
b.Property("Description")
.IsRequired()
.HasMaxLength(1024)
.HasColumnType("character varying(1024)");
b.Property("Impact")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasDefaultValueSql("1");
b.Property("Likelihood")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasDefaultValueSql("3");
b.Property("Name")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property("ProjectId")
.HasColumnType("bigint");
b.HasKey("Id");
b.HasIndex("CreatedBy");
b.HasIndex("ProjectId");
b.ToTable("Risks", (string)null);
});
modelBuilder.Entity("PostFundManagement.Domain.Entities.Rule", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
b.Property("CreatedAt")
.ValueGeneratedOnAdd()
.HasColumnType("timestamp with time zone")
.HasDefaultValueSql("now()");
b.Property("CreatedBy")
.HasColumnType("uuid");
b.Property("Name")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property("ProgrammeId")
.HasColumnType("bigint");
b.Property("Status")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasDefaultValueSql("2");
b.Property("UpdatedAt")
.HasColumnType("timestamp with time zone");
b.Property("UpdatedBy")
.HasColumnType("uuid");
b.Property("Version")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasDefaultValue(1);
b.HasKey("Id");
b.HasIndex("CreatedBy");
b.HasIndex("ProgrammeId");
b.HasIndex("UpdatedBy");
b.ToTable("Rules", (string)null);
});
modelBuilder.Entity("PostFundManagement.Domain.Entities.SiteVisit", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
b.Property("CreatedAt")
.ValueGeneratedOnAdd()
.HasColumnType("timestamp with time zone")
.HasDefaultValueSql("now()");
b.Property("CreatedBy")
.HasColumnType("uuid");
b.Property("Findings")
.HasMaxLength(4096)
.HasColumnType("character varying(4096)");
b.Property("InspectorName")
.IsRequired()
.HasColumnType("text");
b.Property("ProjectId")
.HasColumnType("bigint");
b.Property("Status")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasDefaultValueSql("1");
b.Property("VisitedAt")
.HasColumnType("timestamp with time zone");
b.HasKey("Id");
b.HasIndex("CreatedBy");
b.HasIndex("ProjectId");
b.ToTable("SiteVisits", (string)null);
});
modelBuilder.Entity("PostFundManagement.Domain.Entities.User", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property