You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
380 lines
12 KiB
380 lines
12 KiB
// <auto-generated />
|
|
using System;
|
|
using Entity_Framework;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
|
|
#nullable disable
|
|
|
|
namespace Entity_Framework.Migrations
|
|
{
|
|
[DbContext(typeof(BDDContext))]
|
|
[Migration("20230322173709_test")]
|
|
partial class test
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder.HasAnnotation("ProductVersion", "7.0.3");
|
|
|
|
modelBuilder.Entity("Entity_Framework.Entity.Circuits", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("Name")
|
|
.IsUnique();
|
|
|
|
b.ToTable("Circuits");
|
|
|
|
b.HasData(
|
|
new
|
|
{
|
|
Id = 1,
|
|
Name = "test_CIRCUIT"
|
|
});
|
|
});
|
|
|
|
modelBuilder.Entity("Entity_Framework.Entity.Ecuries", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int>("IdPiloteProprietaire")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("IdPiloteProprietaire")
|
|
.IsUnique();
|
|
|
|
b.HasIndex("Name")
|
|
.IsUnique();
|
|
|
|
b.ToTable("Ecuries");
|
|
});
|
|
|
|
modelBuilder.Entity("Entity_Framework.Entity.Images", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Base64")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<int>("IdPilote")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("IdPilote")
|
|
.IsUnique();
|
|
|
|
b.ToTable("Images");
|
|
});
|
|
|
|
modelBuilder.Entity("Entity_Framework.Entity.Pilotes", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Email")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Password")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Pseudo")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("Email")
|
|
.IsUnique();
|
|
|
|
b.HasIndex("Pseudo")
|
|
.IsUnique();
|
|
|
|
b.ToTable("Pilotes");
|
|
|
|
b.HasData(
|
|
new
|
|
{
|
|
Id = 1,
|
|
Email = "test@gmail.com",
|
|
Password = "7NcYcNGWMxapfjrDQIyYNa2M8PPBvHA1J8MCZVNPda4=",
|
|
Pseudo = "test_PILOTE"
|
|
});
|
|
});
|
|
|
|
modelBuilder.Entity("Entity_Framework.Entity.Points", b =>
|
|
{
|
|
b.Property<long>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<float>("A_Steer")
|
|
.HasColumnType("REAL");
|
|
|
|
b.Property<float>("Distance")
|
|
.HasColumnType("REAL");
|
|
|
|
b.Property<float>("G_Lat")
|
|
.HasColumnType("REAL");
|
|
|
|
b.Property<float>("G_Lon")
|
|
.HasColumnType("REAL");
|
|
|
|
b.Property<long>("IdTours")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<double>("Latitude")
|
|
.HasColumnType("REAL");
|
|
|
|
b.Property<double>("Longitude")
|
|
.HasColumnType("REAL");
|
|
|
|
b.Property<float>("NGearASCII")
|
|
.HasColumnType("REAL");
|
|
|
|
b.Property<float>("P_BreakF")
|
|
.HasColumnType("REAL");
|
|
|
|
b.Property<float>("R_Pedal")
|
|
.HasColumnType("REAL");
|
|
|
|
b.Property<float>("Timer")
|
|
.HasColumnType("REAL");
|
|
|
|
b.Property<float>("V_Car")
|
|
.HasColumnType("REAL");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("IdTours");
|
|
|
|
b.ToTable("Points");
|
|
});
|
|
|
|
modelBuilder.Entity("Entity_Framework.Entity.Relations.Relation_Pilote_Ecurie", b =>
|
|
{
|
|
b.Property<int>("IdPilote")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int>("IdEcurie")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int>("EcurieId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Grade")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<int>("PiloteId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.HasKey("IdPilote", "IdEcurie");
|
|
|
|
b.HasIndex("EcurieId");
|
|
|
|
b.HasIndex("PiloteId");
|
|
|
|
b.ToTable("RelationEcuriePilote");
|
|
});
|
|
|
|
modelBuilder.Entity("Entity_Framework.Entity.Sessions", b =>
|
|
{
|
|
b.Property<long>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<DateTime>("Date")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<int>("IdCircuit")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int>("IdPilote")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Type")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("IdCircuit");
|
|
|
|
b.HasIndex("IdPilote");
|
|
|
|
b.ToTable("Sessions");
|
|
});
|
|
|
|
modelBuilder.Entity("Entity_Framework.Entity.Tours", b =>
|
|
{
|
|
b.Property<long>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<long>("IdSession")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int>("Numero")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Temps")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("IdSession");
|
|
|
|
b.ToTable("Tours");
|
|
});
|
|
|
|
modelBuilder.Entity("Entity_Framework.Entity.Ecuries", b =>
|
|
{
|
|
b.HasOne("Entity_Framework.Entity.Pilotes", "PiloteProprietaire")
|
|
.WithOne("EcuriePropriétaire")
|
|
.HasForeignKey("Entity_Framework.Entity.Ecuries", "IdPiloteProprietaire")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("PiloteProprietaire");
|
|
});
|
|
|
|
modelBuilder.Entity("Entity_Framework.Entity.Images", b =>
|
|
{
|
|
b.HasOne("Entity_Framework.Entity.Pilotes", "Pilote")
|
|
.WithOne("Image")
|
|
.HasForeignKey("Entity_Framework.Entity.Images", "IdPilote")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Pilote");
|
|
});
|
|
|
|
modelBuilder.Entity("Entity_Framework.Entity.Points", b =>
|
|
{
|
|
b.HasOne("Entity_Framework.Entity.Tours", "Tours")
|
|
.WithMany("Points")
|
|
.HasForeignKey("IdTours")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Tours");
|
|
});
|
|
|
|
modelBuilder.Entity("Entity_Framework.Entity.Relations.Relation_Pilote_Ecurie", b =>
|
|
{
|
|
b.HasOne("Entity_Framework.Entity.Ecuries", "Ecurie")
|
|
.WithMany("PilotesRelation")
|
|
.HasForeignKey("EcurieId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("Entity_Framework.Entity.Pilotes", "Pilote")
|
|
.WithMany("Ecurie")
|
|
.HasForeignKey("PiloteId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Ecurie");
|
|
|
|
b.Navigation("Pilote");
|
|
});
|
|
|
|
modelBuilder.Entity("Entity_Framework.Entity.Sessions", b =>
|
|
{
|
|
b.HasOne("Entity_Framework.Entity.Circuits", "Circuit")
|
|
.WithMany("Course")
|
|
.HasForeignKey("IdCircuit")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("Entity_Framework.Entity.Pilotes", "Pilote")
|
|
.WithMany("Sessions")
|
|
.HasForeignKey("IdPilote")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Circuit");
|
|
|
|
b.Navigation("Pilote");
|
|
});
|
|
|
|
modelBuilder.Entity("Entity_Framework.Entity.Tours", b =>
|
|
{
|
|
b.HasOne("Entity_Framework.Entity.Sessions", "Session")
|
|
.WithMany("Tours")
|
|
.HasForeignKey("IdSession")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Session");
|
|
});
|
|
|
|
modelBuilder.Entity("Entity_Framework.Entity.Circuits", b =>
|
|
{
|
|
b.Navigation("Course");
|
|
});
|
|
|
|
modelBuilder.Entity("Entity_Framework.Entity.Ecuries", b =>
|
|
{
|
|
b.Navigation("PilotesRelation");
|
|
});
|
|
|
|
modelBuilder.Entity("Entity_Framework.Entity.Pilotes", b =>
|
|
{
|
|
b.Navigation("Ecurie");
|
|
|
|
b.Navigation("EcuriePropriétaire")
|
|
.IsRequired();
|
|
|
|
b.Navigation("Image")
|
|
.IsRequired();
|
|
|
|
b.Navigation("Sessions");
|
|
});
|
|
|
|
modelBuilder.Entity("Entity_Framework.Entity.Sessions", b =>
|
|
{
|
|
b.Navigation("Tours");
|
|
});
|
|
|
|
modelBuilder.Entity("Entity_Framework.Entity.Tours", b =>
|
|
{
|
|
b.Navigation("Points");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|