// using System; using FinancialApi.Infrastructure; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; #nullable disable namespace FinancialApi.Infrastructure.Migrations { [DbContext(typeof(AccountDbContext))] partial class AccountDbContextModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder.HasAnnotation("ProductVersion", "10.0.9"); modelBuilder.Entity("FinancialApi.Application.Account", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("AccountType") .IsRequired() .HasColumnType("TEXT"); b.Property("Balance") .HasColumnType("TEXT"); b.HasKey("Id"); b.ToTable("Accounts"); b.HasData( new { Id = 1, AccountType = "Credit", Balance = 10000000.00m }, new { Id = 2, AccountType = "Liability", Balance = 50000000.00m }, new { Id = 99999, AccountType = "Revenue", Balance = 0.00m }); }); modelBuilder.Entity("FinancialApi.Application.JournalEntry", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("TEXT"); b.Property("CreatedAt") .HasColumnType("TEXT"); b.Property("Description") .IsRequired() .HasColumnType("TEXT"); b.HasKey("Id"); b.ToTable("JournalEntries"); }); modelBuilder.Entity("FinancialApi.Application.JournalEntry", b => { b.OwnsMany("FinancialApi.Application.JournalLine", "Lines", b1 => { b1.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b1.Property("AccountId") .HasColumnType("INTEGER"); b1.Property("Amount") .HasColumnType("TEXT"); b1.Property("JournalEntryId") .HasColumnType("TEXT"); b1.Property("Type") .IsRequired() .HasColumnType("TEXT"); b1.HasKey("Id"); b1.HasIndex("JournalEntryId"); b1.ToTable("JournalLine"); b1.WithOwner() .HasForeignKey("JournalEntryId"); }); b.Navigation("Lines"); }); #pragma warning restore 612, 618 } } }