266 lines
9.1 KiB
C#
266 lines
9.1 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using Budget.Infrastructure.Data;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
|
|
#nullable disable
|
|
|
|
namespace Budget.Infrastructure.Data.Migrations
|
|
{
|
|
[DbContext(typeof(AppDbContext))]
|
|
[Migration("20260503121617_RemoveEffectiveTaxRate")]
|
|
partial class RemoveEffectiveTaxRate
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder
|
|
.HasAnnotation("ProductVersion", "10.0.7")
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
|
|
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
|
|
|
modelBuilder.Entity("Budget.Core.Models.Budget", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTimeOffset>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<DateTimeOffset?>("DeletedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<bool>("IsDeleted")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(200)
|
|
.HasColumnType("character varying(200)");
|
|
|
|
b.Property<string>("OwnerUserId")
|
|
.IsRequired()
|
|
.HasMaxLength(200)
|
|
.HasColumnType("character varying(200)");
|
|
|
|
b.Property<DateTimeOffset>("UpdatedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<uint>("xmin")
|
|
.IsConcurrencyToken()
|
|
.ValueGeneratedOnAddOrUpdate()
|
|
.HasColumnType("xid")
|
|
.HasColumnName("xmin");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Budgets");
|
|
});
|
|
|
|
modelBuilder.Entity("Budget.Core.Models.BudgetShare", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<Guid>("BudgetId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTimeOffset>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<DateTimeOffset?>("DeletedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<bool>("IsDeleted")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<bool>("IsPending")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<int>("Permission")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<string>("SharedWithEmail")
|
|
.IsRequired()
|
|
.HasMaxLength(200)
|
|
.HasColumnType("character varying(200)");
|
|
|
|
b.Property<string>("SharedWithUserId")
|
|
.HasMaxLength(200)
|
|
.HasColumnType("character varying(200)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("BudgetId", "SharedWithEmail")
|
|
.IsUnique();
|
|
|
|
b.ToTable("BudgetShares");
|
|
});
|
|
|
|
modelBuilder.Entity("Budget.Core.Models.Income", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<decimal>("Amount")
|
|
.HasPrecision(18, 2)
|
|
.HasColumnType("numeric(18,2)");
|
|
|
|
b.Property<Guid>("BudgetId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTimeOffset?>("DeletedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<int>("Frequency")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<bool>("IsDeleted")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(200)
|
|
.HasColumnType("character varying(200)");
|
|
|
|
b.Property<int>("SortOrder")
|
|
.HasColumnType("integer");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("BudgetId");
|
|
|
|
b.ToTable("Incomes");
|
|
});
|
|
|
|
modelBuilder.Entity("Budget.Core.Models.KnownUser", b =>
|
|
{
|
|
b.Property<string>("Id")
|
|
.HasMaxLength(200)
|
|
.HasColumnType("character varying(200)");
|
|
|
|
b.Property<string>("Email")
|
|
.IsRequired()
|
|
.HasMaxLength(200)
|
|
.HasColumnType("character varying(200)");
|
|
|
|
b.Property<DateTimeOffset>("LastSeenAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(200)
|
|
.HasColumnType("character varying(200)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("KnownUsers");
|
|
});
|
|
|
|
modelBuilder.Entity("Budget.Core.Models.Outgo", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<decimal>("Amount")
|
|
.HasPrecision(18, 2)
|
|
.HasColumnType("numeric(18,2)");
|
|
|
|
b.Property<Guid>("BudgetId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("Category")
|
|
.HasMaxLength(100)
|
|
.HasColumnType("character varying(100)");
|
|
|
|
b.Property<DateTimeOffset?>("DeletedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<int>("Frequency")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<bool>("IsDeleted")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(200)
|
|
.HasColumnType("character varying(200)");
|
|
|
|
b.Property<string>("Notes")
|
|
.HasMaxLength(1000)
|
|
.HasColumnType("character varying(1000)");
|
|
|
|
b.Property<string>("PaymentSource")
|
|
.HasMaxLength(100)
|
|
.HasColumnType("character varying(100)");
|
|
|
|
b.Property<int>("SortOrder")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<int>("Type")
|
|
.HasColumnType("integer");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("BudgetId");
|
|
|
|
b.ToTable("Outgos");
|
|
});
|
|
|
|
modelBuilder.Entity("Budget.Core.Models.BudgetShare", b =>
|
|
{
|
|
b.HasOne("Budget.Core.Models.Budget", "Budget")
|
|
.WithMany("Shares")
|
|
.HasForeignKey("BudgetId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Budget");
|
|
});
|
|
|
|
modelBuilder.Entity("Budget.Core.Models.Income", b =>
|
|
{
|
|
b.HasOne("Budget.Core.Models.Budget", "Budget")
|
|
.WithMany("Incomes")
|
|
.HasForeignKey("BudgetId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Budget");
|
|
});
|
|
|
|
modelBuilder.Entity("Budget.Core.Models.Outgo", b =>
|
|
{
|
|
b.HasOne("Budget.Core.Models.Budget", "Budget")
|
|
.WithMany("Outgos")
|
|
.HasForeignKey("BudgetId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Budget");
|
|
});
|
|
|
|
modelBuilder.Entity("Budget.Core.Models.Budget", b =>
|
|
{
|
|
b.Navigation("Incomes");
|
|
|
|
b.Navigation("Outgos");
|
|
|
|
b.Navigation("Shares");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|