test container
continuous-integration/drone/push Build is passing Details

master
Jolys Enzo 2 years ago
parent 0e0c1c3f36
commit b6ff93e839

@ -9,5 +9,8 @@ namespace Dto.Classe
public class EcurieDTO public class EcurieDTO
{ {
public string Name { get; set; } public string Name { get; set; }
public List<PiloteDTO> Members { get; set; }
public List<PiloteDTO> WaitingsMembers { get; set; }
public PiloteDTO Owner { get; set; }
} }
} }

Binary file not shown.

@ -155,7 +155,7 @@ namespace Entity_Framework
{ {
if (!optionsBuilder.IsConfigured) if (!optionsBuilder.IsConfigured)
{ {
optionsBuilder.UseSqlite($"Data Source=BDD.db"); optionsBuilder.UseSqlite($"Data Source=..\\Entity_Framework\\BDD.db");
// optionsBuilder.UseSqlite($"Data Source=C:\\Users\\Jolys Enzo\\home\\BUT\\Projet\\Sae4.01\\Projet\\R-Dash_APP\\Entity_Framework\\BDD.db"); // optionsBuilder.UseSqlite($"Data Source=C:\\Users\\Jolys Enzo\\home\\BUT\\Projet\\Sae4.01\\Projet\\R-Dash_APP\\Entity_Framework\\BDD.db");
//optionsBuilder.UseSqlite($"Data Source=C:\\Users\\zinn1\\Source\\Repos\\Serveur-Api2\\Sources\\Entity_Framework\\BDD.db"); //optionsBuilder.UseSqlite($"Data Source=C:\\Users\\zinn1\\Source\\Repos\\Serveur-Api2\\Sources\\Entity_Framework\\BDD.db");
} }

@ -11,7 +11,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace Entity_Framework.Migrations namespace Entity_Framework.Migrations
{ {
[DbContext(typeof(BDDContext))] [DbContext(typeof(BDDContext))]
[Migration("20230317102828_test")] [Migration("20230322172943_test")]
partial class test partial class test
{ {
/// <inheritdoc /> /// <inheritdoc />
@ -100,9 +100,6 @@ namespace Entity_Framework.Migrations
.IsRequired() .IsRequired()
.HasColumnType("TEXT"); .HasColumnType("TEXT");
b.Property<int?>("IdEcurie")
.HasColumnType("INTEGER");
b.Property<string>("Password") b.Property<string>("Password")
.IsRequired() .IsRequired()
.HasColumnType("TEXT"); .HasColumnType("TEXT");
@ -116,8 +113,6 @@ namespace Entity_Framework.Migrations
b.HasIndex("Email") b.HasIndex("Email")
.IsUnique(); .IsUnique();
b.HasIndex("IdEcurie");
b.HasIndex("Pseudo") b.HasIndex("Pseudo")
.IsUnique(); .IsUnique();
@ -182,6 +177,33 @@ namespace Entity_Framework.Migrations
b.ToTable("Points"); 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 => modelBuilder.Entity("Entity_Framework.Entity.Sessions", b =>
{ {
b.Property<long>("Id") b.Property<long>("Id")
@ -259,15 +281,6 @@ namespace Entity_Framework.Migrations
b.Navigation("Pilote"); b.Navigation("Pilote");
}); });
modelBuilder.Entity("Entity_Framework.Entity.Pilotes", b =>
{
b.HasOne("Entity_Framework.Entity.Ecuries", "Ecurie")
.WithMany("Pilotes")
.HasForeignKey("IdEcurie");
b.Navigation("Ecurie");
});
modelBuilder.Entity("Entity_Framework.Entity.Points", b => modelBuilder.Entity("Entity_Framework.Entity.Points", b =>
{ {
b.HasOne("Entity_Framework.Entity.Tours", "Tours") b.HasOne("Entity_Framework.Entity.Tours", "Tours")
@ -279,6 +292,25 @@ namespace Entity_Framework.Migrations
b.Navigation("Tours"); 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 => modelBuilder.Entity("Entity_Framework.Entity.Sessions", b =>
{ {
b.HasOne("Entity_Framework.Entity.Circuits", "Circuit") b.HasOne("Entity_Framework.Entity.Circuits", "Circuit")
@ -316,11 +348,13 @@ namespace Entity_Framework.Migrations
modelBuilder.Entity("Entity_Framework.Entity.Ecuries", b => modelBuilder.Entity("Entity_Framework.Entity.Ecuries", b =>
{ {
b.Navigation("Pilotes"); b.Navigation("PilotesRelation");
}); });
modelBuilder.Entity("Entity_Framework.Entity.Pilotes", b => modelBuilder.Entity("Entity_Framework.Entity.Pilotes", b =>
{ {
b.Navigation("Ecurie");
b.Navigation("EcuriePropriétaire") b.Navigation("EcuriePropriétaire")
.IsRequired(); .IsRequired();

@ -25,38 +25,38 @@ namespace Entity_Framework.Migrations
}); });
migrationBuilder.CreateTable( migrationBuilder.CreateTable(
name: "Ecuries", name: "Pilotes",
columns: table => new columns: table => new
{ {
Id = table.Column<int>(type: "INTEGER", nullable: false) Id = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true), .Annotation("Sqlite:Autoincrement", true),
Name = table.Column<string>(type: "TEXT", nullable: false), Pseudo = table.Column<string>(type: "TEXT", nullable: false),
IdPiloteProprietaire = table.Column<int>(type: "INTEGER", nullable: false) Email = table.Column<string>(type: "TEXT", nullable: false),
Password = table.Column<string>(type: "TEXT", nullable: false)
}, },
constraints: table => constraints: table =>
{ {
table.PrimaryKey("PK_Ecuries", x => x.Id); table.PrimaryKey("PK_Pilotes", x => x.Id);
}); });
migrationBuilder.CreateTable( migrationBuilder.CreateTable(
name: "Pilotes", name: "Ecuries",
columns: table => new columns: table => new
{ {
Id = table.Column<int>(type: "INTEGER", nullable: false) Id = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true), .Annotation("Sqlite:Autoincrement", true),
Pseudo = table.Column<string>(type: "TEXT", nullable: false), Name = table.Column<string>(type: "TEXT", nullable: false),
Email = table.Column<string>(type: "TEXT", nullable: false), IdPiloteProprietaire = table.Column<int>(type: "INTEGER", nullable: false)
Password = table.Column<string>(type: "TEXT", nullable: false),
IdEcurie = table.Column<int>(type: "INTEGER", nullable: true)
}, },
constraints: table => constraints: table =>
{ {
table.PrimaryKey("PK_Pilotes", x => x.Id); table.PrimaryKey("PK_Ecuries", x => x.Id);
table.ForeignKey( table.ForeignKey(
name: "FK_Pilotes_Ecuries_IdEcurie", name: "FK_Ecuries_Pilotes_IdPiloteProprietaire",
column: x => x.IdEcurie, column: x => x.IdPiloteProprietaire,
principalTable: "Ecuries", principalTable: "Pilotes",
principalColumn: "Id"); principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
}); });
migrationBuilder.CreateTable( migrationBuilder.CreateTable(
@ -108,6 +108,33 @@ namespace Entity_Framework.Migrations
onDelete: ReferentialAction.Cascade); onDelete: ReferentialAction.Cascade);
}); });
migrationBuilder.CreateTable(
name: "RelationEcuriePilote",
columns: table => new
{
IdPilote = table.Column<int>(type: "INTEGER", nullable: false),
IdEcurie = table.Column<int>(type: "INTEGER", nullable: false),
Grade = table.Column<string>(type: "TEXT", nullable: false),
PiloteId = table.Column<int>(type: "INTEGER", nullable: false),
EcurieId = table.Column<int>(type: "INTEGER", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_RelationEcuriePilote", x => new { x.IdPilote, x.IdEcurie });
table.ForeignKey(
name: "FK_RelationEcuriePilote_Ecuries_EcurieId",
column: x => x.EcurieId,
principalTable: "Ecuries",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_RelationEcuriePilote_Pilotes_PiloteId",
column: x => x.PiloteId,
principalTable: "Pilotes",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable( migrationBuilder.CreateTable(
name: "Tours", name: "Tours",
columns: table => new columns: table => new
@ -166,8 +193,8 @@ namespace Entity_Framework.Migrations
migrationBuilder.InsertData( migrationBuilder.InsertData(
table: "Pilotes", table: "Pilotes",
columns: new[] { "Id", "Email", "IdEcurie", "Password", "Pseudo" }, columns: new[] { "Id", "Email", "Password", "Pseudo" },
values: new object[] { 1, "test@gmail.com", null, "7NcYcNGWMxapfjrDQIyYNa2M8PPBvHA1J8MCZVNPda4=", "test_PILOTE" }); values: new object[] { 1, "test@gmail.com", "7NcYcNGWMxapfjrDQIyYNa2M8PPBvHA1J8MCZVNPda4=", "test_PILOTE" });
migrationBuilder.CreateIndex( migrationBuilder.CreateIndex(
name: "IX_Circuits_Name", name: "IX_Circuits_Name",
@ -199,11 +226,6 @@ namespace Entity_Framework.Migrations
column: "Email", column: "Email",
unique: true); unique: true);
migrationBuilder.CreateIndex(
name: "IX_Pilotes_IdEcurie",
table: "Pilotes",
column: "IdEcurie");
migrationBuilder.CreateIndex( migrationBuilder.CreateIndex(
name: "IX_Pilotes_Pseudo", name: "IX_Pilotes_Pseudo",
table: "Pilotes", table: "Pilotes",
@ -215,6 +237,16 @@ namespace Entity_Framework.Migrations
table: "Points", table: "Points",
column: "IdTours"); column: "IdTours");
migrationBuilder.CreateIndex(
name: "IX_RelationEcuriePilote_EcurieId",
table: "RelationEcuriePilote",
column: "EcurieId");
migrationBuilder.CreateIndex(
name: "IX_RelationEcuriePilote_PiloteId",
table: "RelationEcuriePilote",
column: "PiloteId");
migrationBuilder.CreateIndex( migrationBuilder.CreateIndex(
name: "IX_Sessions_IdCircuit", name: "IX_Sessions_IdCircuit",
table: "Sessions", table: "Sessions",
@ -229,32 +261,26 @@ namespace Entity_Framework.Migrations
name: "IX_Tours_IdSession", name: "IX_Tours_IdSession",
table: "Tours", table: "Tours",
column: "IdSession"); column: "IdSession");
migrationBuilder.AddForeignKey(
name: "FK_Ecuries_Pilotes_IdPiloteProprietaire",
table: "Ecuries",
column: "IdPiloteProprietaire",
principalTable: "Pilotes",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
} }
/// <inheritdoc /> /// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder) protected override void Down(MigrationBuilder migrationBuilder)
{ {
migrationBuilder.DropForeignKey(
name: "FK_Ecuries_Pilotes_IdPiloteProprietaire",
table: "Ecuries");
migrationBuilder.DropTable( migrationBuilder.DropTable(
name: "Images"); name: "Images");
migrationBuilder.DropTable( migrationBuilder.DropTable(
name: "Points"); name: "Points");
migrationBuilder.DropTable(
name: "RelationEcuriePilote");
migrationBuilder.DropTable( migrationBuilder.DropTable(
name: "Tours"); name: "Tours");
migrationBuilder.DropTable(
name: "Ecuries");
migrationBuilder.DropTable( migrationBuilder.DropTable(
name: "Sessions"); name: "Sessions");
@ -263,9 +289,6 @@ namespace Entity_Framework.Migrations
migrationBuilder.DropTable( migrationBuilder.DropTable(
name: "Pilotes"); name: "Pilotes");
migrationBuilder.DropTable(
name: "Ecuries");
} }
} }
} }

@ -0,0 +1,379 @@
// <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("20230322173202_test2")]
partial class test2
{
/// <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
}
}
}

@ -0,0 +1,22 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Entity_Framework.Migrations
{
/// <inheritdoc />
public partial class test2 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
}
}
}

@ -97,9 +97,6 @@ namespace Entity_Framework.Migrations
.IsRequired() .IsRequired()
.HasColumnType("TEXT"); .HasColumnType("TEXT");
b.Property<int?>("IdEcurie")
.HasColumnType("INTEGER");
b.Property<string>("Password") b.Property<string>("Password")
.IsRequired() .IsRequired()
.HasColumnType("TEXT"); .HasColumnType("TEXT");
@ -113,8 +110,6 @@ namespace Entity_Framework.Migrations
b.HasIndex("Email") b.HasIndex("Email")
.IsUnique(); .IsUnique();
b.HasIndex("IdEcurie");
b.HasIndex("Pseudo") b.HasIndex("Pseudo")
.IsUnique(); .IsUnique();
@ -179,6 +174,33 @@ namespace Entity_Framework.Migrations
b.ToTable("Points"); 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 => modelBuilder.Entity("Entity_Framework.Entity.Sessions", b =>
{ {
b.Property<long>("Id") b.Property<long>("Id")
@ -256,15 +278,6 @@ namespace Entity_Framework.Migrations
b.Navigation("Pilote"); b.Navigation("Pilote");
}); });
modelBuilder.Entity("Entity_Framework.Entity.Pilotes", b =>
{
b.HasOne("Entity_Framework.Entity.Ecuries", "Ecurie")
.WithMany("Pilotes")
.HasForeignKey("IdEcurie");
b.Navigation("Ecurie");
});
modelBuilder.Entity("Entity_Framework.Entity.Points", b => modelBuilder.Entity("Entity_Framework.Entity.Points", b =>
{ {
b.HasOne("Entity_Framework.Entity.Tours", "Tours") b.HasOne("Entity_Framework.Entity.Tours", "Tours")
@ -276,6 +289,25 @@ namespace Entity_Framework.Migrations
b.Navigation("Tours"); 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 => modelBuilder.Entity("Entity_Framework.Entity.Sessions", b =>
{ {
b.HasOne("Entity_Framework.Entity.Circuits", "Circuit") b.HasOne("Entity_Framework.Entity.Circuits", "Circuit")
@ -313,11 +345,13 @@ namespace Entity_Framework.Migrations
modelBuilder.Entity("Entity_Framework.Entity.Ecuries", b => modelBuilder.Entity("Entity_Framework.Entity.Ecuries", b =>
{ {
b.Navigation("Pilotes"); b.Navigation("PilotesRelation");
}); });
modelBuilder.Entity("Entity_Framework.Entity.Pilotes", b => modelBuilder.Entity("Entity_Framework.Entity.Pilotes", b =>
{ {
b.Navigation("Ecurie");
b.Navigation("EcuriePropriétaire") b.Navigation("EcuriePropriétaire")
.IsRequired(); .IsRequired();

Loading…
Cancel
Save