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.
676 lines
26 KiB
676 lines
26 KiB
// <auto-generated />
|
|
using System;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using StubbedContextLib;
|
|
|
|
#nullable disable
|
|
|
|
namespace StubbedContextLib.Migrations
|
|
{
|
|
[DbContext(typeof(TrainingStubbedContext))]
|
|
partial class TrainingStubbedContextModelSnapshot : ModelSnapshot
|
|
{
|
|
protected override void BuildModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder.HasAnnotation("ProductVersion", "8.0.2");
|
|
|
|
modelBuilder.Entity("Entities.ActivityEntity", b =>
|
|
{
|
|
b.Property<int>("IdActivity")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<float>("Average")
|
|
.HasColumnType("REAL");
|
|
|
|
b.Property<float>("AverageTemperature")
|
|
.HasColumnType("REAL");
|
|
|
|
b.Property<DateOnly>("Date")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<int>("EffortFelt")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<TimeOnly>("EndTime")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<bool>("HasAutoPause")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int>("Maximum")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int>("Minimum")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<float>("StandardDeviation")
|
|
.HasColumnType("REAL");
|
|
|
|
b.Property<TimeOnly>("StartTime")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Type")
|
|
.IsRequired()
|
|
.HasMaxLength(100)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<float>("Variability")
|
|
.HasColumnType("REAL");
|
|
|
|
b.Property<float>("Variance")
|
|
.HasColumnType("REAL");
|
|
|
|
b.HasKey("IdActivity");
|
|
|
|
b.ToTable("Activity");
|
|
|
|
b.HasData(
|
|
new
|
|
{
|
|
IdActivity = 1,
|
|
Average = 0.5f,
|
|
AverageTemperature = 20f,
|
|
Date = new DateOnly(2023, 1, 10),
|
|
EffortFelt = 5,
|
|
EndTime = new TimeOnly(14, 0, 22),
|
|
HasAutoPause = false,
|
|
Maximum = 0,
|
|
Minimum = 0,
|
|
StandardDeviation = 0.5f,
|
|
StartTime = new TimeOnly(13, 0, 34),
|
|
Type = "Running",
|
|
Variability = 0.5f,
|
|
Variance = 0.5f
|
|
},
|
|
new
|
|
{
|
|
IdActivity = 2,
|
|
Average = 0.5f,
|
|
AverageTemperature = 20f,
|
|
Date = new DateOnly(2023, 1, 25),
|
|
EffortFelt = 5,
|
|
EndTime = new TimeOnly(14, 0, 22),
|
|
HasAutoPause = false,
|
|
Maximum = 0,
|
|
Minimum = 0,
|
|
StandardDeviation = 0.5f,
|
|
StartTime = new TimeOnly(13, 4, 34),
|
|
Type = "Cycling",
|
|
Variability = 0.5f,
|
|
Variance = 0.5f
|
|
},
|
|
new
|
|
{
|
|
IdActivity = 3,
|
|
Average = 0.5f,
|
|
AverageTemperature = 20f,
|
|
Date = new DateOnly(2023, 12, 10),
|
|
EffortFelt = 5,
|
|
EndTime = new TimeOnly(15, 2, 22),
|
|
HasAutoPause = false,
|
|
Maximum = 0,
|
|
Minimum = 0,
|
|
StandardDeviation = 0.5f,
|
|
StartTime = new TimeOnly(13, 30, 34),
|
|
Type = "Swimming",
|
|
Variability = 0.5f,
|
|
Variance = 0.5f
|
|
},
|
|
new
|
|
{
|
|
IdActivity = 4,
|
|
Average = 0.5f,
|
|
AverageTemperature = 20f,
|
|
Date = new DateOnly(2024, 1, 2),
|
|
EffortFelt = 5,
|
|
EndTime = new TimeOnly(16, 1, 55),
|
|
HasAutoPause = false,
|
|
Maximum = 0,
|
|
Minimum = 0,
|
|
StandardDeviation = 0.5f,
|
|
StartTime = new TimeOnly(15, 0, 0),
|
|
Type = "Walking",
|
|
Variability = 0.5f,
|
|
Variance = 0.5f
|
|
},
|
|
new
|
|
{
|
|
IdActivity = 5,
|
|
Average = 0.5f,
|
|
AverageTemperature = 20f,
|
|
Date = new DateOnly(2024, 1, 12),
|
|
EffortFelt = 5,
|
|
EndTime = new TimeOnly(9, 0, 22),
|
|
HasAutoPause = false,
|
|
Maximum = 0,
|
|
Minimum = 0,
|
|
StandardDeviation = 0.5f,
|
|
StartTime = new TimeOnly(7, 45, 34),
|
|
Type = "Hiking",
|
|
Variability = 0.5f,
|
|
Variance = 0.5f
|
|
},
|
|
new
|
|
{
|
|
IdActivity = 6,
|
|
Average = 0.5f,
|
|
AverageTemperature = 20f,
|
|
Date = new DateOnly(2024, 1, 27),
|
|
EffortFelt = 5,
|
|
EndTime = new TimeOnly(14, 0, 22),
|
|
HasAutoPause = false,
|
|
Maximum = 0,
|
|
Minimum = 0,
|
|
StandardDeviation = 0.5f,
|
|
StartTime = new TimeOnly(13, 30, 1),
|
|
Type = "Climbing",
|
|
Variability = 0.5f,
|
|
Variance = 0.5f
|
|
},
|
|
new
|
|
{
|
|
IdActivity = 7,
|
|
Average = 0.5f,
|
|
AverageTemperature = 20f,
|
|
Date = new DateOnly(2024, 2, 22),
|
|
EffortFelt = 5,
|
|
EndTime = new TimeOnly(23, 50, 58),
|
|
HasAutoPause = false,
|
|
Maximum = 0,
|
|
Minimum = 0,
|
|
StandardDeviation = 0.5f,
|
|
StartTime = new TimeOnly(22, 0, 34),
|
|
Type = "Yoga",
|
|
Variability = 0.5f,
|
|
Variance = 0.5f
|
|
});
|
|
});
|
|
|
|
modelBuilder.Entity("Entities.AthleteEntity", b =>
|
|
{
|
|
b.Property<int>("IdAthlete")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<DateOnly>("DateOfBirth")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Email")
|
|
.IsRequired()
|
|
.HasMaxLength(100)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("FirstName")
|
|
.IsRequired()
|
|
.HasMaxLength(150)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<bool>("IsCoach")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("LastName")
|
|
.IsRequired()
|
|
.HasMaxLength(100)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<double>("Lenght")
|
|
.HasColumnType("REAL");
|
|
|
|
b.Property<string>("Password")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Sexe")
|
|
.IsRequired()
|
|
.HasMaxLength(1)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Username")
|
|
.IsRequired()
|
|
.HasMaxLength(100)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<float>("Weight")
|
|
.HasColumnType("REAL");
|
|
|
|
b.HasKey("IdAthlete");
|
|
|
|
b.ToTable("Athlete");
|
|
|
|
b.HasData(
|
|
new
|
|
{
|
|
IdAthlete = 1,
|
|
DateOfBirth = new DateOnly(1990, 1, 1),
|
|
Email = "john.doe@example.com",
|
|
FirstName = "John",
|
|
IsCoach = true,
|
|
LastName = "Doe",
|
|
Lenght = 1.8,
|
|
Password = "password123",
|
|
Sexe = "M",
|
|
Username = "Doe",
|
|
Weight = 75f
|
|
},
|
|
new
|
|
{
|
|
IdAthlete = 2,
|
|
DateOfBirth = new DateOnly(1995, 1, 1),
|
|
Email = "jane.smith@exemple.com",
|
|
FirstName = "Jane",
|
|
IsCoach = false,
|
|
LastName = "Smith",
|
|
Lenght = 1.6499999999999999,
|
|
Password = "secure456",
|
|
Sexe = "F",
|
|
Username = "Smith",
|
|
Weight = 60f
|
|
},
|
|
new
|
|
{
|
|
IdAthlete = 3,
|
|
DateOfBirth = new DateOnly(1992, 1, 1),
|
|
Email = "paul.martin@example.com",
|
|
FirstName = "Paul",
|
|
IsCoach = true,
|
|
LastName = "Martin",
|
|
Lenght = 1.75,
|
|
Password = "super789",
|
|
Sexe = "M",
|
|
Username = "Martin",
|
|
Weight = 68f
|
|
},
|
|
new
|
|
{
|
|
IdAthlete = 4,
|
|
DateOfBirth = new DateOnly(1993, 1, 1),
|
|
Email = "anna.brown@example.com",
|
|
FirstName = "Anna",
|
|
IsCoach = false,
|
|
LastName = "Brown",
|
|
Lenght = 1.7,
|
|
Password = "test000",
|
|
Sexe = "F",
|
|
Username = "Brown",
|
|
Weight = 58f
|
|
},
|
|
new
|
|
{
|
|
IdAthlete = 5,
|
|
DateOfBirth = new DateOnly(1991, 1, 1),
|
|
Email = "bruce.lee@example.com",
|
|
FirstName = "Bruce",
|
|
IsCoach = false,
|
|
LastName = "Lee",
|
|
Lenght = 2.0,
|
|
Password = "hello321",
|
|
Sexe = "M",
|
|
Username = "Lee",
|
|
Weight = 90f
|
|
});
|
|
});
|
|
|
|
modelBuilder.Entity("Entities.DataSourceEntity", b =>
|
|
{
|
|
b.Property<int>("IdSource")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Modele")
|
|
.IsRequired()
|
|
.HasMaxLength(100)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<float>("Precision")
|
|
.HasColumnType("REAL");
|
|
|
|
b.Property<string>("Type")
|
|
.IsRequired()
|
|
.HasMaxLength(100)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("IdSource");
|
|
|
|
b.ToTable("DataSource");
|
|
|
|
b.HasData(
|
|
new
|
|
{
|
|
IdSource = 1,
|
|
Modele = "Garmin",
|
|
Precision = 0.5f,
|
|
Type = "Smartwatch"
|
|
},
|
|
new
|
|
{
|
|
IdSource = 2,
|
|
Modele = "Polar",
|
|
Precision = 0.5f,
|
|
Type = "Smartwatch"
|
|
},
|
|
new
|
|
{
|
|
IdSource = 3,
|
|
Modele = "Suunto",
|
|
Precision = 0.5f,
|
|
Type = "Smartwatch"
|
|
},
|
|
new
|
|
{
|
|
IdSource = 4,
|
|
Modele = "Fitbit",
|
|
Precision = 0.5f,
|
|
Type = "Smartwatch"
|
|
},
|
|
new
|
|
{
|
|
IdSource = 5,
|
|
Modele = "Apple Watch",
|
|
Precision = 0.5f,
|
|
Type = "Smartwatch"
|
|
});
|
|
});
|
|
|
|
modelBuilder.Entity("Entities.HeartRateEntity", b =>
|
|
{
|
|
b.Property<int>("IdHeartRate")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<double>("Altitude")
|
|
.HasColumnType("REAL");
|
|
|
|
b.Property<int>("Bpm")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<float>("Latitude")
|
|
.HasColumnType("REAL");
|
|
|
|
b.Property<float>("Longitude")
|
|
.HasColumnType("REAL");
|
|
|
|
b.Property<float>("Temperature")
|
|
.HasColumnType("REAL");
|
|
|
|
b.Property<TimeOnly>("Time")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("IdHeartRate");
|
|
|
|
b.ToTable("HeartRate");
|
|
|
|
b.HasData(
|
|
new
|
|
{
|
|
IdHeartRate = 1,
|
|
Altitude = 0.0,
|
|
Bpm = 60,
|
|
Latitude = 66f,
|
|
Longitude = 35f,
|
|
Temperature = 20f,
|
|
Time = new TimeOnly(13, 0, 30)
|
|
},
|
|
new
|
|
{
|
|
IdHeartRate = 2,
|
|
Altitude = 10.0,
|
|
Bpm = 65,
|
|
Latitude = 67f,
|
|
Longitude = 35f,
|
|
Temperature = 20.5f,
|
|
Time = new TimeOnly(13, 0, 31)
|
|
},
|
|
new
|
|
{
|
|
IdHeartRate = 3,
|
|
Altitude = 11.0,
|
|
Bpm = 71,
|
|
Latitude = 66f,
|
|
Longitude = 36f,
|
|
Temperature = 20f,
|
|
Time = new TimeOnly(13, 0, 32)
|
|
},
|
|
new
|
|
{
|
|
IdHeartRate = 4,
|
|
Altitude = 12.0,
|
|
Bpm = 75,
|
|
Latitude = 67f,
|
|
Longitude = 36f,
|
|
Temperature = 20.5f,
|
|
Time = new TimeOnly(13, 0, 33)
|
|
},
|
|
new
|
|
{
|
|
IdHeartRate = 5,
|
|
Altitude = 13.0,
|
|
Bpm = 80,
|
|
Latitude = 66f,
|
|
Longitude = 37f,
|
|
Temperature = 20f,
|
|
Time = new TimeOnly(13, 0, 34)
|
|
});
|
|
});
|
|
|
|
modelBuilder.Entity("Entities.NotificationEntity", b =>
|
|
{
|
|
b.Property<int>("IdNotif")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<DateTime>("Date")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Message")
|
|
.IsRequired()
|
|
.HasMaxLength(100)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<bool>("Statut")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Urgence")
|
|
.IsRequired()
|
|
.HasMaxLength(100)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("IdNotif");
|
|
|
|
b.ToTable("Notification");
|
|
|
|
b.HasData(
|
|
new
|
|
{
|
|
IdNotif = 1,
|
|
Date = new DateTime(2023, 12, 25, 13, 0, 40, 0, DateTimeKind.Unspecified),
|
|
Message = "You have a new activity to check",
|
|
Statut = true,
|
|
Urgence = "A"
|
|
},
|
|
new
|
|
{
|
|
IdNotif = 2,
|
|
Date = new DateTime(2023, 12, 26, 13, 10, 40, 0, DateTimeKind.Unspecified),
|
|
Message = "You have a new athlete to check",
|
|
Statut = false,
|
|
Urgence = "3"
|
|
},
|
|
new
|
|
{
|
|
IdNotif = 3,
|
|
Date = new DateTime(2023, 12, 26, 16, 10, 4, 0, DateTimeKind.Unspecified),
|
|
Message = "You have a new heart rate to check",
|
|
Statut = true,
|
|
Urgence = "2"
|
|
},
|
|
new
|
|
{
|
|
IdNotif = 4,
|
|
Date = new DateTime(2024, 1, 12, 9, 30, 50, 0, DateTimeKind.Unspecified),
|
|
Message = "You have a new data source to check",
|
|
Statut = false,
|
|
Urgence = "1"
|
|
},
|
|
new
|
|
{
|
|
IdNotif = 5,
|
|
Date = new DateTime(2024, 2, 22, 12, 10, 0, 0, DateTimeKind.Unspecified),
|
|
Message = "You have a new notification to check",
|
|
Statut = true,
|
|
Urgence = "3"
|
|
});
|
|
});
|
|
|
|
modelBuilder.Entity("Entities.StatisticEntity", b =>
|
|
{
|
|
b.Property<int>("IdStatistic")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<double>("AverageCaloriesBurned")
|
|
.HasColumnType("REAL");
|
|
|
|
b.Property<double>("AverageHeartRate")
|
|
.HasColumnType("REAL");
|
|
|
|
b.Property<DateOnly>("Date")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<double>("MaximumHeartRate")
|
|
.HasColumnType("REAL");
|
|
|
|
b.Property<float>("Weight")
|
|
.HasColumnType("REAL");
|
|
|
|
b.HasKey("IdStatistic");
|
|
|
|
b.ToTable("Statistic");
|
|
|
|
b.HasData(
|
|
new
|
|
{
|
|
IdStatistic = 1,
|
|
AverageCaloriesBurned = 500.0,
|
|
AverageHeartRate = 120.0,
|
|
Date = new DateOnly(2021, 12, 12),
|
|
MaximumHeartRate = 180.0,
|
|
Weight = 75f
|
|
},
|
|
new
|
|
{
|
|
IdStatistic = 2,
|
|
AverageCaloriesBurned = 600.0,
|
|
AverageHeartRate = 130.0,
|
|
Date = new DateOnly(2021, 1, 11),
|
|
MaximumHeartRate = 190.0,
|
|
Weight = 60f
|
|
},
|
|
new
|
|
{
|
|
IdStatistic = 3,
|
|
AverageCaloriesBurned = 550.0,
|
|
AverageHeartRate = 125.0,
|
|
Date = new DateOnly(2022, 12, 30),
|
|
MaximumHeartRate = 185.0,
|
|
Weight = 68f
|
|
},
|
|
new
|
|
{
|
|
IdStatistic = 4,
|
|
AverageCaloriesBurned = 650.0,
|
|
AverageHeartRate = 135.0,
|
|
Date = new DateOnly(2023, 2, 20),
|
|
MaximumHeartRate = 195.0,
|
|
Weight = 58f
|
|
},
|
|
new
|
|
{
|
|
IdStatistic = 5,
|
|
AverageCaloriesBurned = 450.0,
|
|
AverageHeartRate = 110.0,
|
|
Date = new DateOnly(2024, 1, 10),
|
|
MaximumHeartRate = 170.0,
|
|
Weight = 90f
|
|
});
|
|
});
|
|
|
|
modelBuilder.Entity("Entities.TrainingEntity", b =>
|
|
{
|
|
b.Property<int>("IdTraining")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<DateOnly>("Date")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Description")
|
|
.HasMaxLength(300)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("FeedBack")
|
|
.HasMaxLength(300)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<float>("Latitude")
|
|
.HasColumnType("REAL");
|
|
|
|
b.Property<float>("Longitude")
|
|
.HasColumnType("REAL");
|
|
|
|
b.HasKey("IdTraining");
|
|
|
|
b.ToTable("Training");
|
|
|
|
b.HasData(
|
|
new
|
|
{
|
|
IdTraining = 1,
|
|
Date = new DateOnly(2024, 1, 19),
|
|
Description = "Running",
|
|
FeedBack = "Good",
|
|
Latitude = 48.8566f,
|
|
Longitude = 2.3522f
|
|
},
|
|
new
|
|
{
|
|
IdTraining = 2,
|
|
Date = new DateOnly(2024, 2, 20),
|
|
Description = "Cycling",
|
|
Latitude = 48.8566f,
|
|
Longitude = 2.3522f
|
|
},
|
|
new
|
|
{
|
|
IdTraining = 3,
|
|
Date = new DateOnly(2024, 2, 21),
|
|
FeedBack = "Good",
|
|
Latitude = 48.8566f,
|
|
Longitude = 2.3522f
|
|
},
|
|
new
|
|
{
|
|
IdTraining = 4,
|
|
Date = new DateOnly(2024, 2, 22),
|
|
Description = "Running",
|
|
FeedBack = "Good",
|
|
Latitude = 48.8566f,
|
|
Longitude = 2.3522f
|
|
},
|
|
new
|
|
{
|
|
IdTraining = 5,
|
|
Date = new DateOnly(2024, 2, 23),
|
|
Description = "Cycling",
|
|
Latitude = 48.8566f,
|
|
Longitude = 2.3522f
|
|
});
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|