// using System; using Duempelkas.Infrastructure.Persistence; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; #nullable disable namespace Duempelkas.Infrastructure.Migrations { [DbContext(typeof(FinanceDbContext))] partial class FinanceDbContextModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder.HasAnnotation("ProductVersion", "10.0.5"); modelBuilder.Entity("Duempelkas.Domain.Entities.Account", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("CarryoverBalance") .HasColumnType("decimal(18,2)"); b.Property("CreatedUtc") .HasColumnType("TEXT"); b.Property("Name") .IsRequired() .HasMaxLength(200) .HasColumnType("TEXT"); b.HasKey("Id"); b.ToTable("Accounts"); }); modelBuilder.Entity("Duempelkas.Domain.Entities.Entry", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("AccountId") .HasColumnType("INTEGER"); b.Property("Amount") .HasColumnType("decimal(18,2)"); b.Property("CreatedUtc") .HasColumnType("TEXT"); b.Property("Date") .HasColumnType("TEXT"); b.Property("DisplayId") .IsRequired() .HasMaxLength(20) .HasColumnType("TEXT"); b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("INTEGER") .HasDefaultValue(false); b.Property("Title") .IsRequired() .HasMaxLength(500) .HasColumnType("TEXT"); b.Property("TransferLinkId") .HasColumnType("INTEGER"); b.Property("Type") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("DisplayId"); b.HasIndex("TransferLinkId"); b.HasIndex("AccountId", "Date"); b.ToTable("Entries"); }); modelBuilder.Entity("Duempelkas.Domain.Entities.TransferLink", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("CreatedUtc") .HasColumnType("TEXT"); b.Property("Note") .HasMaxLength(500) .HasColumnType("TEXT"); b.Property("SourceEntryId") .HasColumnType("INTEGER"); b.Property("TargetEntryId") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("SourceEntryId") .IsUnique(); b.HasIndex("TargetEntryId") .IsUnique(); b.ToTable("TransferLinks"); }); modelBuilder.Entity("Duempelkas.Domain.Entities.Entry", b => { b.HasOne("Duempelkas.Domain.Entities.Account", "Account") .WithMany("Entries") .HasForeignKey("AccountId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("Duempelkas.Domain.Entities.TransferLink", "TransferLink") .WithMany() .HasForeignKey("TransferLinkId") .OnDelete(DeleteBehavior.Restrict); b.Navigation("Account"); b.Navigation("TransferLink"); }); modelBuilder.Entity("Duempelkas.Domain.Entities.TransferLink", b => { b.HasOne("Duempelkas.Domain.Entities.Entry", "SourceEntry") .WithMany() .HasForeignKey("SourceEntryId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.HasOne("Duempelkas.Domain.Entities.Entry", "TargetEntry") .WithMany() .HasForeignKey("TargetEntryId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.Navigation("SourceEntry"); b.Navigation("TargetEntry"); }); modelBuilder.Entity("Duempelkas.Domain.Entities.Account", b => { b.Navigation("Entries"); }); #pragma warning restore 612, 618 } } }