//
using System;
using Infrastructure;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace Infrastructure.Migrations
{
[DbContext(typeof(AlumniDbContext))]
[Migration("20240328220800_migV1")]
partial class migV1
{
///
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "8.0.1");
modelBuilder.Entity("AlumniEntityEventEntity", b =>
{
b.Property("EventsId")
.HasColumnType("TEXT");
b.Property("ParticipantsId")
.HasColumnType("TEXT");
b.HasKey("EventsId", "ParticipantsId");
b.HasIndex("ParticipantsId");
b.ToTable("AlumniEntityEventEntity");
});
modelBuilder.Entity("Infrastructure.Entities.AlumniEntity", b =>
{
b.Property("Id")
.HasColumnType("TEXT");
b.Property("Email")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property("EntryYear")
.IsRequired()
.HasColumnType("TEXT");
b.Property("FirstName")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("TEXT");
b.Property("Github")
.HasColumnType("TEXT");
b.Property("LastName")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property("Linkedin")
.HasColumnType("TEXT");
b.Property("Password")
.IsRequired()
.HasColumnType("TEXT");
b.Property("Role")
.IsRequired()
.HasColumnType("TEXT");
b.Property("WebSite")
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("Alumni");
});
modelBuilder.Entity("Infrastructure.Entities.EventEntity", b =>
{
b.Property("Id")
.HasColumnType("TEXT");
b.Property("Date")
.HasColumnType("TEXT");
b.Property("Description")
.IsRequired()
.HasMaxLength(512)
.HasColumnType("TEXT");
b.Property("Title")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("nbPlaces")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.ToTable("Events");
});
modelBuilder.Entity("Infrastructure.Entities.ExperienceEntity", b =>
{
b.Property("Id")
.HasColumnType("TEXT");
b.Property("AlumniId")
.HasColumnType("TEXT");
b.Property("CompanyName")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property("EndDate")
.HasColumnType("TEXT");
b.Property("IsCurrent")
.HasColumnType("INTEGER");
b.Property("StartDate")
.HasColumnType("TEXT");
b.Property("Title")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("AlumniId");
b.ToTable("Experiences");
});
modelBuilder.Entity("Infrastructure.Entities.FormationEntity", b =>
{
b.Property("Id")
.HasColumnType("TEXT");
b.Property("AlumniId")
.HasColumnType("TEXT");
b.Property("EndDate")
.HasColumnType("TEXT");
b.Property("IsCurrent")
.HasColumnType("INTEGER");
b.Property("Name")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property("SchoolName")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property("StartDate")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("AlumniId");
b.ToTable("Formations");
});
modelBuilder.Entity("AlumniEntityEventEntity", b =>
{
b.HasOne("Infrastructure.Entities.EventEntity", null)
.WithMany()
.HasForeignKey("EventsId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("Infrastructure.Entities.AlumniEntity", null)
.WithMany()
.HasForeignKey("ParticipantsId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Infrastructure.Entities.ExperienceEntity", b =>
{
b.HasOne("Infrastructure.Entities.AlumniEntity", "Alumni")
.WithMany("Experiences")
.HasForeignKey("AlumniId");
b.Navigation("Alumni");
});
modelBuilder.Entity("Infrastructure.Entities.FormationEntity", b =>
{
b.HasOne("Infrastructure.Entities.AlumniEntity", "Alumni")
.WithMany("Formations")
.HasForeignKey("AlumniId");
b.Navigation("Alumni");
});
modelBuilder.Entity("Infrastructure.Entities.AlumniEntity", b =>
{
b.Navigation("Experiences");
b.Navigation("Formations");
});
#pragma warning restore 612, 618
}
}
}