// using System; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using api.Data; #nullable disable namespace api.Migrations { [DbContext(typeof(ApplicationDbContext))] [Migration("20250925120417_init")] partial class init { /// protected override void BuildTargetModel(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("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Content") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("CreatedOn") .HasColumnType("datetime2"); b.Property("StockId") .HasColumnType("int"); b.Property("Title") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.HasIndex("StockId"); b.ToTable("Comments"); }); modelBuilder.Entity("api.Models.Stock", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("CompanyName") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Industry") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("LastDiv") .HasColumnType("decimal(18,2)"); b.Property("MarketCap") .HasColumnType("bigint"); b.Property("Purchase") .HasColumnType("decimal(18,2)"); b.Property("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 } } }