Added indexes for `ImportedAt` and a composite key on `InvoiceNumber` and `SellerTaxId` to improve query performance. Updated `AppDbContext` and EF Core migrations to reflect these changes. Introduced `ZugferdInvoiceListDto` to optimize memory usage by excluding large fields like `RawXml`. Updated the frontend (`Index.cshtml`) and backend (`Index.cshtml.cs`) to use the new DTO for better performance.
89 lines
3.0 KiB
C#
89 lines
3.0 KiB
C#
// <auto-generated />
|
|
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.ZugferdInvoice", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("BuyerName")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("CurrencyCode")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("GuidelineId")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Iban")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime>("ImportedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<DateTime>("InvoiceDate")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("InvoiceNumber")
|
|
.HasColumnType("nvarchar(450)");
|
|
|
|
b.Property<string>("RawXml")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("ResultFilePath")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("SellerName")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("SellerTaxId")
|
|
.HasColumnType("nvarchar(450)");
|
|
|
|
b.Property<string>("SourceType")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<decimal>("TaxAmount")
|
|
.HasColumnType("decimal(18,2)");
|
|
|
|
b.Property<decimal>("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");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|