511 lines
16 KiB
C#
511 lines
16 KiB
C#
// <auto-generated />
|
|
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
|
|
{
|
|
/// <inheritdoc />
|
|
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<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<double?>("Date")
|
|
.HasColumnType("REAL");
|
|
|
|
b.Property<string>("Insurant")
|
|
.HasMaxLength(100)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Name")
|
|
.HasMaxLength(100)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Number")
|
|
.HasMaxLength(50)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Owner")
|
|
.HasMaxLength(100)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("PlateNumber")
|
|
.HasMaxLength(50)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Restrictions")
|
|
.HasMaxLength(500)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Status")
|
|
.HasMaxLength(100)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("UsageRegion")
|
|
.HasMaxLength(100)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("VehicleNumber")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Vin")
|
|
.HasMaxLength(50)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("VehicleNumber");
|
|
|
|
b.ToTable("Osago");
|
|
});
|
|
|
|
modelBuilder.Entity("AutoCatCore.Model.User", b =>
|
|
{
|
|
b.Property<string>("Email")
|
|
.HasMaxLength(50)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("FirebaseIdToken")
|
|
.HasMaxLength(300)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("FirebaseRefreshToken")
|
|
.HasMaxLength(300)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Token")
|
|
.HasMaxLength(300)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Email");
|
|
|
|
b.ToTable("Users");
|
|
});
|
|
|
|
modelBuilder.Entity("AutoCatCore.Model.Vehicle", b =>
|
|
{
|
|
b.Property<string>("Number")
|
|
.HasMaxLength(10)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("AddedBy")
|
|
.HasMaxLength(100)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<double?>("AddedDate")
|
|
.HasColumnType("REAL");
|
|
|
|
b.Property<int?>("BrandId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Category")
|
|
.HasMaxLength(100)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Color")
|
|
.HasMaxLength(100)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("CurrentNumber")
|
|
.HasMaxLength(10)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<int?>("EngineId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<bool?>("IsJapanese")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<bool?>("IsRightWheel")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int?>("ModelId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Pts")
|
|
.HasMaxLength(50)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Sts")
|
|
.HasMaxLength(50)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<double?>("UpdatedDate")
|
|
.HasColumnType("REAL");
|
|
|
|
b.Property<string>("Vin1")
|
|
.HasMaxLength(50)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Vin2")
|
|
.HasMaxLength(50)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<int?>("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<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("AdDescription")
|
|
.HasMaxLength(500)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("City")
|
|
.HasMaxLength(100)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<double?>("Date")
|
|
.HasMaxLength(50)
|
|
.HasColumnType("REAL");
|
|
|
|
b.Property<string>("Mileage")
|
|
.HasMaxLength(50)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Photos")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Price")
|
|
.HasMaxLength(50)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Region")
|
|
.HasMaxLength(100)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Url")
|
|
.HasMaxLength(200)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("VehicleNumber")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("VehicleNumber");
|
|
|
|
b.ToTable("VehicleAd");
|
|
});
|
|
|
|
modelBuilder.Entity("AutoCatCore.Model.VehicleBrand", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Logo")
|
|
.HasMaxLength(200)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<int?>("NameId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("NameId");
|
|
|
|
b.ToTable("VehicleBrand");
|
|
});
|
|
|
|
modelBuilder.Entity("AutoCatCore.Model.VehicleEngine", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("FuelType")
|
|
.HasMaxLength(100)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Number")
|
|
.HasMaxLength(100)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<double?>("PowerHp")
|
|
.HasColumnType("REAL");
|
|
|
|
b.Property<double?>("PowerKw")
|
|
.HasColumnType("REAL");
|
|
|
|
b.Property<int?>("Volume")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("VehicleEngine");
|
|
});
|
|
|
|
modelBuilder.Entity("AutoCatCore.Model.VehicleEvent", b =>
|
|
{
|
|
b.Property<string>("Id")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Address")
|
|
.HasMaxLength(100)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<double?>("Date")
|
|
.HasColumnType("REAL");
|
|
|
|
b.Property<double?>("Latitude")
|
|
.HasColumnType("REAL");
|
|
|
|
b.Property<double?>("Longitude")
|
|
.HasColumnType("REAL");
|
|
|
|
b.Property<string>("VehicleNumber")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("VehicleNumber");
|
|
|
|
b.ToTable("VehicleEvent");
|
|
});
|
|
|
|
modelBuilder.Entity("AutoCatCore.Model.VehicleModel", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int?>("NameId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("NameId");
|
|
|
|
b.ToTable("VehicleModel");
|
|
});
|
|
|
|
modelBuilder.Entity("AutoCatCore.Model.VehicleName", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Normalized")
|
|
.HasMaxLength(100)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Original")
|
|
.HasMaxLength(100)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("VehicleName");
|
|
});
|
|
|
|
modelBuilder.Entity("AutoCatCore.Model.VehicleOwnershipPeriod", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Building")
|
|
.HasMaxLength(100)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Code")
|
|
.HasMaxLength(100)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<long?>("From")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Inn")
|
|
.HasMaxLength(100)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("LastOperation")
|
|
.HasMaxLength(500)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Locality")
|
|
.HasMaxLength(100)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("OwnerType")
|
|
.HasMaxLength(100)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Region")
|
|
.HasMaxLength(300)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("RegistrationRegion")
|
|
.HasMaxLength(300)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Street")
|
|
.HasMaxLength(100)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<long?>("To")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("VehicleNumber")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("VehicleNumber");
|
|
|
|
b.ToTable("VehicleOwnershipPeriod");
|
|
});
|
|
|
|
modelBuilder.Entity("AutoCatCore.Model.VehiclePhoto", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Brand")
|
|
.HasMaxLength(100)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<double?>("Date")
|
|
.HasColumnType("REAL");
|
|
|
|
b.Property<string>("Model")
|
|
.HasMaxLength(100)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Url")
|
|
.HasMaxLength(500)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("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
|
|
}
|
|
}
|
|
}
|