112 lines
3.6 KiB
C#
112 lines
3.6 KiB
C#
// <auto-generated />
|
|
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.Domain.Entities.Account", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<decimal>("Balance")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<int>("Type")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Accounts");
|
|
|
|
b.HasData(
|
|
new
|
|
{
|
|
Id = 1,
|
|
Balance = 10000000.00m,
|
|
Type = 2
|
|
},
|
|
new
|
|
{
|
|
Id = 2,
|
|
Balance = 50000000.00m,
|
|
Type = 0
|
|
},
|
|
new
|
|
{
|
|
Id = 99999,
|
|
Balance = 0.00m,
|
|
Type = 3
|
|
});
|
|
});
|
|
|
|
modelBuilder.Entity("FinancialApi.Domain.Entities.JournalEntry", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<DateTimeOffset>("CreatedAt")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Description")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("JournalEntries");
|
|
});
|
|
|
|
modelBuilder.Entity("FinancialApi.Domain.Entities.JournalEntry", b =>
|
|
{
|
|
b.OwnsMany("FinancialApi.Domain.Entities.JournalLine", "Lines", b1 =>
|
|
{
|
|
b1.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b1.Property<int>("AccountId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b1.Property<decimal>("Amount")
|
|
.HasColumnType("TEXT");
|
|
|
|
b1.Property<Guid>("JournalEntryId")
|
|
.HasColumnType("TEXT");
|
|
|
|
b1.Property<string>("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
|
|
}
|
|
}
|
|
}
|