//
using System;
using DXApp.TemplateKitProject.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace DXApp.TemplateKitProject.Migrations
{
[DbContext(typeof(AppDbContext))]
partial class AppDbContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "8.0.8")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("DXApp.TemplateKitProject.Models.InvoiceAttachment", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("ExtractedAt")
.HasColumnType("datetime2");
b.Property("FileSizeBytes")
.HasColumnType("bigint");
b.Property("IsZugferdXml")
.HasColumnType("bit");
b.Property("OriginalFileName")
.HasColumnType("nvarchar(max)");
b.Property("SavedFilePath")
.HasColumnType("nvarchar(max)");
b.Property("ZugferdInvoiceId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("ZugferdInvoiceId")
.HasDatabaseName("IX_InvoiceAttachments_ZugferdInvoiceId");
b.ToTable("InvoiceAttachments");
});
modelBuilder.Entity("DXApp.TemplateKitProject.Models.ZugferdInvoice", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("BuyerName")
.HasColumnType("nvarchar(max)");
b.Property("CurrencyCode")
.HasColumnType("nvarchar(max)");
b.Property("GuidelineId")
.HasColumnType("nvarchar(max)");
b.Property("Iban")
.HasColumnType("nvarchar(max)");
b.Property("ImportedAt")
.HasColumnType("datetime2");
b.Property("InvoiceDate")
.HasColumnType("datetime2");
b.Property("InvoiceNumber")
.HasColumnType("nvarchar(450)");
b.Property("RawXml")
.HasColumnType("nvarchar(max)");
b.Property("ResultFilePath")
.HasColumnType("nvarchar(max)");
b.Property("SellerName")
.HasColumnType("nvarchar(max)");
b.Property("SellerTaxId")
.HasColumnType("nvarchar(450)");
b.Property("SourceType")
.HasColumnType("nvarchar(max)");
b.Property("TaxAmount")
.HasColumnType("decimal(18,2)");
b.Property("TotalAmount")
.HasColumnType("decimal(18,2)");
b.HasKey("Id");
b.HasIndex("ImportedAt")
.HasDatabaseName("IX_ZugferdInvoices_ImportedAt");
b.HasIndex("InvoiceNumber", "SellerTaxId")
.HasDatabaseName("IX_ZugferdInvoices_InvoiceNumber_SellerTaxId");
b.ToTable("ZugferdInvoices");
});
modelBuilder.Entity("DXApp.TemplateKitProject.Models.InvoiceAttachment", b =>
{
b.HasOne("DXApp.TemplateKitProject.Models.ZugferdInvoice", "ZugferdInvoice")
.WithMany("Attachments")
.HasForeignKey("ZugferdInvoiceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("ZugferdInvoice");
});
modelBuilder.Entity("DXApp.TemplateKitProject.Models.ZugferdInvoice", b =>
{
b.Navigation("Attachments");
});
#pragma warning restore 612, 618
}
}
}