// using System; using Api; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; #nullable disable namespace Api.Migrations { [DbContext(typeof(DBContext))] [Migration("20250319082642_init3")] partial class init3 { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder.HasAnnotation("ProductVersion", "9.0.3"); modelBuilder.Entity("Models.Device", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("ReferenceId") .HasColumnType("TEXT"); b.Property("TempHigh") .HasColumnType("REAL"); b.Property("TempLow") .HasColumnType("REAL"); b.Property("UserId") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("UserId"); b.ToTable("Devices"); }); modelBuilder.Entity("Models.TemperatureLogs", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("Date") .HasColumnType("TEXT"); b.Property("DeviceId") .HasColumnType("INTEGER"); b.Property("TempHigh") .HasColumnType("REAL"); b.Property("TempLow") .HasColumnType("REAL"); b.Property("Temperature") .HasColumnType("REAL"); b.HasKey("Id"); b.HasIndex("DeviceId"); b.ToTable("TemperatureLogs"); }); modelBuilder.Entity("Models.User", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("Email") .IsRequired() .HasColumnType("TEXT"); b.Property("Password") .IsRequired() .HasColumnType("TEXT"); b.Property("UserName") .IsRequired() .HasColumnType("TEXT"); b.HasKey("Id"); b.ToTable("Users"); }); modelBuilder.Entity("Models.Device", b => { b.HasOne("Models.User", null) .WithMany("Devices") .HasForeignKey("UserId"); }); modelBuilder.Entity("Models.TemperatureLogs", b => { b.HasOne("Models.Device", null) .WithMany("Logs") .HasForeignKey("DeviceId"); }); modelBuilder.Entity("Models.Device", b => { b.Navigation("Logs"); }); modelBuilder.Entity("Models.User", b => { b.Navigation("Devices"); }); #pragma warning restore 612, 618 } } }