// 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(OptifitDbContext))] [Migration("20250109094119_TrainingProgram")] partial class TrainingProgram { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder.HasAnnotation("ProductVersion", "8.0.1"); modelBuilder.Entity("Infrastructure.Entities.Exercice", b => { b.Property("Id") .HasColumnType("TEXT"); b.Property("Description") .IsRequired() .HasColumnType("TEXT"); b.Property("Duration") .HasColumnType("REAL"); b.Property("Image") .IsRequired() .HasColumnType("TEXT"); b.Property("Name") .IsRequired() .HasColumnType("TEXT"); b.Property("NbRepetitions") .HasColumnType("INTEGER"); b.Property("NbSeries") .HasColumnType("INTEGER"); b.Property("SessionId") .HasColumnType("TEXT"); b.Property("Video") .IsRequired() .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("SessionId"); b.ToTable("Exercices"); }); modelBuilder.Entity("Infrastructure.Entities.Program", b => { b.Property("Id") .HasColumnType("TEXT"); b.Property("Description") .IsRequired() .HasColumnType("TEXT"); b.Property("Difficulty") .IsRequired() .HasColumnType("TEXT"); b.Property("Name") .IsRequired() .HasColumnType("TEXT"); b.Property("WeekDuration") .HasColumnType("INTEGER"); b.HasKey("Id"); b.ToTable("Programs"); }); modelBuilder.Entity("Infrastructure.Entities.Session", b => { b.Property("Id") .HasColumnType("TEXT"); b.Property("Description") .IsRequired() .HasColumnType("TEXT"); b.Property("Duration") .HasColumnType("REAL"); b.Property("Name") .IsRequired() .HasColumnType("TEXT"); b.Property("ProgramId") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("ProgramId"); b.ToTable("Sessions"); }); modelBuilder.Entity("Infrastructure.Entities.User", b => { b.Property("Id") .HasColumnType("TEXT"); b.Property("Age") .HasColumnType("INTEGER"); b.Property("EGoal") .HasColumnType("TEXT"); b.Property("ESleepLevel") .HasColumnType("TEXT"); b.Property("ESportLevel") .HasColumnType("TEXT"); b.Property("HashPassword") .IsRequired() .HasColumnType("TEXT"); b.Property("Height") .HasColumnType("REAL"); b.Property("Logo") .IsRequired() .HasColumnType("TEXT"); b.Property("Name") .IsRequired() .HasColumnType("TEXT"); b.Property("NbSessionPerWeek") .HasColumnType("INTEGER"); b.Property("OAuthId") .HasColumnType("TEXT"); b.Property("OAuthProvider") .HasColumnType("TEXT"); b.Property("Sexe") .HasColumnType("INTEGER"); b.Property("Weight") .HasColumnType("REAL"); b.HasKey("Id"); b.ToTable("Users"); }); modelBuilder.Entity("Infrastructure.Entities.Exercice", b => { b.HasOne("Infrastructure.Entities.Session", null) .WithMany("Exercices") .HasForeignKey("SessionId"); }); modelBuilder.Entity("Infrastructure.Entities.Session", b => { b.HasOne("Infrastructure.Entities.Program", null) .WithMany("Sessions") .HasForeignKey("ProgramId"); }); modelBuilder.Entity("Infrastructure.Entities.Program", b => { b.Navigation("Sessions"); }); modelBuilder.Entity("Infrastructure.Entities.Session", b => { b.Navigation("Exercices"); }); #pragma warning restore 612, 618 } } }