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.
OptifitWebService/Infrastructure/Migrations/20250207101932_TESTTraining...

248 lines
7.9 KiB

// <auto-generated />
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("20250207101932_TESTTrainingProgMig")]
partial class TESTTrainingProgMig
{
/// <inheritdoc />
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<string>("Id")
.HasColumnType("TEXT");
b.Property<int>("Category")
.HasColumnType("INTEGER");
b.Property<int>("NbReps")
.HasColumnType("INTEGER");
b.Property<int>("NbSets")
.HasColumnType("INTEGER");
b.Property<int>("RestingTime")
.HasColumnType("INTEGER");
b.Property<string>("SessionId")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("TemplateId")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("SessionId");
b.HasIndex("TemplateId");
b.ToTable("Exercices");
});
modelBuilder.Entity("Infrastructure.Entities.Exercice_template", b =>
{
b.Property<string>("Id")
.HasColumnType("TEXT");
b.Property<float>("Duration")
.HasColumnType("REAL");
b.Property<string>("Equipment")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("ImageId")
.HasColumnType("TEXT");
b.Property<string>("Instructions")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("VideoId")
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("Exercice_template");
});
modelBuilder.Entity("Infrastructure.Entities.Session", b =>
{
b.Property<string>("Id")
.HasColumnType("TEXT");
b.Property<int>("Day")
.HasColumnType("INTEGER");
b.Property<string>("Description")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("TEXT");
b.Property<int>("Target")
.HasColumnType("INTEGER");
b.Property<string>("TrainingProgramId")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("TrainingProgramId");
b.ToTable("Sessions");
});
modelBuilder.Entity("Infrastructure.Entities.TrainingProgram", b =>
{
b.Property<string>("Id")
.HasColumnType("TEXT");
b.Property<int>("Difficulty")
.HasColumnType("INTEGER");
b.Property<int>("Goal")
.HasColumnType("INTEGER");
b.Property<int>("Lang")
.HasColumnType("INTEGER");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("OwnerId")
.IsRequired()
.HasColumnType("TEXT");
b.Property<int>("WeekDuration")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.ToTable("Programs");
});
modelBuilder.Entity("Infrastructure.Entities.User", b =>
{
b.Property<string>("Id")
.HasColumnType("TEXT");
b.Property<int>("Age")
.HasColumnType("INTEGER");
b.Property<string>("EGoal")
.HasColumnType("TEXT");
b.Property<int>("EHealthProblem")
.HasColumnType("INTEGER");
b.Property<int?>("ESleepLevel")
.HasColumnType("INTEGER");
b.Property<int?>("ESport")
.HasColumnType("INTEGER");
b.Property<int?>("ESportLevel")
.HasColumnType("INTEGER");
b.Property<string>("HashPassword")
.IsRequired()
.HasColumnType("TEXT");
b.Property<float>("Height")
.HasColumnType("REAL");
b.Property<string>("Logo")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("TEXT");
b.Property<int>("NbSessionPerWeek")
.HasColumnType("INTEGER");
b.Property<string>("OAuthId")
.HasColumnType("TEXT");
b.Property<string>("OAuthProvider")
.HasColumnType("TEXT");
b.Property<bool>("Sexe")
.HasColumnType("INTEGER");
b.Property<float>("Weight")
.HasColumnType("REAL");
b.HasKey("Id");
b.ToTable("Users");
});
modelBuilder.Entity("Infrastructure.Entities.Exercice", b =>
{
b.HasOne("Infrastructure.Entities.Session", "Session")
.WithMany("Exercices")
.HasForeignKey("SessionId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("Infrastructure.Entities.Exercice_template", "Template")
.WithMany()
.HasForeignKey("TemplateId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Session");
b.Navigation("Template");
});
modelBuilder.Entity("Infrastructure.Entities.Session", b =>
{
b.HasOne("Infrastructure.Entities.TrainingProgram", "TrainingProgram")
.WithMany("Sessions")
.HasForeignKey("TrainingProgramId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("TrainingProgram");
});
modelBuilder.Entity("Infrastructure.Entities.Session", b =>
{
b.Navigation("Exercices");
});
modelBuilder.Entity("Infrastructure.Entities.TrainingProgram", b =>
{
b.Navigation("Sessions");
});
#pragma warning restore 612, 618
}
}
}