API_Finshark/Migrations/ApplicationDbContextModelSnapshot.cs
Marc Wieland da8f1f8ba3 Init
2025-09-26 08:51:10 +02:00

105 lines
3.4 KiB
C#

// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using api.Data;
#nullable disable
namespace api.Migrations
{
[DbContext(typeof(ApplicationDbContext))]
partial class ApplicationDbContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "9.0.9")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("api.Models.Comment", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<string>("Content")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreatedOn")
.HasColumnType("datetime2");
b.Property<int?>("StockId")
.HasColumnType("int");
b.Property<string>("Title")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.HasIndex("StockId");
b.ToTable("Comments");
});
modelBuilder.Entity("api.Models.Stock", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<string>("CompanyName")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("Industry")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<decimal>("LastDiv")
.HasColumnType("decimal(18,2)");
b.Property<long>("MarketCap")
.HasColumnType("bigint");
b.Property<decimal>("Purchase")
.HasColumnType("decimal(18,2)");
b.Property<string>("Symbol")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("Stocks");
});
modelBuilder.Entity("api.Models.Comment", b =>
{
b.HasOne("api.Models.Stock", "Stock")
.WithMany("Comments")
.HasForeignKey("StockId");
b.Navigation("Stock");
});
modelBuilder.Entity("api.Models.Stock", b =>
{
b.Navigation("Comments");
});
#pragma warning restore 612, 618
}
}
}