// using System; using AutoCatCore.Model; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; #nullable disable namespace AutoCatCore.Migrations { [DbContext(typeof(AutoCatDbContext))] [Migration("20240508141817_InitialCreate")] partial class InitialCreate { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder.HasAnnotation("ProductVersion", "8.0.4"); modelBuilder.Entity("AutoCatCore.Model.Osago", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("Date") .HasColumnType("REAL"); b.Property("Insurant") .HasMaxLength(100) .HasColumnType("TEXT"); b.Property("Name") .HasMaxLength(100) .HasColumnType("TEXT"); b.Property("Number") .HasMaxLength(50) .HasColumnType("TEXT"); b.Property("Owner") .HasMaxLength(100) .HasColumnType("TEXT"); b.Property("PlateNumber") .HasMaxLength(50) .HasColumnType("TEXT"); b.Property("Restrictions") .HasMaxLength(500) .HasColumnType("TEXT"); b.Property("Status") .HasMaxLength(100) .HasColumnType("TEXT"); b.Property("UsageRegion") .HasMaxLength(100) .HasColumnType("TEXT"); b.Property("VehicleNumber") .HasColumnType("TEXT"); b.Property("Vin") .HasMaxLength(50) .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("VehicleNumber"); b.ToTable("Osago"); }); modelBuilder.Entity("AutoCatCore.Model.User", b => { b.Property("Email") .HasMaxLength(50) .HasColumnType("TEXT"); b.Property("FirebaseIdToken") .HasMaxLength(300) .HasColumnType("TEXT"); b.Property("FirebaseRefreshToken") .HasMaxLength(300) .HasColumnType("TEXT"); b.Property("Token") .HasMaxLength(300) .HasColumnType("TEXT"); b.HasKey("Email"); b.ToTable("Users"); }); modelBuilder.Entity("AutoCatCore.Model.Vehicle", b => { b.Property("Number") .HasMaxLength(10) .HasColumnType("TEXT"); b.Property("AddedBy") .HasMaxLength(100) .HasColumnType("TEXT"); b.Property("AddedDate") .HasColumnType("REAL"); b.Property("BrandId") .HasColumnType("INTEGER"); b.Property("Category") .HasMaxLength(100) .HasColumnType("TEXT"); b.Property("Color") .HasMaxLength(100) .HasColumnType("TEXT"); b.Property("CurrentNumber") .HasMaxLength(10) .HasColumnType("TEXT"); b.Property("EngineId") .HasColumnType("INTEGER"); b.Property("IsJapanese") .HasColumnType("INTEGER"); b.Property("IsRightWheel") .HasColumnType("INTEGER"); b.Property("ModelId") .HasColumnType("INTEGER"); b.Property("Pts") .HasMaxLength(50) .HasColumnType("TEXT"); b.Property("Sts") .HasMaxLength(50) .HasColumnType("TEXT"); b.Property("UpdatedDate") .HasColumnType("REAL"); b.Property("Vin1") .HasMaxLength(50) .HasColumnType("TEXT"); b.Property("Vin2") .HasMaxLength(50) .HasColumnType("TEXT"); b.Property("Year") .HasColumnType("INTEGER"); b.HasKey("Number"); b.HasIndex("BrandId"); b.HasIndex("EngineId"); b.HasIndex("ModelId"); b.ToTable("Vehicles"); }); modelBuilder.Entity("AutoCatCore.Model.VehicleAd", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("AdDescription") .HasMaxLength(500) .HasColumnType("TEXT"); b.Property("City") .HasMaxLength(100) .HasColumnType("TEXT"); b.Property("Date") .HasMaxLength(50) .HasColumnType("REAL"); b.Property("Mileage") .HasMaxLength(50) .HasColumnType("TEXT"); b.Property("Photos") .HasColumnType("TEXT"); b.Property("Price") .HasMaxLength(50) .HasColumnType("TEXT"); b.Property("Region") .HasMaxLength(100) .HasColumnType("TEXT"); b.Property("Url") .HasMaxLength(200) .HasColumnType("TEXT"); b.Property("VehicleNumber") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("VehicleNumber"); b.ToTable("VehicleAd"); }); modelBuilder.Entity("AutoCatCore.Model.VehicleBrand", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("Logo") .HasMaxLength(200) .HasColumnType("TEXT"); b.Property("NameId") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("NameId"); b.ToTable("VehicleBrand"); }); modelBuilder.Entity("AutoCatCore.Model.VehicleEngine", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("FuelType") .HasMaxLength(100) .HasColumnType("TEXT"); b.Property("Number") .HasMaxLength(100) .HasColumnType("TEXT"); b.Property("PowerHp") .HasColumnType("REAL"); b.Property("PowerKw") .HasColumnType("REAL"); b.Property("Volume") .HasColumnType("INTEGER"); b.HasKey("Id"); b.ToTable("VehicleEngine"); }); modelBuilder.Entity("AutoCatCore.Model.VehicleEvent", b => { b.Property("Id") .HasColumnType("TEXT"); b.Property("Address") .HasMaxLength(100) .HasColumnType("TEXT"); b.Property("Date") .HasColumnType("REAL"); b.Property("Latitude") .HasColumnType("REAL"); b.Property("Longitude") .HasColumnType("REAL"); b.Property("VehicleNumber") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("VehicleNumber"); b.ToTable("VehicleEvent"); }); modelBuilder.Entity("AutoCatCore.Model.VehicleModel", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("NameId") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("NameId"); b.ToTable("VehicleModel"); }); modelBuilder.Entity("AutoCatCore.Model.VehicleName", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("Normalized") .HasMaxLength(100) .HasColumnType("TEXT"); b.Property("Original") .HasMaxLength(100) .HasColumnType("TEXT"); b.HasKey("Id"); b.ToTable("VehicleName"); }); modelBuilder.Entity("AutoCatCore.Model.VehicleOwnershipPeriod", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("Building") .HasMaxLength(100) .HasColumnType("TEXT"); b.Property("Code") .HasMaxLength(100) .HasColumnType("TEXT"); b.Property("From") .HasColumnType("INTEGER"); b.Property("Inn") .HasMaxLength(100) .HasColumnType("TEXT"); b.Property("LastOperation") .HasMaxLength(500) .HasColumnType("TEXT"); b.Property("Locality") .HasMaxLength(100) .HasColumnType("TEXT"); b.Property("OwnerType") .HasMaxLength(100) .HasColumnType("TEXT"); b.Property("Region") .HasMaxLength(300) .HasColumnType("TEXT"); b.Property("RegistrationRegion") .HasMaxLength(300) .HasColumnType("TEXT"); b.Property("Street") .HasMaxLength(100) .HasColumnType("TEXT"); b.Property("To") .HasColumnType("INTEGER"); b.Property("VehicleNumber") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("VehicleNumber"); b.ToTable("VehicleOwnershipPeriod"); }); modelBuilder.Entity("AutoCatCore.Model.VehiclePhoto", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("Brand") .HasMaxLength(100) .HasColumnType("TEXT"); b.Property("Date") .HasColumnType("REAL"); b.Property("Model") .HasMaxLength(100) .HasColumnType("TEXT"); b.Property("Url") .HasMaxLength(500) .HasColumnType("TEXT"); b.Property("VehicleNumber") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("VehicleNumber"); b.ToTable("VehiclePhoto"); }); modelBuilder.Entity("AutoCatCore.Model.Osago", b => { b.HasOne("AutoCatCore.Model.Vehicle", null) .WithMany("OsagoContracts") .HasForeignKey("VehicleNumber"); }); modelBuilder.Entity("AutoCatCore.Model.Vehicle", b => { b.HasOne("AutoCatCore.Model.VehicleBrand", "Brand") .WithMany() .HasForeignKey("BrandId"); b.HasOne("AutoCatCore.Model.VehicleEngine", "Engine") .WithMany() .HasForeignKey("EngineId"); b.HasOne("AutoCatCore.Model.VehicleModel", "Model") .WithMany() .HasForeignKey("ModelId"); b.Navigation("Brand"); b.Navigation("Engine"); b.Navigation("Model"); }); modelBuilder.Entity("AutoCatCore.Model.VehicleAd", b => { b.HasOne("AutoCatCore.Model.Vehicle", null) .WithMany("Ads") .HasForeignKey("VehicleNumber"); }); modelBuilder.Entity("AutoCatCore.Model.VehicleBrand", b => { b.HasOne("AutoCatCore.Model.VehicleName", "Name") .WithMany() .HasForeignKey("NameId"); b.Navigation("Name"); }); modelBuilder.Entity("AutoCatCore.Model.VehicleEvent", b => { b.HasOne("AutoCatCore.Model.Vehicle", null) .WithMany("Events") .HasForeignKey("VehicleNumber"); }); modelBuilder.Entity("AutoCatCore.Model.VehicleModel", b => { b.HasOne("AutoCatCore.Model.VehicleName", "Name") .WithMany() .HasForeignKey("NameId"); b.Navigation("Name"); }); modelBuilder.Entity("AutoCatCore.Model.VehicleOwnershipPeriod", b => { b.HasOne("AutoCatCore.Model.Vehicle", null) .WithMany("OwnershipPeriods") .HasForeignKey("VehicleNumber"); }); modelBuilder.Entity("AutoCatCore.Model.VehiclePhoto", b => { b.HasOne("AutoCatCore.Model.Vehicle", null) .WithMany("Photos") .HasForeignKey("VehicleNumber"); }); modelBuilder.Entity("AutoCatCore.Model.Vehicle", b => { b.Navigation("Ads"); b.Navigation("Events"); b.Navigation("OsagoContracts"); b.Navigation("OwnershipPeriods"); b.Navigation("Photos"); }); #pragma warning restore 612, 618 } } }