diff --git a/.drone.yml b/.drone.yml
index 51019cc..9367339 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -3,9 +3,6 @@ type: docker
name: HeartTrack-API
trigger:
- branch:
- - WORK-CD
- - WORK-EF_WebAPI
event:
- push
@@ -18,6 +15,14 @@ steps:
- dotnet build HeartTrack.sln -c Release --no-restore
- dotnet publish HeartTrack.sln -c Release --no-restore -o CI_PROJECT_DIR/build/release
+ - name: tests
+ image: mcr.microsoft.com/dotnet/sdk:8.0
+ commands:
+ - cd src/
+ - dotnet restore HeartTrack.sln
+ - dotnet test HeartTrack.sln --no-restore
+ depends_on: [build]
+
- name: code-analysis
image: hub.codefirst.iut.uca.fr/marc.chevaldonne/codefirst-dronesonarplugin-dotnet8
secrets: [ SECRET_SONAR_LOGIN ]
@@ -36,8 +41,55 @@ steps:
- reportgenerator -reports:"**/coverage.cobertura.xml" -reporttypes:SonarQube -targetdir:"coveragereport"
- dotnet publish HeartTrack.sln -c Release --no-restore -o $CI_PROJECT_DIR/build/release
- dotnet sonarscanner end /d:sonar.login=$${PLUGIN_SONAR_TOKEN}
- depends_on: [ build ]
+ depends_on: [ tests ]
+ - name: swagger
+ image: mcr.microsoft.com/dotnet/sdk:8.0
+ failure: ignore
+ volumes:
+ - name: docs
+ path: /docs
+ environment:
+ CODEFIRST_CLIENTDRONE_ENV_DOTNET_ROLL_FORWARD: LatestMajor
+ CODEFIRST_CLIENTDRONE_ENV_DOTNET_ROLL_FORWARD_TO_PRERELEASE: 1
+ commands:
+ - cd src/
+ - dotnet restore HeartTrack.sln
+ - cd HeartTrackAPI
+ - dotnet new tool-manifest
+ - dotnet tool install -g --version 6.5.0 Swashbuckle.AspNetCore.Cli
+ - cd ../
+ - dotnet build HeartTrack.sln -c Release --no-restore
+ - dotnet publish HeartTrack.sln -c Release --no-restore -o CI_PROJECT_DIR/build/release
+ - export PATH="$PATH:/root/.dotnet/tools"
+ - swagger tofile --output /docs/swagger.json HeartTrackAPI/bin/Release/net8.0/HeartTrackAPI.dll v1
+ depends_on: [build,tests]
+
+ - name: generate-and-deploy-docs
+ image: hub.codefirst.iut.uca.fr/maxime.batista/codefirst-docdeployer
+ failure: ignore
+ commands:
+ - /entrypoint.sh -l docs/doxygen -t doxygen
+ when:
+ event:
+ - push
+ depends_on: [ build ]
+
+volumes:
+- name: docs
+ temp: {}
+
+---
+
+kind: pipeline
+type: docker
+name: HeartTrack-API-CD
+
+trigger:
+ event:
+ - push
+steps:
+
- name: docker-build-and-push
image: plugins/docker
settings:
@@ -49,25 +101,67 @@ steps:
from_secret: SECRET_REGISTRY_USERNAME
password:
from_secret: SECRET_REGISTRY_PASSWORD
- depends_on: [ build ]
+
+ # database container stub
+ - name: deploy-container-stub
+ image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest
+ environment:
+ CODEFIRST_CLIENTDRONE_ENV_TYPE: STUB
+ IMAGENAME: hub.codefirst.iut.uca.fr/david.d_almeida/api:latest
+ CONTAINERNAME: heart_stub
+ COMMAND: create
+ OVERWRITE: true
+ depends_on: [ docker-build-and-push ]
+
+ # - name: deploy-container
+ # image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest
+ # environment:
+ # IMAGENAME: hub.codefirst.iut.uca.fr/david.d_almeida/api:latest
+ # CONTAINERNAME: heart_api
+ # CODEFIRST_CLIENTDRONE_ENV_TYPE: API
+ # CODEFIRST_CLIENTDRONE_ENV_PORT: 8080
+ # ADMINS: davidd_almeida,kevinmonteiro,antoineperederii,paullevrault,antoinepinagot,nicolas.raymond
+ # COMMAND: create
+ # OVERWRITE: true
+ # depends_on: [ docker-build-and-push, deploy-container-stub ]
+
+
- - name: deploy-container
+ # database container deployment
+ - name: deploy-container-mysql
image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest
environment:
+ IMAGENAME: mariadb:10
+ CONTAINERNAME: mysql
+ COMMAND: create
+ # OVERWRITE: false
+ PRIVATE: true
+ CODEFIRST_CLIENTDRONE_ENV_MARIADB_ROOT_PASSWORD:
+ from_secret: db_root_password
+ CODEFIRST_CLIENTDRONE_ENV_MARIADB_DATABASE:
+ from_secret: db_database
+ CODEFIRST_CLIENTDRONE_ENV_MARIADB_USER:
+ from_secret: db_user
+ CODEFIRST_CLIENTDRONE_ENV_MARIADB_PASSWORD:
+ from_secret: db_password
+
+ # database container bdd
+ - name: deploy-container-bdd
+ image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest
+ environment:
+ CODEFIRST_CLIENTDRONE_ENV_TYPE: BDD
+ CODEFIRST_CLIENTDRONE_ENV_HOST: dadalmeida-mysql
+ CODEFIRST_CLIENTDRONE_ENV_PORTDB: 3306
+ CODEFIRST_CLIENTDRONE_ENV_DATABASE:
+ from_secret: db_database
+ CODEFIRST_CLIENTDRONE_ENV_USERNAME:
+ from_secret: db_user
+ CODEFIRST_CLIENTDRONE_ENV_PASSWORD:
+ from_secret: db_password
IMAGENAME: hub.codefirst.iut.uca.fr/david.d_almeida/api:latest
CONTAINERNAME: api
CODEFIRST_CLIENTDRONE_ENV_PORT: 8080
ADMINS: davidd_almeida,kevinmonteiro,antoineperederii,paullevrault,antoinepinagot,nicolas.raymond
COMMAND: create
OVERWRITE: true
- depends_on: [ docker-build-and-push ]
-
- - name: generate-and-deploy-docs
- image: hub.codefirst.iut.uca.fr/maxime.batista/codefirst-docdeployer
- failure: ignore
- commands:
- - /entrypoint.sh -l docs/doxygen -t doxygen
- when:
- event:
- - push
- depends_on: [ build ]
\ No newline at end of file
+ depends_on: [deploy-container-mysql, docker-build-and-push, deploy-container-stub]
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index a7bcc21..70b6c0a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -565,4 +565,7 @@ xcuserdata/
/dataSources.local.xml
.ideaMigration/
Migration/
+Migrations/
+
+
*.db
\ No newline at end of file
diff --git a/src/APIMappers/APIMappers.csproj b/src/APIMappers/APIMappers.csproj
new file mode 100644
index 0000000..3bb04a5
--- /dev/null
+++ b/src/APIMappers/APIMappers.csproj
@@ -0,0 +1,14 @@
+
+
+
+ net8.0
+ enable
+ enable
+
+
+
+
+
+
+
+
diff --git a/src/APIMappers/ActivityMapper.cs b/src/APIMappers/ActivityMapper.cs
new file mode 100644
index 0000000..6013e57
--- /dev/null
+++ b/src/APIMappers/ActivityMapper.cs
@@ -0,0 +1,53 @@
+using Dto;
+using Model;
+using Shared;
+
+namespace APIMappers;
+
+public static class ActivityMapper
+{
+ private static GenericMapper _mapper = new GenericMapper();
+
+ public static ActivityDto ToDto(this Activity activity)
+ {
+ return activity.ToU(_mapper, activityDto => new ActivityDto
+ {
+ Id = activity.Id,
+ Type = activity.Type,
+ Date = activity.Date,
+ StartTime = activity.StartTime,
+ EndTime = activity.EndTime,
+ EffortFelt = activity.Effort,
+ Variability = activity.Variability,
+ Variance = activity.Variance,
+ StandardDeviation = activity.StandardDeviation,
+ Average = activity.Average,
+ Maximum = activity.Maximum,
+ Minimum = activity.Minimum,
+ AverageTemperature = activity.AverageTemperature,
+ HasAutoPause = activity.HasAutoPause
+ });
+ }
+
+ public static Activity ToModel(this ActivityDto activityDto)
+ {
+ return activityDto.ToT(_mapper, activity => new Activity
+ {
+ Id = activityDto.Id,
+ Type = activityDto.Type,
+ Date = activityDto.Date,
+ StartTime = activityDto.StartTime,
+ EndTime = activityDto.EndTime,
+ Effort = activityDto.EffortFelt,
+ Variability = activityDto.Variability,
+ Variance = activityDto.Variance,
+ StandardDeviation = activityDto.StandardDeviation,
+ Average = activityDto.Average,
+ Maximum = activityDto.Maximum,
+ Minimum = activityDto.Minimum,
+ AverageTemperature = activityDto.AverageTemperature,
+ HasAutoPause = activityDto.HasAutoPause
+ });
+ }
+
+}
\ No newline at end of file
diff --git a/src/APIMappers/UserMappeur.cs b/src/APIMappers/UserMappeur.cs
new file mode 100644
index 0000000..96d1375
--- /dev/null
+++ b/src/APIMappers/UserMappeur.cs
@@ -0,0 +1,54 @@
+using Dto;
+using Model;
+using Shared;
+
+namespace APIMappers;
+
+public static class UserMappeur
+{
+ private static GenericMapper _mapper = new GenericMapper();
+
+ public static UserDto ToDto(this User user)
+ {
+ return user.ToU(_mapper, userDto => new UserDto
+ {
+ Id = user.Id,
+ Username = user.Username,
+ ProfilePicture = user.ProfilePicture,
+ LastName = user.LastName,
+ FirstName = user.FirstName,
+ Email = user.Email,
+ Password = user.MotDePasse,
+ Sexe = user.Sexe,
+ Lenght = user.Lenght,
+ Weight = user.Weight,
+ DateOfBirth = user.DateOfBirth,
+ IsCoach = user.Role is Coach
+ });
+ // ), (activity, entity) => activity.Id = entity.IdActivity);
+
+ }
+ // ochestrateur => api gateway
+ // corégraphie => microservice TCP
+
+
+ public static User ToModel(this UserDto userDto)
+ {
+ return userDto.ToT(_mapper, user => new User
+ {
+ Username = userDto.Username,
+ ProfilePicture = userDto.ProfilePicture,
+ LastName = userDto.LastName,
+ FirstName = userDto.FirstName,
+ Email = userDto.Email,
+ MotDePasse = userDto.Password,
+ Sexe = userDto.Sexe,
+ Lenght = userDto.Lenght,
+ Weight = userDto.Weight,
+ DateOfBirth = userDto.DateOfBirth,
+ Role = userDto.IsCoach ? new Coach() : new Athlete()
+
+ });
+ }
+
+}
\ No newline at end of file
diff --git a/src/DbContextLib/DbContextLib.csproj b/src/DbContextLib/DbContextLib.csproj
index a2d1b08..cd47dbc 100644
--- a/src/DbContextLib/DbContextLib.csproj
+++ b/src/DbContextLib/DbContextLib.csproj
@@ -10,6 +10,7 @@
+
diff --git a/src/DbContextLib/HeartTrackContext.cs b/src/DbContextLib/HeartTrackContext.cs
index 5dbb584..1ce7564 100644
--- a/src/DbContextLib/HeartTrackContext.cs
+++ b/src/DbContextLib/HeartTrackContext.cs
@@ -55,13 +55,31 @@ namespace DbContextLib
///
/// Initializes a new instance of the class.
///
- public HeartTrackContext() : base() { }
+ public HeartTrackContext() : base()
+ { }
///
/// Initializes a new instance of the class with the specified options.
///
/// The options for the context.
- public HeartTrackContext(DbContextOptions options) : base(options) { }
+ public HeartTrackContext(DbContextOptions options) : base(options)
+ { }
+
+ public HeartTrackContext(string dbPlatformPath)
+ : this(InitPlaformDb(dbPlatformPath))
+ {
+ }
+
+ private static DbContextOptions InitPlaformDb(string dbPlatformPath)
+ {
+ var options = new DbContextOptionsBuilder()
+ .UseMySql($"{dbPlatformPath}", new MySqlServerVersion(new Version(10, 11, 1)))
+ .Options;
+ return options;
+ }
+
+
+
///
/// Configures the database options if they are not already configured.
diff --git a/src/Dto/ActivityDto.cs b/src/Dto/ActivityDto.cs
index d4bf5f1..b2a0a91 100644
--- a/src/Dto/ActivityDto.cs
+++ b/src/Dto/ActivityDto.cs
@@ -3,17 +3,17 @@ namespace Dto;
public class ActivityDto
{
public int Id { get; set; }
- public string Name { get; set; }
public string Type { get; set; }
public DateTime Date { get; set; }
- public TimeSpan Duration { get; set; }
- public float Distance { get; set; }
- public float Elevation { get; set; }
- public float AverageSpeed { get; set; }
- public int AverageHeartRate { get; set; }
- public int Calories { get; set; }
- public string Description { get; set; }
- public string? Gpx { get; set; }
- public string? Image { get; set; }
- public int AthleteId { get; set; }
+ public DateTime StartTime { get; set; }
+ public DateTime EndTime { get; set; }
+ public int EffortFelt { get; set; }
+ public float Variability { get; set; }
+ public float Variance { get; set; }
+ public float StandardDeviation { get; set; }
+ public float Average { get; set; }
+ public int Maximum { get; set; }
+ public int Minimum { get; set; }
+ public float AverageTemperature { get; set; }
+ public bool HasAutoPause { get; set; }
}
\ No newline at end of file
diff --git a/src/Entities/AthleteEntity.cs b/src/Entities/AthleteEntity.cs
index e37379a..6d6f351 100644
--- a/src/Entities/AthleteEntity.cs
+++ b/src/Entities/AthleteEntity.cs
@@ -8,7 +8,6 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
-using Microsoft.AspNetCore.Identity;
namespace Entities
{
@@ -16,7 +15,7 @@ namespace Entities
/// Represents an athlete entity in the database.
///
[Table("Athlete")]
- public class AthleteEntity : IdentityUser
+ public class AthleteEntity
{
public AthleteEntity() : base() { }
@@ -32,35 +31,35 @@ namespace Entities
///
[MaxLength(100)]
[Required(ErrorMessage = "Athlete Username is ")]
- public string Username { get; set; }
+ public required string Username { get; set; }
///
/// Gets or sets the last name of the athlete.
///
[MaxLength(100)]
[Required(ErrorMessage = "Athlete Last Name is ")]
- public string LastName { get; set; }
+ public required string LastName { get; set; }
///
/// Gets or sets the first name of the athlete.
///
[MaxLength(150)]
[Required(ErrorMessage = "Athlete First Name is ")]
- public string FirstName { get; set; }
+ public required string FirstName { get; set; }
///
/// Gets or sets the email of the athlete.
///
[MaxLength(100)]
[Required(ErrorMessage = "Athlete Email is ")]
- public string Email { get; set; }
+ public required string Email { get; set; }
///
/// Gets or sets the gender of the athlete.
///
[MaxLength(1)]
[Required(ErrorMessage = "Athlete Sexe is ")]
- public string Sexe { get; set; }
+ public required string Sexe { get; set; }
///
/// Gets or sets the height of the athlete.
@@ -76,7 +75,7 @@ namespace Entities
/// Gets or sets the password of the athlete.
///
[Required(ErrorMessage = "Athlete Password is ")]
- public string Password { get; set; }
+ public required string Password { get; set; }
///
/// Gets or sets the date of birth of the athlete.
@@ -90,7 +89,7 @@ namespace Entities
///
public bool IsCoach { get; set; }
- public byte[] ProfilPicture { get; set; }
+ public byte[]? ProfilPicture { get; set; }
diff --git a/src/Entities/Entities.csproj b/src/Entities/Entities.csproj
index e37f82e..b007a4d 100644
--- a/src/Entities/Entities.csproj
+++ b/src/Entities/Entities.csproj
@@ -5,11 +5,4 @@
enable
enable
-
-
-
- ..\..\..\..\..\.nuget\packages\microsoft.extensions.identity.stores\8.0.2\lib\net8.0\Microsoft.Extensions.Identity.Stores.dll
-
-
-
diff --git a/src/HeartTrack.sln b/src/HeartTrack.sln
index 57167ac..6b62741 100644
--- a/src/HeartTrack.sln
+++ b/src/HeartTrack.sln
@@ -25,8 +25,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "TestsAPI", "TestsAPI", "{30
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClientTests", "Tests\TestsAPI\ClientTests\ClientTests.csproj", "{9E4D3AC5-E6CA-4753-BD96-BF5EE793931A}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestsXUnit", "Tests\TestsAPI\TestsXUnit\TestsXUnit.csproj", "{44C367DC-5FE0-4CF2-9E76-A0282E931853}"
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Model", "Model\Model.csproj", "{30AB7FAA-6072-40B6-A15E-9188B59144F9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTestApi", "Tests\TestsAPI\UnitTestApi\UnitTestApi.csproj", "{E515C8B6-6282-4D8B-8523-7B3A13E4AF58}"
@@ -41,6 +39,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleTestEFMapper", "Test
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EFMappers", "EFMappers\EFMappers.csproj", "{9397795D-F482-44C4-8443-A20AC26671AA}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "APIMappers", "APIMappers\APIMappers.csproj", "{41D18203-1688-43BD-A3AC-FD0C2BD81909}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -86,10 +86,6 @@ Global
{9E4D3AC5-E6CA-4753-BD96-BF5EE793931A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9E4D3AC5-E6CA-4753-BD96-BF5EE793931A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9E4D3AC5-E6CA-4753-BD96-BF5EE793931A}.Release|Any CPU.Build.0 = Release|Any CPU
- {44C367DC-5FE0-4CF2-9E76-A0282E931853}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {44C367DC-5FE0-4CF2-9E76-A0282E931853}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {44C367DC-5FE0-4CF2-9E76-A0282E931853}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {44C367DC-5FE0-4CF2-9E76-A0282E931853}.Release|Any CPU.Build.0 = Release|Any CPU
{30AB7FAA-6072-40B6-A15E-9188B59144F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{30AB7FAA-6072-40B6-A15E-9188B59144F9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{30AB7FAA-6072-40B6-A15E-9188B59144F9}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -134,13 +130,16 @@ Global
{9397795D-F482-44C4-8443-A20AC26671AA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9397795D-F482-44C4-8443-A20AC26671AA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9397795D-F482-44C4-8443-A20AC26671AA}.Release|Any CPU.Build.0 = Release|Any CPU
+ {41D18203-1688-43BD-A3AC-FD0C2BD81909}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {41D18203-1688-43BD-A3AC-FD0C2BD81909}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {41D18203-1688-43BD-A3AC-FD0C2BD81909}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {41D18203-1688-43BD-A3AC-FD0C2BD81909}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{477D2129-A6C9-4FF8-8BE9-5E9E8E5282F8} = {2B227C67-3BEC-4A83-BDA0-F3918FBC0D18}
{2D166FAD-4934-474B-96A8-6C0635156EC2} = {2B227C67-3BEC-4A83-BDA0-F3918FBC0D18}
{30FC2BE9-7397-445A-84AD-043CE70F4281} = {2B227C67-3BEC-4A83-BDA0-F3918FBC0D18}
{9E4D3AC5-E6CA-4753-BD96-BF5EE793931A} = {30FC2BE9-7397-445A-84AD-043CE70F4281}
- {44C367DC-5FE0-4CF2-9E76-A0282E931853} = {30FC2BE9-7397-445A-84AD-043CE70F4281}
{E515C8B6-6282-4D8B-8523-7B3A13E4AF58} = {30FC2BE9-7397-445A-84AD-043CE70F4281}
{31FA8E5E-D642-4C43-A2B2-02B9832B2CEC} = {2B227C67-3BEC-4A83-BDA0-F3918FBC0D18}
{73EA27F2-9F0C-443F-A5EE-2960C983A422} = {2B227C67-3BEC-4A83-BDA0-F3918FBC0D18}
diff --git a/src/HeartTrackAPI/AppBootstrap.cs b/src/HeartTrackAPI/AppBootstrap.cs
index 1e1b452..c910166 100644
--- a/src/HeartTrackAPI/AppBootstrap.cs
+++ b/src/HeartTrackAPI/AppBootstrap.cs
@@ -1,19 +1,21 @@
+using System.Reflection;
+using DbContextLib;
using DbContextLib.Identity;
using Entities;
+using HeartTrackAPI.Utils;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Identity.UI.Services;
using Microsoft.AspNetCore.Mvc.ApiExplorer;
using Microsoft.AspNetCore.Mvc.Versioning;
+using Microsoft.Data.Sqlite;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Options;
using Microsoft.OpenApi.Models;
using Model.Manager;
-using Model.Service;
-
+using Model2Entities;
using StubAPI;
using Swashbuckle.AspNetCore.SwaggerGen;
-
namespace HeartTrackAPI;
public class AppBootstrap(IConfiguration configuration)
@@ -24,16 +26,14 @@ public class AppBootstrap(IConfiguration configuration)
{
services.AddControllers();
services.AddEndpointsApiExplorer();
- //services.AddTransient, ConfigureSwaggerOption>();
+ AddSwagger(services);
// include Xml comment
// addsecurityRequiment
// securityDef
- services.AddSwaggerGen();
AddHeartTrackContextServices(services);
AddModelService(services);
AddIdentityServices(services);
AddApiVersioning(services);
- AddSwagger(services);
services.AddHealthChecks();
@@ -41,23 +41,58 @@ public class AppBootstrap(IConfiguration configuration)
private void AddHeartTrackContextServices(IServiceCollection services)
{
- var connectionString = Configuration.GetConnectionString("HeartTrackAuthConnection");
- if (string.IsNullOrWhiteSpace(connectionString))
- {
- throw new InvalidOperationException("The connection string for the database is not set.");
- }
- else
+ string connectionString;
+
+ switch (Environment.GetEnvironmentVariable("TYPE"))
{
- services.AddDbContext(options => options.UseInMemoryDatabase("AuthDb"));
-// builder.Services.AddDbContext(options => options.UseSqlite(connectionString));
- services.AddSingleton();
+ case "BDD":
+ var HOST = System.Environment.GetEnvironmentVariable("HOST");
+ var PORT = System.Environment.GetEnvironmentVariable("PORTDB");
+ var DATABASE = System.Environment.GetEnvironmentVariable("DATABASE");
+ var USERNAME = System.Environment.GetEnvironmentVariable("USERNAME");
+ var PASSWORD = System.Environment.GetEnvironmentVariable("PASSWORD");
+
+ connectionString = $"server={HOST};port={PORT};database={DATABASE};user={USERNAME};password={PASSWORD}";
+ Console.WriteLine(connectionString);
+ Console.WriteLine("======================");
+ Console.WriteLine(connectionString);
+
+ services.AddSingleton(provider => new DbDataManager(connectionString));
+
+ break;
+ default:
+ connectionString = Configuration.GetConnectionString("HeartTrackAuthConnection");
+ if (string.IsNullOrWhiteSpace(connectionString))
+ {
+ services.AddDbContext(options => options.UseInMemoryDatabase("AuthDb"));
+ //options => options.UseSqlite(connectionString)
+ //services.AddDbContext();
+ services.AddDbContext(options =>
+ options.UseSqlite(connectionString), ServiceLifetime.Singleton);
+ }
+ break;
+
}
-
+
+/*
+ services.AddSingleton>(provider =>
+ {
+ var connection = new SqliteConnection("DataSource=:memory:");
+ connection.Open();
+
+ var options = new DbContextOptionsBuilder()
+ .UseSqlite(connection)
+ .Options;
+
+ return options;
+ });*/
}
+
private void AddModelService(IServiceCollection services)
{
+ //services.AddSingleton(provider => new DbDataManager(provider.GetService()));
services.AddSingleton();
- services.AddTransient();
+ //services.AddTransient();
}
private void AddIdentityServices(IServiceCollection services)
@@ -90,25 +125,66 @@ public class AppBootstrap(IConfiguration configuration)
private void AddSwagger(IServiceCollection services)
{
services.AddSwaggerGen(options =>
+ {
+ options.OperationFilter();
+
+ var xmlFile = $"{Assembly.GetExecutingAssembly().GetName().Name}.xml";
+ var xmlPath = Path.Combine(AppContext.BaseDirectory, xmlFile);
+ options.IncludeXmlComments(xmlPath);
+
+ options.AddSecurityDefinition("Bearer", new OpenApiSecurityScheme
+ {
+ Description =
+ "JWT Authorization header using the Bearer scheme. Example: \"Authorization: Bearer {token}\"",
+ Name = "Authorization",
+ In = ParameterLocation.Header,
+ Type = SecuritySchemeType.ApiKey
+ });
+ var scheme = new OpenApiSecurityRequirement
+ {
+ {
+ new OpenApiSecurityScheme
+ {
+ Reference = new OpenApiReference
+ {
+ Type = ReferenceType.SecurityScheme,
+ Id = "Bearer"
+ },
+ Scheme = "oauth2",
+ Name = "Bearer",
+ In = ParameterLocation.Header,
+ },
+ new List()
+ }
+ };
+ options.AddSecurityRequirement(scheme);
+ });
+ services.AddTransient, SwaggerOptions>();
+ services.AddSwaggerGen(options =>
+ {
+ options.OperationFilter();
+ });
+ /* services.AddSwaggerGen(options =>
{
options.SwaggerDoc("v1", new OpenApiInfo { Title = "HeartTrackAPI", Version = "v1" });
options.SwaggerDoc("v2", new OpenApiInfo { Title = "HeartTrackAPI", Version = "v2" });
- });
+ });*/
services.AddVersionedApiExplorer(setup =>
{
setup.GroupNameFormat = "'v'VVV";
setup.SubstituteApiVersionInUrl = true;
});
+
}
public void Configure(WebApplication app, IWebHostEnvironment env)
{
app.UseHttpsRedirection();
+ app.MapIdentityApi();
app.MapControllers();
app.UseAuthorization();
- app.MapIdentityApi();
app.MapHealthChecks("/health");
diff --git a/src/HeartTrackAPI/Controllers/ActivityController.cs b/src/HeartTrackAPI/Controllers/ActivityController.cs
index 81ee0d4..d20e167 100644
--- a/src/HeartTrackAPI/Controllers/ActivityController.cs
+++ b/src/HeartTrackAPI/Controllers/ActivityController.cs
@@ -1,24 +1,25 @@
+using APIMappers;
using Dto;
using HeartTrackAPI.Request;
using HeartTrackAPI.Responce;
using Microsoft.AspNetCore.Mvc;
-using Shared;
using Model;
+using Shared;
using Model.Manager;
using Model.Repository;
namespace HeartTrackAPI.Controllers;
[ApiController]
-[Route("api/activities")]
+[ApiVersion("1.0")]
+[Route("api/v{version:apiVersion}/[controller]")]
public class ActivityController : Controller
{
private readonly IActivityRepository _activityService;
private readonly ILogger _logger;
- private readonly IActivityManager _activityManager;
- public ActivityController(IActivityRepository activityService, ILogger logger)
+ public ActivityController(IDataManager dataManager, ILogger logger)
{
- _activityService = activityService;
+ _activityService = dataManager.ActivityRepo;
_logger = logger;
}
@@ -38,9 +39,12 @@ public class ActivityController : Controller
}
_logger.LogInformation("Executing {Action} with parameters: {Parameters}", nameof(GetActivities), pageRequest);
var activities = await _activityService.GetActivities(pageRequest.Index, pageRequest.Count, ActivityOrderCriteria.None, pageRequest.Descending ?? false);
- // var pageResponse = new PageResponse(pageRequest.Index, pageRequest.Count, totalCount, activities.Select(a => a.ToDto()));
- // return Ok(pageResponse);
- return Ok();
+ if(activities == null)
+ {
+ return NotFound("No activities found");
+ }
+ var pageResponse = new PageResponse(pageRequest.Index, pageRequest.Count, totalCount, activities.Select(a => a.ToDto()));
+ return Ok(pageResponse);
}
catch (Exception e)
{
@@ -49,21 +53,63 @@ public class ActivityController : Controller
}
}
/*
- public async Task PostFitFile([FromForm] IFormFile file)
+ [HttpPost]
+ [ProducesResponseType(StatusCodes.Status201Created)]
+ [ProducesResponseType(StatusCodes.Status415UnsupportedMediaType)]
+ [MultipartFormData]
+ [DisableFormValueModelBinding]
+ public async Task PostFitFile( Stream file, string contentType) // [FromForm]
{
+ if (!MultipartRequestHelper.IsMultipartContentType(Request.ContentType))
+ {
+ ModelState.AddModelError("File",
+ $"The request couldn't be processed (Error 1).");
+ // Log error
+
+ return BadRequest(ModelState);
+ }
if (file == null)
{
return BadRequest("No file was provided");
}
- var activity = await _activityManager.AddActivityFromFitFile(file);
+ //var fileUploadSummary = await _fileService.UploadFileAsync(HttpContext.Request.Body, Request.ContentType);
+// var activity = await _activityManager.AddActivityFromFitFile(file);
+ var activity = new Activity
+ {
+ Id = 1,
+ Type = "Running",
+ Date = new DateTime(2021, 10, 10),
+ StartTime = new DateTime(2021, 10, 10, 10, 0, 0),
+ EndTime = new DateTime(2021, 10, 10, 11, 0, 0),
+ Effort = 3,
+ Variability = 0.5f,
+ Variance = 0.5f,
+ StandardDeviation = 0.5f,
+ Average = 5.0f,
+ Maximum = 10,
+ Minimum = 0,
+ AverageTemperature = 20.0f,
+ HasAutoPause = false,
+ Users =
+ {
+ new User
+ {
+ Id = 3, Username = "Athlete3",
+ ProfilePicture =
+ "https://plus.unsplash.com/premium_photo-1705091981693-6006f8a20479?q=80&w=1974&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
+ FirstName = "First3", LastName = "Last3",
+ Sexe = "M", Lenght = 190, Weight = 80, DateOfBirth = new DateTime(1994, 3, 3), Email = "ath@ex.fr",
+ Role = new Athlete()
+ }
+ }
+ };
if (activity == null)
{
return BadRequest("The file provided is not a valid fit file");
}
- return CreatedAtAction(nameof(GetActivities), activity.ToDto());
+ return CreatedAtAction(nameof(GetActivity), new { id = activity.Id }, activity.ToDto());
}*/
-/*
[HttpGet("{id}")]
public async Task> GetActivity(int id)
{
@@ -75,18 +121,6 @@ public class ActivityController : Controller
return Ok(activity.ToDto());
}
- [HttpPost]
- public async Task> PostActivity(ActivityDto activityDto)
- {
- var activity = activityDto.ToModel();
- var result = await _activityService.AddActivity(activity);
- if (result == null)
- {
- return BadRequest();
- }
- return CreatedAtAction(nameof(GetActivity), new { id = result.Id }, result.ToDto());
- }
-
[HttpPut("{id}")]
public async Task PutActivity(int id, ActivityDto activityDto)
{
@@ -112,5 +146,35 @@ public class ActivityController : Controller
return NotFound();
}
return NoContent();
+ }
+
+/*
+ public async Task UploadFileAsync(Stream fileStream, string contentType)
+ {
+ var fileCount = 0;
+ long totalSizeInBytes = 0;
+ var boundary = GetBoundary(MediaTypeHeaderValue.Parse(contentType));
+ var multipartReader = new MultipartReader(boundary, fileStream);
+ var section = await multipartReader.ReadNextSectionAsync();
+ var filePaths = new List();
+ var notUploadedFiles = new List();
+
+ while (section != null)
+ {
+ var fileSection = section.AsFileSection();
+ if (fileSection != null)
+ {
+ totalSizeInBytes += await SaveFileAsync(fileSection, filePaths, notUploadedFiles);
+ fileCount++;
+ }
+ section = await multipartReader.ReadNextSectionAsync();
+ }
+ return new FileUploadSummary
+ {
+ TotalFilesUploaded = fileCount,
+ TotalSizeUploaded = ConvertSizeToString(totalSizeInBytes),
+ FilePaths = filePaths,
+ NotUploadedFiles = notUploadedFiles
+ };
}*/
}
\ No newline at end of file
diff --git a/src/HeartTrackAPI/Controllers/UsersController.cs b/src/HeartTrackAPI/Controllers/UsersController.cs
index 435a56b..69d2bc9 100644
--- a/src/HeartTrackAPI/Controllers/UsersController.cs
+++ b/src/HeartTrackAPI/Controllers/UsersController.cs
@@ -1,30 +1,42 @@
+using System.ComponentModel.DataAnnotations;
+using APIMappers;
using Dto;
-using Entities;
using HeartTrackAPI.Request;
using HeartTrackAPI.Responce;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
-using Model;
using Model.Manager;
using Model.Repository;
using Shared;
namespace HeartTrackAPI.Controllers;
-
+///
+/// Contrôle les actions liées aux utilisateurs dans l'application HeartTrack.
+/// Gère les opérations CRUD sur les utilisateurs, leurs amis, et leurs activités.
+///
[ApiController]
[ApiVersion("1.0")]
-[Route("api/v{version:apiVersion}/users")]
+[Route("api/v{version:apiVersion}/[controller]")]
public class UsersController : Controller
{
private readonly ILogger _logger;
+ private readonly IActivityRepository _activityService;
private readonly IUserRepository _userService;
- // private readonly
public UsersController(ILogger logger, IDataManager dataManager)
{
_logger = logger;
_userService = dataManager.UserRepo;
+ _activityService = dataManager.ActivityRepo;
}
-
+
+ ///
+ /// Récupère une page d'utilisateurs en fonction des critères de pagination et de tri fournis.
+ ///
+ /// Les critères de pagination et de tri pour les utilisateurs.
+ /// Une page de données utilisateur selon les critères spécifiés.
+ /// Retourne la page demandée d'utilisateurs.
+ /// La demande de pagination est invalide.
+ /// Erreur interne du serveur.
[HttpGet]
[ProducesResponseType(typeof(PageResponse), 200)]
[ProducesResponseType(400)]
@@ -43,22 +55,29 @@ public class UsersController : Controller
_logger.LogInformation("Executing {Action} with parameters: {Parameters}", nameof(Get), null);
var athletes = await _userService.GetUsers(request.Index, request.Count, Enum.TryParse(request.OrderingPropertyName, out AthleteOrderCriteria result) ? result : AthleteOrderCriteria.None, request.Descending ?? false);
- // var pageResponse = new PageResponse(request.Index, request.Count, totalCount, athletes.Select(a => a.ToDto()));
- // return Ok(pageResponse);
- return Ok();
+ var pageResponse = new PageResponse(request.Index, request.Count, totalCount, athletes!.Select(a => a.ToDto()));
+ return Ok(pageResponse);
}
catch (Exception e)
{
_logger.LogError(e, "Error while getting all athletes");
- return StatusCode(500);
+ return Problem();
}
}
+ ///
+ /// Récupère un utilisateur spécifique par son identifiant.
+ ///
+ /// L'identifiant de l'utilisateur à récupérer.
+ /// L'utilisateur correspondant à l'identifiant spécifié.
+ /// Retourne l'utilisateur demandé.
+ /// Aucun utilisateur trouvé pour l'identifiant spécifié.
+ /// Erreur interne du serveur.
[HttpGet("{id}")]
[ProducesResponseType(typeof(UserDto), 200)]
[ProducesResponseType(404)]
[ProducesResponseType(500)]
- public async Task> GetById(int id)
+ public async Task> GetById([Range(0,int.MaxValue)]int id)
{
try
{
@@ -69,17 +88,21 @@ public class UsersController : Controller
_logger.LogError("Athlete with id {id} not found", id);
return NotFound($"Athlete with id {id} not found");
}
- // return Ok(athlete.ToDto());
- return Ok();
+ return Ok(athlete.ToDto());
}
catch (Exception e)
{
_logger.LogError(e, "Error while getting athlete by id {id}", id);
- return StatusCode(500);
+ return Problem();
}
}
-
+ ///
+ /// Obtient le nombre total d'utilisateurs.
+ ///
+ /// Le nombre total d'utilisateurs.
+ /// Retourne le nombre total d'utilisateurs.
+ /// Erreur interne du serveur.
[HttpGet("count")]
[ProducesResponseType(typeof(int), 200)]
[ProducesResponseType(500)]
@@ -94,10 +117,19 @@ public class UsersController : Controller
catch (Exception e)
{
_logger.LogError(e, "Error while getting the number of users");
- return StatusCode(500);
+ return Problem();
}
}
+ ///
+ /// Met à jour les informations d'un utilisateur spécifique.
+ ///
+ /// L'identifiant de l'utilisateur à mettre à jour.
+ /// Les données de l'utilisateur pour la mise à jour.
+ /// L'utilisateur mis à jour.
+ /// Retourne l'utilisateur mis à jour.
+ /// Utilisateur non trouvé.
+ /// Erreur interne du serveur.
[HttpPut("{id}")]
[ProducesResponseType(typeof(UserDto), 200)]
[ProducesResponseType(404)]
@@ -113,23 +145,30 @@ public class UsersController : Controller
_logger.LogError("Athlete with id {id} not found", id);
return NotFound($"Athlete with id {id} not found");
}
- // var updatedAthlete = await _userService.UpdateItem(id, user.ToModel());
- // if(updatedAthlete == null)
- // {
- // _logger.LogError("Error while updating athlete with id {id}", id);
- // return StatusCode(500);
- // }
- // return Ok(updatedAthlete.ToDto());
- return Ok();
+ var updatedAthlete = await _userService.UpdateItem(id, user.ToModel());
+ if(updatedAthlete == null)
+ {
+ _logger.LogError("Error while updating athlete with id {id}", id);
+ return Problem();
+ }
+ return Ok(updatedAthlete.ToDto());
}
catch (Exception e)
{
_logger.LogError(e, "Error while getting the number of users");
- return StatusCode(500);
+ return Problem();
}
}
+ ///
+ /// Supprime un utilisateur spécifique.
+ ///
+ /// L'identifiant de l'utilisateur à supprimer.
+ /// Action result.
+ /// Utilisateur supprimé avec succès.
+ /// Utilisateur non trouvé.
+ /// Erreur interne du serveur.
[HttpDelete("{id}")]
[ProducesResponseType(200)]
[ProducesResponseType(404)]
@@ -151,18 +190,68 @@ public class UsersController : Controller
if(!isDeleted)
{
_logger.LogError("Error while deleting athlete with id {id}", id);
- return StatusCode(500);
+ return Problem();
}
return Ok();
}
catch (Exception e)
{
_logger.LogError(e, "Error while getting the number of users");
- return StatusCode(500);
+ return Problem();
}
}
+ ///
+ /// Obtient la liste des amis d'un utilisateur spécifique.
+ ///
+ /// L'identifiant de l'utilisateur.
+ /// Les critères de pagination et de tri.
+ /// La liste paginée des amis.
+ /// Retourne la liste paginée des amis de l'utilisateur.
+ /// Utilisateur non trouvé.
+ /// Erreur interne du serveur.
+ [HttpGet("{id}/friends")]
+ [ProducesResponseType(typeof(PageResponse), 200)]
+ [ProducesResponseType(404)]
+ [ProducesResponseType(500)]
+ public async Task>> GetFriends(int id, [FromQuery] PageRequest request)
+ {
+ try
+ {
+ _logger.LogInformation("Executing {Action} with parameters: {Parameters} for {Id}", nameof(GetFriends), null,id);
+ var athlete = await _userService.GetItemById(id);
+ if (athlete == null)
+ {
+ _logger.LogError("Athlete with id {id} not found", id);
+ return NotFound($"Athlete with id {id} not found");
+ }
+ var totalCount = await _userService.GetNbFriends(athlete);
+ if (request.Count * request.Index >= totalCount)
+ {
+ _logger.LogError("To many object is asked the max is {totalCount} but the request is superior of ", totalCount);
+ return BadRequest("To many object is asked the max is : " + totalCount);
+ }
+ var friends = await _userService.GetFriends(athlete, request.Index, request.Count, Enum.TryParse(request.OrderingPropertyName, out AthleteOrderCriteria result) ? result : AthleteOrderCriteria.None, request.Descending ?? false);
+ if (friends == null) return NotFound();
+ var pageResponse = new PageResponse(request.Index, request.Count, totalCount, friends.Select(a => a.ToDto()));
+ return Ok(pageResponse);
+ }
+ catch (Exception e)
+ {
+ _logger.LogError(e, "Error while getting the number of users");
+ return Problem();
+ }
+ }
+ ///
+ /// Ajoute un ami à un utilisateur spécifique.
+ ///
+ /// L'identifiant de l'utilisateur.
+ /// L'identifiant de l'ami à ajouter.
+ /// Action result.
+ /// Ami ajouté avec succès.
+ /// Utilisateur ou ami non trouvé.
+ /// Erreur interne du serveur.
[HttpPost("{id}/friend/{friendId}")]
[ProducesResponseType(200)]
[ProducesResponseType(404)]
@@ -188,17 +277,160 @@ public class UsersController : Controller
if(!isAdded)
{
_logger.LogError("Error while adding friend with id {friendId} to athlete with id {id}", friendId, id);
- return StatusCode(500);
+ return Problem();
}
return Ok();
}
catch (Exception e)
{
_logger.LogError(e, "Error while getting the number of users");
- return StatusCode(500);
+ return Problem();
}
}
+
+ ///
+ /// Supprime un ami d'un utilisateur spécifique.
+ ///
+ /// L'identifiant de l'utilisateur.
+ /// L'identifiant de l'ami à supprimer.
+ /// Action result.
+ /// Ami supprimé avec succès.
+ /// Utilisateur ou ami non trouvé.
+ /// Erreur interne du serveur.
+ [HttpDelete("{id}/friend/{friendId}")]
+ [ProducesResponseType(200)]
+ [ProducesResponseType(404)]
+ [ProducesResponseType(500)]
+ public async Task RemoveFriend(int id, int friendId)
+ {
+ try
+ {
+ _logger.LogInformation("Executing {Action} with parameters: {Parameters} for {Id}", nameof(RemoveFriend), friendId,id);
+ var athlete = await _userService.GetItemById(id);
+ if (athlete == null)
+ {
+ _logger.LogError("Athlete with id {id} not found", id);
+ return NotFound($"Athlete with id {id} not found");
+ }
+ var friend = await _userService.GetItemById(friendId);
+ if (friend == null)
+ {
+ _logger.LogError("Athlete with id {id} not found", friendId);
+ return NotFound($"Athlete with id {friendId} not found");
+ }
+ var isRemoved = await _userService.RemoveFriend(athlete, friend);
+ if(!isRemoved)
+ {
+ _logger.LogError("Error while removing friend with id {friendId} to athlete with id {id}", friendId, id);
+ return Problem();
+ }
+ return Ok();
+ }
+ catch (Exception e)
+ {
+ _logger.LogError(e, "Error while getting the number of users");
+ return Problem();
+ }
+ }
+
+
+ // #[TODO] [Dave] ou faire un get qui si le role est coach resend les athletes et si le role est athlete resend les coach
+ ///
+ /// Obtient la liste des athlètes d'un coach spécifique.
+ ///
+ /// L'identifiant du coach.
+ /// Les critères de pagination et de tri.
+ /// La liste paginée des athlètes.
+ /// Retourne la liste paginée des athlètes du coach.
+ /// Coach non trouvé.
+ /// Erreur interne du serveur.
+ [HttpGet("{coachId}/athletes")]
+ [ProducesResponseType(typeof(PageResponse), 200)]
+ [ProducesResponseType(404)]
+ [ProducesResponseType(500)]
+ public async Task>> GetAthletes(int coachId, [FromQuery] PageRequest request)
+ {
+ try
+ {
+ _logger.LogInformation("Executing {Action} with parameters: {Parameters} for {Id}", nameof(GetAthletes), null,coachId);
+ var coach = await _userService.GetItemById(coachId);
+ if (coach == null)
+ {
+ _logger.LogError("Athlete with id {id} not found", coachId);
+ return NotFound($"Athlete with id {coachId} not found");
+ }
+ var totalCount = await _userService.GetNbFriends(coach);
+ if (request.Count * request.Index >= totalCount)
+ {
+ _logger.LogError("To many object is asked the max is {totalCount} but the request is superior of ", totalCount);
+ return BadRequest("To many object is asked the max is : " + totalCount);
+ }
+ var athletes = await _userService.GetFriends(coach, request.Index, request.Count, Enum.TryParse(request.OrderingPropertyName, out AthleteOrderCriteria result) ? result : AthleteOrderCriteria.None, request.Descending ?? false);
+ if (athletes == null) return NotFound();
+ var pageResponse = new PageResponse(request.Index, request.Count, totalCount, athletes.Select(a => a.ToDto()));
+ return Ok(pageResponse);
+ }
+ catch (Exception e)
+ {
+ _logger.LogError(e, "Error while getting the number of users");
+ return Problem();
+ }
+ }
+
+ ///
+ /// Obtient la liste des activités d'un utilisateur spécifique.
+ ///
+ /// L'identifiant de l'utilisateur.
+ /// Les critères de pagination et de tri.
+ /// La liste paginée des activités de l'utilisateur.
+ /// Retourne la liste paginée des activités.
+ /// Aucune activité trouvée.
+ /// Erreur interne du serveur.
+ [HttpGet("{userId}/activities")]
+ // should be tiny DTOActivity returned with only the necessary information (will be used in the list of activities of a user)
+ public async Task>> GetActivitiesByUser(int userId, [FromQuery] PageRequest pageRequest)
+ {
+ try
+ {
+ var totalCount = await _activityService.GetNbActivitiesByUser(userId);
+ if (pageRequest.Count * pageRequest.Index >= totalCount)
+ {
+ _logger.LogError("To many object is asked the max is {totalCount} but the request is superior of ", totalCount);
+ return BadRequest("To many object is asked the max is : " + totalCount);
+ }
+ _logger.LogInformation("Executing {Action} with parameters: {Parameters}", nameof(GetActivitiesByUser), pageRequest);
+ var activities = await _activityService.GetActivitiesByUser(userId, pageRequest.Index, pageRequest.Count, ActivityOrderCriteria.None, pageRequest.Descending ?? false);
+ if(activities == null)
+ {
+ return NotFound("No activities found");
+ }
+ var pageResponse = new PageResponse(pageRequest.Index, pageRequest.Count, totalCount, activities.Select(a => a.ToDto()));
+ return Ok(pageResponse);
+ }
+ catch (Exception e)
+ {
+ _logger.LogError(e, "Error while getting all activities");
+ return Problem();
+ }
+ }
+ /* [TODO] [Dave]
+ [HttpGet("{userId}/trainings")]
+ [ProducesResponseType(typeof(PageResponse), 200)]
+ [ProducesResponseType(404)]
+ [ProducesResponseType(500)]
+ public async Task> GetTrainings(int userId, [FromQuery] PageRequest request)
+ */
+
+ ///
+ /// Déconnecte l'utilisateur actuel.
+ ///
+ /// Le gestionnaire de connexion.
+ /// Paramètre vide utilisé pour s'assurer que la requête provient bien d'un client.
+ /// Action result.
+ /// Déconnexion réussie.
+ /// Déconnexion non autorisée.
+ /// Erreur interne du serveur.
[HttpPost("logout")]
[ProducesResponseType(200)]
[ProducesResponseType(401)]
diff --git a/src/HeartTrackAPI/Dockerfile b/src/HeartTrackAPI/Dockerfile
index c8f3264..88c9d79 100644
--- a/src/HeartTrackAPI/Dockerfile
+++ b/src/HeartTrackAPI/Dockerfile
@@ -12,15 +12,27 @@ COPY ["StubbedContextLib/StubbedContextLib.csproj", "StubbedContextLib/"]
COPY ["Shared/Shared.csproj", "Shared/"]
COPY ["Entities/Entities.csproj", "Entities/"]
COPY ["Dto/Dto.csproj", "Dto/"]
-COPY ["ApiMappeur/ApiMappeur.csproj", "ApiMappeur/"]
+COPY ["APIMappers/APIMappers.csproj", "APIMappers/"]
+COPY ["EFMappers/EFMappers.csproj", "EFMappers/"]
COPY ["DbContextLib/DbContextLib.csproj", "DbContextLib/"]
COPY ["Model/Model.csproj", "Model/"]
COPY ["Model2Entities/Model2Entities.csproj", "Model2Entities/"]
COPY ["StubAPI/StubAPI.csproj", "StubAPI/"]
COPY ["StubbedContextLib/StubbedContextLib.csproj", "StubbedContextLib/"]
-
RUN dotnet restore "HeartTrackAPI/HeartTrackAPI.csproj"
COPY . .
+RUN echo $DOTNET_ROOT
+RUN echo SHOULDDOTNET_ROOT
+
+RUN ls
+RUN dotnet tool install --global dotnet-ef --version 8.0
+
+ENV PATH="${PATH}:/root/.dotnet/tools"
+# Add the migrations
+RUN dotnet ef migrations add --project StubbedContextLib/ --startup-project HeartTrackAPI/ --context StubbedContextLib.TrainingStubbedContext --configuration Debug Initial --output-dir Migrations
+# Update the database
+RUN dotnet ef database update --project StubbedContextLib/ --startup-project HeartTrackAPI/ --context StubbedContextLib.TrainingStubbedContext --configuration Debug
+
WORKDIR "/src/HeartTrackAPI"
RUN ls
RUN dotnet build "HeartTrackAPI.csproj" -c $BUILD_CONFIGURATION -o /app/build
diff --git a/src/HeartTrackAPI/FileUploadSummary.cs b/src/HeartTrackAPI/FileUploadSummary.cs
new file mode 100644
index 0000000..1721ae7
--- /dev/null
+++ b/src/HeartTrackAPI/FileUploadSummary.cs
@@ -0,0 +1,44 @@
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.AspNetCore.Mvc.Filters;
+using Microsoft.AspNetCore.Mvc.ModelBinding;
+
+namespace HeartTrackAPI;
+
+public class FileUploadSummary
+{
+ public int TotalFilesUploaded { get; set; }
+ public string TotalSizeUploaded { get; set; }
+ public IList FilePaths { get; set; } = new List();
+ public IList NotUploadedFiles { get; set; } = new List();
+}
+[AttributeUsage(AttributeTargets.Method | AttributeTargets.Class)]
+public class MultipartFormDataAttribute : ActionFilterAttribute
+{
+ public override void OnActionExecuting(ActionExecutingContext context)
+ {
+ var request = context.HttpContext.Request;
+
+ if (request.HasFormContentType
+ && request.ContentType.StartsWith("multipart/form-data", StringComparison.OrdinalIgnoreCase))
+ {
+ return;
+ }
+
+ context.Result = new StatusCodeResult(StatusCodes.Status415UnsupportedMediaType);
+ }
+}
+[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)]
+public class DisableFormValueModelBindingAttribute : Attribute, IResourceFilter
+{
+ public void OnResourceExecuting(ResourceExecutingContext context)
+ {
+ var factories = context.ValueProviderFactories;
+ factories.RemoveType();
+ factories.RemoveType();
+ factories.RemoveType();
+ }
+
+ public void OnResourceExecuted(ResourceExecutedContext context)
+ {
+ }
+}
\ No newline at end of file
diff --git a/src/HeartTrackAPI/HeartTrackAPI.csproj b/src/HeartTrackAPI/HeartTrackAPI.csproj
index 6252aa2..d8fac4c 100644
--- a/src/HeartTrackAPI/HeartTrackAPI.csproj
+++ b/src/HeartTrackAPI/HeartTrackAPI.csproj
@@ -5,6 +5,8 @@
enable
enable
true
+ true
+ $(NoWarn);1591
@@ -12,23 +14,22 @@
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
-
+
+
-
-
-
- ..\..\..\..\..\.nuget\packages\newtonsoft.json\13.0.1\lib\netstandard2.0\Newtonsoft.Json.dll
-
-
-
+
diff --git a/src/HeartTrackAPI/HeartTrackAPI.http b/src/HeartTrackAPI/HeartTrackAPI.http
deleted file mode 100644
index 97c9a67..0000000
--- a/src/HeartTrackAPI/HeartTrackAPI.http
+++ /dev/null
@@ -1,6 +0,0 @@
-@HeartTrackAPI_HostAddress = http://localhost:5030
-
-GET {{HeartTrackAPI_HostAddress}}/weatherforecast/
-Accept: application/json
-
-###
diff --git a/src/HeartTrackAPI/Program.cs b/src/HeartTrackAPI/Program.cs
index c79cc12..04e64af 100644
--- a/src/HeartTrackAPI/Program.cs
+++ b/src/HeartTrackAPI/Program.cs
@@ -1,16 +1,13 @@
using DbContextLib;
-using DbContextLib.Identity;
-using Entities;
using HeartTrackAPI;
-using Microsoft.AspNetCore.Identity;
-using Microsoft.AspNetCore.Mvc.Versioning;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.OpenApi.Models;
-using Model.Manager;
-using StubAPI;
+
var builder = WebApplication.CreateBuilder(args);
builder.Logging.AddConsole();
+builder.WebHost.ConfigureKestrel(serverOptions =>
+{
+ serverOptions.Limits.MaxRequestBodySize = long.MaxValue;
+});
var init = new AppBootstrap(builder.Configuration);
@@ -19,5 +16,7 @@ init.ConfigureServices(builder.Services);
var app = builder.Build();
init.Configure(app, app.Environment);
-// app?.Services?.GetService()?.Database.EnsureCreated();
+
+app.Services.GetService()!.Database.EnsureCreated();
+
app.Run();
\ No newline at end of file
diff --git a/src/HeartTrackAPI/Request/PageRequest.cs b/src/HeartTrackAPI/Request/PageRequest.cs
index 9fad40d..0c93406 100644
--- a/src/HeartTrackAPI/Request/PageRequest.cs
+++ b/src/HeartTrackAPI/Request/PageRequest.cs
@@ -1,10 +1,16 @@
+using System.ComponentModel.DataAnnotations;
+using Microsoft.AspNetCore.Mvc.ModelBinding;
+
namespace HeartTrackAPI.Request;
public class PageRequest
{
-
- public string? OrderingPropertyName { get; set; } = null;// need to be map on the dto OrderCriteria
+ public string? OrderingPropertyName { get; set; } = null;
public bool? Descending { get; set; } = false;
+
+ [Range(1, int.MaxValue, ErrorMessage = "Count must be greater than 0")]
public int Index { get; set; } = 0;
- public int Count { get; set; } = 5;
+
+ [Range(1, int.MaxValue, ErrorMessage = "Count must be greater than 0")]
+ public int Count { get; set; } = 1;
}
diff --git a/src/HeartTrackAPI/Utils/SwaggerDefaultValues.cs b/src/HeartTrackAPI/Utils/SwaggerDefaultValues.cs
new file mode 100644
index 0000000..dd8671c
--- /dev/null
+++ b/src/HeartTrackAPI/Utils/SwaggerDefaultValues.cs
@@ -0,0 +1,53 @@
+using System.Text.Json;
+using Microsoft.AspNetCore.Mvc.ApiExplorer;
+using Microsoft.AspNetCore.Mvc.ModelBinding;
+using Microsoft.OpenApi.Models;
+using Swashbuckle.AspNetCore.SwaggerGen;
+
+namespace HeartTrackAPI.Utils;
+
+public class SwaggerDefaultValues : IOperationFilter
+{
+ public void Apply(OpenApiOperation operation, OperationFilterContext context)
+ {
+ var apiDescription = context.ApiDescription;
+ operation.Deprecated |= apiDescription.IsDeprecated();
+
+ foreach (var responseType in context.ApiDescription.SupportedResponseTypes)
+ {
+ var responseKey = responseType.IsDefaultResponse ? "default" : responseType.StatusCode.ToString();
+ var response = operation.Responses[responseKey];
+
+ foreach (var contentType in response.Content.Keys)
+ {
+ if (responseType.ApiResponseFormats.All(x => x.MediaType != contentType))
+ {
+ response.Content.Remove(contentType);
+ }
+ }
+ }
+
+ if (operation.Parameters == null)
+ {
+ return;
+ }
+
+ foreach (var parameter in operation.Parameters)
+ {
+ var description = apiDescription.ParameterDescriptions.First(p => p.Name == parameter.Name);
+
+ parameter.Description ??= description.ModelMetadata?.Description;
+
+ if (parameter.Schema.Default == null &&
+ description.DefaultValue != null &&
+ description.DefaultValue is not DBNull &&
+ description.ModelMetadata is ModelMetadata modelMetadata)
+ {
+ var json = JsonSerializer.Serialize(description.DefaultValue, modelMetadata.ModelType);
+ parameter.Schema.Default = OpenApiAnyFactory.CreateFromJson(json);
+ }
+
+ parameter.Required |= description.IsRequired;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/HeartTrackAPI/Utils/SwaggerOptions.cs b/src/HeartTrackAPI/Utils/SwaggerOptions.cs
index 7754a52..02c92d8 100644
--- a/src/HeartTrackAPI/Utils/SwaggerOptions.cs
+++ b/src/HeartTrackAPI/Utils/SwaggerOptions.cs
@@ -35,7 +35,7 @@ public class SwaggerOptions: IConfigureNamedOptions
///
///
///
- public void Configure(string name, SwaggerGenOptions options)
+ public void Configure(string? name, SwaggerGenOptions options)
{
Configure(options);
}
@@ -50,8 +50,12 @@ public class SwaggerOptions: IConfigureNamedOptions
{
var info = new OpenApiInfo()
{
- Title = ".NET Core (.NET 6) Web API For Lol",
- Version = desc.ApiVersion.ToString()
+ Title = "Web API For HeartTrack .NET 8",
+ Version = desc.ApiVersion.ToString(),
+ Description = "The HeartTrack project API, aims to provide an Open Source solution for heart rate data analysis.",
+ Contact = new OpenApiContact { Name = "HeartTrackDev", Email = "toto@toto.fr" },
+ License = new OpenApiLicense { Name = "MIT", Url = new Uri("https://opensource.org/licenses/MIT") }
+
};
if (desc.IsDeprecated)
diff --git a/src/HeartTrackAPI/appsettings.Development.json b/src/HeartTrackAPI/appsettings.Development.json
index ff66ba6..c603414 100644
--- a/src/HeartTrackAPI/appsettings.Development.json
+++ b/src/HeartTrackAPI/appsettings.Development.json
@@ -4,5 +4,8 @@
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
+ },
+ "ConnectionStrings": {
+ "HeartTrackAuthConnection": "Data Source=uca.HeartTrack.db"
}
}
diff --git a/src/Model/Activity.cs b/src/Model/Activity.cs
index 06801bf..11457c1 100644
--- a/src/Model/Activity.cs
+++ b/src/Model/Activity.cs
@@ -31,7 +31,8 @@ public class Activity
public int Minimum { get; set; }
public float AverageTemperature { get; set; }
public bool HasAutoPause { get; set; }
-
+
+ public HashSet Users { get; private set; } = new HashSet();
public Activity(int idActivity ,string type, DateTime date, DateTime startTime, DateTime endTime,
int effort, float variability, float variance, float standardDeviation,
float average, int maximum, int minimum, float averageTemperature, bool hasAutoPause)
diff --git a/src/Model/Manager/Contract/IActivityManager.cs b/src/Model/Manager/Contract/IActivityManager.cs
index 5722a41..2be28cc 100644
--- a/src/Model/Manager/Contract/IActivityManager.cs
+++ b/src/Model/Manager/Contract/IActivityManager.cs
@@ -1,4 +1,3 @@
-using Microsoft.AspNetCore.Http;
namespace Model.Manager;
public interface IActivityManager
diff --git a/src/Model/Model.csproj b/src/Model/Model.csproj
index 915e21e..ead9f5a 100644
--- a/src/Model/Model.csproj
+++ b/src/Model/Model.csproj
@@ -7,18 +7,12 @@
-
-
+
+
-
-
-
-
-
- ..\..\..\..\..\.dotnet\shared\Microsoft.AspNetCore.App\8.0.1\Microsoft.AspNetCore.Identity.dll
-
+
diff --git a/src/Model/Repository/IActivityRepository.cs b/src/Model/Repository/IActivityRepository.cs
index 258bbd9..eab97da 100644
--- a/src/Model/Repository/IActivityRepository.cs
+++ b/src/Model/Repository/IActivityRepository.cs
@@ -4,10 +4,12 @@ namespace Model.Repository;
public interface IActivityRepository
{
- public Task> GetActivities(int index, int count, ActivityOrderCriteria criteria, bool descending = false);
+ public Task?> GetActivities(int index, int count, ActivityOrderCriteria criteria, bool descending = false);
public Task GetActivityByIdAsync(int id);
public Task AddActivity(Activity activity);
public Task UpdateActivity(int id, Activity activity);
public Task DeleteActivity(int id);
public Task GetNbItems();
+ public Task?> GetActivitiesByUser(int userId, int index, int count, ActivityOrderCriteria orderCriteria, bool descending= false);
+ public Task GetNbActivitiesByUser(int userId);
}
\ No newline at end of file
diff --git a/src/Model/Repository/IUserRepository.cs b/src/Model/Repository/IUserRepository.cs
index 4c38ba4..6ba01b9 100644
--- a/src/Model/Repository/IUserRepository.cs
+++ b/src/Model/Repository/IUserRepository.cs
@@ -4,7 +4,14 @@ namespace Model.Repository;
public interface IUserRepository : IGenericRepository
{
- public Task> GetUsers(int index, int count, AthleteOrderCriteria? criteria , bool descending = false);
+ public Task?> GetUsers(int index, int count, AthleteOrderCriteria? criteria , bool descending = false);
public Task AddFriend(User user, User friend);
+
+ public Task RemoveFriend(User user, User friend);
+
+ // should be removed cause i just have to call the GetItem then get the friends
+ public Task?> GetFriends(User user, int index, int count, AthleteOrderCriteria? criteria, bool descending = false);
+
+ public Task GetNbFriends(User user);
}
\ No newline at end of file
diff --git a/src/Model/Service/EmailSender.cs b/src/Model/Service/EmailSender.cs
deleted file mode 100644
index fc9d5e6..0000000
--- a/src/Model/Service/EmailSender.cs
+++ /dev/null
@@ -1,31 +0,0 @@
-
-using Entities;
-using Microsoft.AspNetCore.Identity;
-using Microsoft.AspNetCore.Identity.UI.Services;
-
-namespace Model.Service;
-
-public class EmailSender : IEmailSender
-{
- private IEmailSender _emailSenderImplementation;
-
- public async Task SendEmailAsync(string email, string subject, string htmlMessage)
- {
- throw new NotImplementedException();
- }
-
- public async Task SendConfirmationLinkAsync(AthleteEntity user, string email, string confirmationLink)
- {
- throw new NotImplementedException();
- }
-
- public async Task SendPasswordResetLinkAsync(AthleteEntity user, string email, string resetLink)
- {
- throw new NotImplementedException();
- }
-
- public async Task SendPasswordResetCodeAsync(AthleteEntity user, string email, string resetCode)
- {
- throw new NotImplementedException();
- }
-}
\ No newline at end of file
diff --git a/src/Model2Entities/ActivityRepository.cs b/src/Model2Entities/ActivityRepository.cs
index 9f85796..d9db52b 100644
--- a/src/Model2Entities/ActivityRepository.cs
+++ b/src/Model2Entities/ActivityRepository.cs
@@ -38,7 +38,7 @@ public partial class DbDataManager : IDataManager
{
_logger.LogInformation($"GetActivityByIdAsync with id {id}", id);
// ! By None don't pass the filter
- var activity = _dataManager.DbContext.ActivitiesSet.GetItemsWithFilterAndOrdering(b => b.IdActivity == id, 0, 1, ActivityOrderCriteria.ByType, false).First().ToModel();
+ var activity = _dataManager.DbContext.ActivitiesSet.GetItemsWithFilterAndOrdering(b => b.IdActivity == id, 0, 1, ActivityOrderCriteria.None, false).First().ToModel();
if (activity != null)
_logger.LogInformation($"Retrieved activity with ID {id}");
@@ -136,5 +136,15 @@ public partial class DbDataManager : IDataManager
throw;
}
}
+
+ public Task> GetActivitiesByUser(int userId, int index, int count, ActivityOrderCriteria criteria, bool descending = false)
+ {
+ throw new NotImplementedException();
+ }
+
+ public Task GetNbActivitiesByUser(int userId)
+ {
+ throw new NotImplementedException();
+ }
}
}
\ No newline at end of file
diff --git a/src/Model2Entities/DbDataManager.cs b/src/Model2Entities/DbDataManager.cs
index 946a719..6603fb9 100644
--- a/src/Model2Entities/DbDataManager.cs
+++ b/src/Model2Entities/DbDataManager.cs
@@ -18,9 +18,17 @@ public partial class DbDataManager: IDataManager
DbContext = dbContext;
ActivityRepo = new ActivityRepository(this);
UserRepo = new UserRepository(this);
+ DbContext.Database.EnsureCreated();
ActivityMapper.Reset();
// Faire pour les autres reset() des autres mappers
}
+
+ public DbDataManager(string dbPlatformPath)
+ : this(new HeartTrackContext(dbPlatformPath))
+ {
+ DbContext.Database.EnsureCreated();
+ }
+
public DbDataManager()
{
diff --git a/src/Model2Entities/Extension.cs b/src/Model2Entities/Extension.cs
index ca55e0f..d1acce2 100644
--- a/src/Model2Entities/Extension.cs
+++ b/src/Model2Entities/Extension.cs
@@ -7,28 +7,25 @@ namespace Model2Entities;
public static class Extensions
{
- internal static Task AddItem(this HeartTrackContext context, T? item) where T :class
+ internal static async Task AddItem(this HeartTrackContext context, T? item) where T :class
{
if(item == null || context.Set().Contains(item))
{
- return Task.FromResult(default(T));
+ return await Task.FromResult(null);
}
- context.Set().Add(item);
- context.SaveChangesAsync();
+ var entry = context.Set().Add(item);
+ await context.SaveChangesAsync();
- return Task.FromResult(item);
+ return await Task.FromResult(entry.Entity);
}
- internal static Task DeleteItem(this HeartTrackContext context, int? id) where T:class
+ internal static async Task DeleteItem(this HeartTrackContext context, int? id) where T:class
{
- var item = context.Set().Find(id);
- if(item == null)
- {
- return Task.FromResult(false);
- }
+ var item = await context.Set().FindAsync(id);
+ if(item == null) return await Task.FromResult(false);
context.Set().Remove(item);
- context.SaveChangesAsync();
- return Task.FromResult(true);
+ await context.SaveChangesAsync();
+ return await Task.FromResult(true);
}
// ! 1
@@ -81,10 +78,11 @@ public static class Extensions
{
var filteredList = list.Where(filter);
- if(orderCriterium != null)
+ if(orderCriterium != null && orderCriterium.ToString() != "None")
{
filteredList = filteredList.OrderByCriteria(orderCriterium, descending);
- }
+ }
+
return filteredList
.Skip(index * count)
.Take(count);
diff --git a/src/Model2Entities/Model2Entities.csproj b/src/Model2Entities/Model2Entities.csproj
index bb068f4..d298015 100644
--- a/src/Model2Entities/Model2Entities.csproj
+++ b/src/Model2Entities/Model2Entities.csproj
@@ -10,6 +10,14 @@
+
+
+
+
+
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+ all
+
diff --git a/src/Model2Entities/UserRepository.cs b/src/Model2Entities/UserRepository.cs
index 020dcb6..7791636 100644
--- a/src/Model2Entities/UserRepository.cs
+++ b/src/Model2Entities/UserRepository.cs
@@ -54,5 +54,20 @@ public partial class DbDataManager
{
throw new NotImplementedException();
}
+
+ public async Task RemoveFriend(User user, User friend)
+ {
+ throw new NotImplementedException();
+ }
+
+ public Task?>? GetFriends(User user, int index, int count, AthleteOrderCriteria? criteria, bool descending = false)
+ {
+ throw new NotImplementedException();
+ }
+
+ public Task GetNbFriends(User user)
+ {
+ throw new NotImplementedException();
+ }
}
}
\ No newline at end of file
diff --git a/src/Shared/Extension.cs b/src/Shared/Extension.cs
index 121352c..6301ad7 100644
--- a/src/Shared/Extension.cs
+++ b/src/Shared/Extension.cs
@@ -2,7 +2,7 @@ namespace Shared;
public static class Extensions
{
- public static U? ToU(this T t, GenericMapper mapper, Func func) where U :class where T :class
+ public static U ToU(this T t, GenericMapper mapper, Func func) where U :class where T :class
{
var u = mapper.GetU(t);
if (u != null) {
@@ -14,7 +14,7 @@ public static class Extensions
return u;
}
// , Action action
- public static T? ToT(this U u, GenericMapper mapper, Func func) where U :class where T :class
+ public static T ToT(this U u, GenericMapper mapper, Func func) where U :class where T :class
{
var t = mapper.GetT(u);
if (t != null) {
diff --git a/src/StubAPI/ActivityService.cs b/src/StubAPI/ActivityService.cs
index 0e87004..2b274ae 100644
--- a/src/StubAPI/ActivityService.cs
+++ b/src/StubAPI/ActivityService.cs
@@ -6,33 +6,73 @@ namespace StubAPI;
public class ActivityService: IActivityRepository
{
- public async Task> GetActivities(int index, int count, ActivityOrderCriteria criteria, bool descending = false)
- {
- throw new NotImplementedException();
- }
+ private List _activities = new List(
+ new Activity[]
+ {
+ new Activity
+ {
+ Id = 1,
+ Type = "Running",
+ Date = new DateTime(2021, 10, 10),
+ StartTime = new DateTime(2021, 10, 10, 10, 0, 0),
+ EndTime = new DateTime(2021, 10, 10, 11, 0, 0),
+ Effort = 3,
+ Variability = 0.5f,
+ Variance = 0.5f,
+ StandardDeviation = 0.5f,
+ Average = 5.0f,
+ Maximum = 10,
+ Minimum = 0,
+ AverageTemperature = 20.0f,
+ HasAutoPause = false,
+ Users = {new User
+ {
+ Id = 3, Username = "Athlete3", ProfilePicture = "https://plus.unsplash.com/premium_photo-1705091981693-6006f8a20479?q=80&w=1974&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D", FirstName = "First3", LastName = "Last3",
+ Sexe = "M", Lenght = 190, Weight = 80, DateOfBirth = new DateTime(1994, 3, 3), Email = "ath@ex.fr",
+ Role = new Athlete()
+ }}
+ },
+ }
+ );
+
+ public async Task?> GetActivities(int index, int count, ActivityOrderCriteria criteria, bool descending = false)
+ => await Task.FromResult(_activities.GetItemsWithFilterAndOrdering(c=>true,index, count,criteria != ActivityOrderCriteria.None ? criteria: null , descending));
- public async Task GetActivityByIdAsync(int id)
+ public Task GetActivityByIdAsync(int id)
{
- throw new NotImplementedException();
+ return Task.FromResult(_activities.FirstOrDefault(s => s.Id == id));
}
- public async Task AddActivity(Activity activity)
+ public Task AddActivity(Activity activity)
+ => _activities.AddItem(activity);
+
+
+ public async Task UpdateActivity(int id, Activity activity)
{
- throw new NotImplementedException();
+ var oldActivity = _activities.FirstOrDefault(s => s.Id == id);
+ if (oldActivity == null) return null;
+ return await _activities.UpdateItem(oldActivity, activity);
}
- public async Task UpdateActivity(int id, Activity activity)
+ public Task DeleteActivity(int id)
{
- throw new NotImplementedException();
+ var activity = _activities.FirstOrDefault(s => s.Id == id);
+ if (activity == null) return Task.FromResult(false);
+ return _activities.DeleteItem(activity);
}
- public async Task DeleteActivity(int id)
+ public Task GetNbItems()
+ => Task.FromResult(_activities.Count);
+
+ public async Task?> GetActivitiesByUser(int userId, int index, int count, ActivityOrderCriteria criteria, bool descending = false)
{
- throw new NotImplementedException();
+ var activities = _activities.GetItemsWithFilterAndOrdering(c => c.Users.Any(u => u.Id == userId), index, count,
+ criteria != ActivityOrderCriteria.None ? criteria : null, descending);
+ return await Task.FromResult(activities);
}
- public async Task GetNbItems()
+ public Task GetNbActivitiesByUser(int userId)
{
- throw new NotImplementedException();
+ return Task.FromResult(_activities.Count(a => a.Users.Any(u => u.Id == userId)));
}
}
\ No newline at end of file
diff --git a/src/StubAPI/AthleteService.cs b/src/StubAPI/AthleteService.cs
index d666873..7729296 100644
--- a/src/StubAPI/AthleteService.cs
+++ b/src/StubAPI/AthleteService.cs
@@ -51,14 +51,36 @@ public class UserService : IUserRepository
return true;
}
- public async Task> GetItems(int index, int count, string? orderingProperty = null,
- bool descending = false)
+ public async Task RemoveFriend(User user, User friend)
{
+ if (user == null || friend == null)
+ {
+ return false;
+ }
+
+ if (!user.Users.Contains(friend))
+ {
+ return false;
+ }
- return await this.GetUsers(index, count, this.ToEnum(orderingProperty), descending);
+ user.Users.Remove(friend);
+ return true;
+ }
+
+ public async Task?>? GetFriends(User user, int index, int count, AthleteOrderCriteria? criteria, bool descending = false)
+ =>await Task.FromResult(athletes.FirstOrDefault(s => s.Id == user.Id)?.Users.GetItemsWithFilterAndOrdering(c=>true,index, count,criteria, descending));
+
+ public Task GetNbFriends(User user)
+ {
+ return Task.FromResult(athletes.FirstOrDefault(s => s.Id == user.Id)?.Users.Count ?? 0);
}
+ public async Task> GetItems(int index, int count, string? orderingProperty = null,
+ bool descending = false)
+ =>await GetUsers(index, count, this.ToEnum(orderingProperty), descending);
+
+
public async Task GetItemById(int id)
=>await Task.FromResult(athletes.FirstOrDefault(s => s.Id == id));
diff --git a/src/StubAPI/Extensions.cs b/src/StubAPI/Extensions.cs
index 9917cac..af6f004 100644
--- a/src/StubAPI/Extensions.cs
+++ b/src/StubAPI/Extensions.cs
@@ -39,13 +39,15 @@ public static class Extensions
public static IEnumerable GetItemsWithFilterAndOrdering(this IEnumerable list, Func filter, int index, int count, Enum? orderCriterium, bool descending = false ) where T : class
{
- var filteredList = list.Where(filter);
+ IEnumerable query = list;
+
+ query = query.Where(filter);
if(orderCriterium != null)
{
- filteredList = filteredList.OrderByCriteria(orderCriterium, descending);
+ query = query.OrderByCriteria(orderCriterium, descending);
}
- return filteredList
+ return query
.Skip(index * count)
.Take(count);
}
diff --git a/src/StubbedContextLib/Migrations/20240312203935_MyMigrations.Designer.cs b/src/StubbedContextLib/Migrations/20240312203935_MyMigrations.Designer.cs
deleted file mode 100644
index 9e2f6ad..0000000
--- a/src/StubbedContextLib/Migrations/20240312203935_MyMigrations.Designer.cs
+++ /dev/null
@@ -1,986 +0,0 @@
-//
-using System;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Migrations;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-using StubbedContextLib;
-
-#nullable disable
-
-namespace StubbedContextLib.Migrations
-{
- [DbContext(typeof(TrainingStubbedContext))]
- [Migration("20240312203935_MyMigrations")]
- partial class MyMigrations
- {
- ///
- protected override void BuildTargetModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder.HasAnnotation("ProductVersion", "8.0.2");
-
- modelBuilder.Entity("AthleteEntityNotificationEntity", b =>
- {
- b.Property("NotificationsReceivedIdNotif")
- .HasColumnType("INTEGER");
-
- b.Property("ReceiversIdAthlete")
- .HasColumnType("INTEGER");
-
- b.HasKey("NotificationsReceivedIdNotif", "ReceiversIdAthlete");
-
- b.HasIndex("ReceiversIdAthlete");
-
- b.ToTable("AthleteEntityNotificationEntity");
- });
-
- modelBuilder.Entity("AthleteEntityTrainingEntity", b =>
- {
- b.Property("AthletesIdAthlete")
- .HasColumnType("INTEGER");
-
- b.Property("TrainingsAthleteIdTraining")
- .HasColumnType("INTEGER");
-
- b.HasKey("AthletesIdAthlete", "TrainingsAthleteIdTraining");
-
- b.HasIndex("TrainingsAthleteIdTraining");
-
- b.ToTable("AthleteEntityTrainingEntity");
- });
-
- modelBuilder.Entity("Entities.ActivityEntity", b =>
- {
- b.Property("IdActivity")
- .ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
-
- b.Property("AthleteId")
- .HasColumnType("INTEGER");
-
- b.Property("Average")
- .HasColumnType("REAL");
-
- b.Property("AverageTemperature")
- .HasColumnType("REAL");
-
- b.Property("DataSourceId")
- .HasColumnType("INTEGER");
-
- b.Property("Date")
- .HasColumnType("TEXT");
-
- b.Property("EffortFelt")
- .HasColumnType("INTEGER");
-
- b.Property("EndTime")
- .HasColumnType("TEXT");
-
- b.Property("HasAutoPause")
- .HasColumnType("INTEGER");
-
- b.Property("Maximum")
- .HasColumnType("INTEGER");
-
- b.Property("Minimum")
- .HasColumnType("INTEGER");
-
- b.Property("StandardDeviation")
- .HasColumnType("REAL");
-
- b.Property("StartTime")
- .HasColumnType("TEXT");
-
- b.Property("Type")
- .IsRequired()
- .HasMaxLength(100)
- .HasColumnType("TEXT");
-
- b.Property("Variability")
- .HasColumnType("REAL");
-
- b.Property("Variance")
- .HasColumnType("REAL");
-
- b.HasKey("IdActivity");
-
- b.HasIndex("AthleteId");
-
- b.HasIndex("DataSourceId");
-
- b.ToTable("Activity");
-
- b.HasData(
- new
- {
- IdActivity = 1,
- AthleteId = 1,
- Average = 0.5f,
- AverageTemperature = 20f,
- DataSourceId = 1,
- 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,
- AthleteId = 2,
- Average = 0.5f,
- AverageTemperature = 20f,
- DataSourceId = 2,
- 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,
- AthleteId = 1,
- Average = 0.5f,
- AverageTemperature = 20f,
- DataSourceId = 1,
- 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,
- AthleteId = 5,
- Average = 0.5f,
- AverageTemperature = 20f,
- DataSourceId = 3,
- 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,
- AthleteId = 4,
- Average = 0.5f,
- AverageTemperature = 20f,
- DataSourceId = 4,
- 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,
- AthleteId = 4,
- Average = 0.5f,
- AverageTemperature = 20f,
- DataSourceId = 4,
- 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,
- AthleteId = 3,
- Average = 0.5f,
- AverageTemperature = 20f,
- DataSourceId = 5,
- 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("IdAthlete")
- .ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
-
- b.Property("DataSourceId")
- .HasColumnType("INTEGER");
-
- b.Property("DateOfBirth")
- .HasColumnType("TEXT");
-
- b.Property("Email")
- .IsRequired()
- .HasMaxLength(100)
- .HasColumnType("TEXT");
-
- b.Property("FirstName")
- .IsRequired()
- .HasMaxLength(150)
- .HasColumnType("TEXT");
-
- b.Property("IsCoach")
- .HasColumnType("INTEGER");
-
- b.Property("LastName")
- .IsRequired()
- .HasMaxLength(100)
- .HasColumnType("TEXT");
-
- b.Property("Length")
- .HasColumnType("REAL");
-
- b.Property("Password")
- .IsRequired()
- .HasColumnType("TEXT");
-
- b.Property("ProfilPicture")
- .IsRequired()
- .HasColumnType("BLOB");
-
- b.Property("Sexe")
- .IsRequired()
- .HasMaxLength(1)
- .HasColumnType("TEXT");
-
- b.Property("Username")
- .IsRequired()
- .HasMaxLength(100)
- .HasColumnType("TEXT");
-
- b.Property("Weight")
- .HasColumnType("REAL");
-
- b.HasKey("IdAthlete");
-
- b.HasIndex("DataSourceId");
-
- 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",
- Length = 1.8,
- Password = "password123",
- ProfilPicture = new byte[] { 34, 85, 107, 108, 71, 82, 116, 119, 68, 65, 65, 66, 88, 82, 85, 74, 81, 86, 108, 65, 52, 73, 78, 65, 68, 65, 65, 65, 119, 69, 65, 67, 100, 65, 83, 111, 113, 65, 67, 111, 65, 65, 77, 65, 83, 74, 90, 103, 67, 100, 77, 111, 83, 67, 122, 54, 53, 53, 110, 100, 85, 52, 88, 88, 65, 80, 50, 121, 88, 73, 103, 101, 53, 110, 101, 77, 47, 81, 100, 54, 87, 67, 102, 79, 56, 101, 118, 111, 106, 50, 83, 48, 65, 47, 112, 55, 43, 102, 48, 65, 110, 56, 53, 99, 66, 120, 108, 76, 68, 103, 80, 67, 56, 106, 79, 47, 48, 110, 115, 108, 47, 49, 51, 47, 79, 56, 118, 118, 122, 106, 55, 65, 102, 56, 115, 47, 112, 51, 47, 72, 52, 70, 85, 54, 116, 100, 52, 77, 67, 119, 113, 50, 51, 122, 49, 72, 50, 117, 122, 111, 75, 73, 88, 97, 113, 74, 110, 105, 80, 73, 47, 98, 82, 77, 102, 56, 113, 122, 118, 48, 90, 112, 43, 72, 69, 49, 82, 67, 66, 119, 53, 87, 81, 49, 106, 47, 74, 111, 118, 100, 77, 49, 70, 83, 53, 50, 43, 81, 99, 97, 65, 65, 65, 47, 118, 47, 43, 78, 120, 85, 52, 68, 112, 80, 107, 51, 43, 120, 81, 80, 87, 55, 116, 99, 109, 85, 82, 83, 111, 57, 118, 67, 52, 113, 99, 43, 88, 77, 120, 78, 86, 66, 122, 69, 77, 53, 69, 56, 97, 99, 116, 68, 122, 57, 56, 103, 109, 119, 84, 88, 103, 68, 54, 50, 101, 57, 69, 109, 71, 47, 101, 114, 118, 100, 100, 50, 111, 118, 70, 70, 83, 117, 120, 89, 112, 112, 87, 108, 47, 119, 116, 97, 88, 51, 114, 107, 110, 48, 120, 114, 116, 56, 113, 79, 113, 108, 47, 53, 73, 50, 106, 102, 76, 79, 110, 67, 85, 48, 107, 65, 76, 76, 99, 87, 52, 70, 47, 119, 84, 106, 85, 49, 48, 113, 115, 120, 90, 88, 87, 57, 102, 120, 97, 117, 67, 54, 79, 80, 86, 82, 70, 50, 56, 115, 99, 57, 52, 86, 57, 111, 99, 109, 111, 83, 87, 121, 43, 115, 102, 54, 106, 87, 51, 118, 89, 107, 86, 79, 104, 43, 103, 69, 47, 82, 69, 48, 76, 54, 98, 50, 100, 51, 111, 70, 121, 72, 109, 107, 82, 74, 110, 102, 89, 119, 71, 56, 111, 51, 112, 54, 102, 118, 57, 112, 105, 118, 78, 70, 53, 97, 111, 112, 73, 66, 122, 70, 110, 106, 122, 119, 98, 47, 86, 113, 83, 113, 51, 47, 98, 43, 77, 87, 75, 70, 109, 106, 114, 56, 84, 49, 113, 101, 52, 47, 102, 73, 84, 111, 50, 118, 66, 87, 69, 113, 68, 121, 111, 103, 86, 51, 90, 86, 71, 110, 68, 86, 105, 50, 68, 98, 105, 69, 70, 86, 83, 85, 114, 50, 101, 88, 84, 78, 90, 81, 57, 86, 47, 68, 57, 81, 67, 47, 43, 118, 67, 82, 53, 84, 71, 121, 88, 57, 81, 79, 86, 66, 103, 116, 65, 89, 116, 109, 47, 90, 84, 73, 119, 122, 80, 69, 89, 66, 57, 78, 114, 86, 49, 78, 101, 79, 49, 47, 115, 65, 122, 55, 56, 117, 48, 116, 87, 53, 57, 114, 48, 73, 43, 83, 79, 53, 74, 103, 109, 51, 66, 57, 105, 49, 116, 111, 82, 117, 114, 122, 72, 118, 57, 69, 90, 74, 57, 121, 90, 76, 56, 110, 97, 102, 98, 47, 84, 49, 70, 97, 111, 80, 68, 107, 117, 74, 102, 77, 43, 105, 80, 115, 48, 106, 56, 120, 110, 83, 55, 84, 97, 85, 47, 103, 69, 75, 48, 119, 67, 120, 101, 68, 89, 82, 89, 116, 74, 120, 57, 106, 52, 104, 85, 81, 113, 55, 112, 65, 117, 47, 84, 50, 121, 87, 121, 48, 118, 106, 99, 85, 72, 107, 105, 57, 53, 50, 90, 78, 98, 88, 110, 88, 120, 66, 56, 109, 56, 112, 86, 53, 120, 57, 69, 49, 115, 102, 76, 106, 53, 77, 90, 69, 103, 112, 85, 50, 88, 86, 56, 82, 72, 114, 86, 118, 87, 110, 105, 67, 106, 115, 102, 54, 118, 103, 120, 109, 82, 55, 43, 75, 116, 119, 73, 98, 77, 106, 97, 104, 105, 116, 85, 71, 116, 72, 101, 116, 49, 87, 100, 76, 43, 56, 77, 109, 100, 76, 50, 57, 105, 81, 74, 67, 51, 55, 112, 68, 88, 105, 114, 105, 114, 49, 78, 105, 98, 120, 75, 75, 104, 70, 89, 82, 117, 74, 51, 120, 87, 57, 79, 48, 114, 57, 43, 86, 110, 104, 56, 100, 105, 113, 98, 66, 117, 88, 113, 68, 98, 89, 82, 47, 77, 83, 111, 72, 118, 115, 99, 79, 67, 109, 50, 116, 57, 53, 100, 78, 53, 87, 66, 100, 82, 85, 111, 68, 55, 89, 67, 71, 47, 90, 72, 87, 99, 55, 89, 112, 118, 47, 120, 47, 97, 108, 52, 102, 107, 66, 50, 108, 90, 108, 89, 104, 86, 87, 72, 120, 106, 97, 111, 101, 70, 57, 106, 69, 80, 73, 48, 103, 65, 78, 53, 88, 115, 118, 85, 73, 54, 104, 98, 122, 69, 122, 87, 77, 115, 78, 87, 47, 49, 111, 114, 107, 78, 79, 110, 108, 115, 107, 97, 108, 103, 109, 112, 73, 52, 66, 50, 114, 109, 52, 71, 99, 55, 76, 78, 117, 105, 43, 77, 117, 77, 66, 114, 112, 110, 66, 118, 76, 107, 98, 89, 88, 57, 101, 120, 101, 57, 103, 56, 116, 117, 55, 119, 76, 116, 55, 83, 99, 79, 106, 68, 99, 76, 57, 57, 111, 79, 121, 82, 56, 57, 77, 104, 57, 76, 56, 114, 100, 52, 43, 52, 51, 43, 74, 81, 121, 82, 54, 116, 115, 73, 102, 99, 80, 74, 111, 54, 84, 54, 70, 120, 72, 102, 49, 49, 100, 47, 77, 71, 97, 121, 74, 105, 43, 83, 87, 99, 116, 47, 117, 104, 118, 118, 117, 97, 48, 111, 79, 104, 43, 122, 88, 78, 73, 97, 85, 122, 103, 111, 66, 109, 117, 49, 88, 85, 76, 106, 107, 112, 117, 65, 48, 71, 104, 122, 99, 116, 102, 51, 48, 106, 98, 89, 49, 65, 79, 77, 52, 57, 113, 98, 77, 90, 82, 89, 83, 57, 65, 43, 48, 83, 49, 72, 114, 72, 80, 110, 119, 82, 118, 112, 81, 89, 47, 83, 106, 52, 120, 75, 80, 110, 48, 103, 100, 112, 118, 47, 43, 105, 84, 98, 75, 74, 98, 56, 122, 107, 80, 67, 52, 47, 57, 97, 102, 48, 74, 118, 101, 115, 97, 43, 71, 68, 71, 48, 47, 105, 119, 51, 84, 115, 119, 101, 110, 77, 104, 113, 108, 104, 55, 66, 77, 57, 77, 87, 53, 116, 120, 112, 101, 98, 108, 115, 66, 121, 120, 52, 87, 110, 74, 47, 111, 72, 118, 54, 99, 99, 48, 100, 109, 77, 55, 116, 115, 86, 51, 54, 108, 89, 107, 67, 84, 85, 88, 69, 102, 47, 48, 101, 75, 108, 110, 102, 105, 118, 110, 78, 48, 103, 49, 103, 43, 106, 47, 76, 107, 57, 101, 116, 47, 117, 111, 97, 54, 84, 70, 67, 87, 48, 72, 103, 119, 70, 79, 73, 86, 70, 117, 109, 69, 89, 100, 84, 54, 55, 53, 80, 102, 117, 84, 114, 89, 79, 53, 111, 56, 90, 114, 87, 69, 73, 72, 116, 118, 50, 67, 116, 108, 114, 118, 57, 74, 51, 84, 114, 115, 108, 68, 47, 105, 75, 69, 119, 116, 105, 112, 71, 72, 116, 110, 48, 86, 97, 107, 56, 66, 57, 119, 76, 76, 43, 107, 122, 43, 67, 73, 81, 47, 86, 71, 52, 75, 74, 112, 88, 106, 120, 56, 56, 67, 101, 67, 67, 52, 88, 97, 71, 105, 116, 69, 100, 106, 65, 65, 65, 34 },
- Sexe = "M",
- Username = "Doe",
- Weight = 75f
- },
- new
- {
- IdAthlete = 2,
- DataSourceId = 1,
- DateOfBirth = new DateOnly(1995, 1, 1),
- Email = "jane.smith@exemple.com",
- FirstName = "Jane",
- IsCoach = false,
- LastName = "Smith",
- Length = 1.6499999999999999,
- Password = "secure456",
- ProfilPicture = new byte[] { 34, 85, 107, 108, 71, 82, 116, 119, 68, 65, 65, 66, 88, 82, 85, 74, 81, 86, 108, 65, 52, 73, 78, 65, 68, 65, 65, 65, 119, 69, 65, 67, 100, 65, 83, 111, 113, 65, 67, 111, 65, 65, 77, 65, 83, 74, 90, 103, 67, 100, 77, 111, 83, 67, 122, 54, 53, 53, 110, 100, 85, 52, 88, 88, 65, 80, 50, 121, 88, 73, 103, 101, 53, 110, 101, 77, 47, 81, 100, 54, 87, 67, 102, 79, 56, 101, 118, 111, 106, 50, 83, 48, 65, 47, 112, 55, 43, 102, 48, 65, 110, 56, 53, 99, 66, 120, 108, 76, 68, 103, 80, 67, 56, 106, 79, 47, 48, 110, 115, 108, 47, 49, 51, 47, 79, 56, 118, 118, 122, 106, 55, 65, 102, 56, 115, 47, 112, 51, 47, 72, 52, 70, 85, 54, 116, 100, 52, 77, 67, 119, 113, 50, 51, 122, 49, 72, 50, 117, 122, 111, 75, 73, 88, 97, 113, 74, 110, 105, 80, 73, 47, 98, 82, 77, 102, 56, 113, 122, 118, 48, 90, 112, 43, 72, 69, 49, 82, 67, 66, 119, 53, 87, 81, 49, 106, 47, 74, 111, 118, 100, 77, 49, 70, 83, 53, 50, 43, 81, 99, 97, 65, 65, 65, 47, 118, 47, 43, 78, 120, 85, 52, 68, 112, 80, 107, 51, 43, 120, 81, 80, 87, 55, 116, 99, 109, 85, 82, 83, 111, 57, 118, 67, 52, 113, 99, 43, 88, 77, 120, 78, 86, 66, 122, 69, 77, 53, 69, 56, 97, 99, 116, 68, 122, 57, 56, 103, 109, 119, 84, 88, 103, 68, 54, 50, 101, 57, 69, 109, 71, 47, 101, 114, 118, 100, 100, 50, 111, 118, 70, 70, 83, 117, 120, 89, 112, 112, 87, 108, 47, 119, 116, 97, 88, 51, 114, 107, 110, 48, 120, 114, 116, 56, 113, 79, 113, 108, 47, 53, 73, 50, 106, 102, 76, 79, 110, 67, 85, 48, 107, 65, 76, 76, 99, 87, 52, 70, 47, 119, 84, 106, 85, 49, 48, 113, 115, 120, 90, 88, 87, 57, 102, 120, 97, 117, 67, 54, 79, 80, 86, 82, 70, 50, 56, 115, 99, 57, 52, 86, 57, 111, 99, 109, 111, 83, 87, 121, 43, 115, 102, 54, 106, 87, 51, 118, 89, 107, 86, 79, 104, 43, 103, 69, 47, 82, 69, 48, 76, 54, 98, 50, 100, 51, 111, 70, 121, 72, 109, 107, 82, 74, 110, 102, 89, 119, 71, 56, 111, 51, 112, 54, 102, 118, 57, 112, 105, 118, 78, 70, 53, 97, 111, 112, 73, 66, 122, 70, 110, 106, 122, 119, 98, 47, 86, 113, 83, 113, 51, 47, 98, 43, 77, 87, 75, 70, 109, 106, 114, 56, 84, 49, 113, 101, 52, 47, 102, 73, 84, 111, 50, 118, 66, 87, 69, 113, 68, 121, 111, 103, 86, 51, 90, 86, 71, 110, 68, 86, 105, 50, 68, 98, 105, 69, 70, 86, 83, 85, 114, 50, 101, 88, 84, 78, 90, 81, 57, 86, 47, 68, 57, 81, 67, 47, 43, 118, 67, 82, 53, 84, 71, 121, 88, 57, 81, 79, 86, 66, 103, 116, 65, 89, 116, 109, 47, 90, 84, 73, 119, 122, 80, 69, 89, 66, 57, 78, 114, 86, 49, 78, 101, 79, 49, 47, 115, 65, 122, 55, 56, 117, 48, 116, 87, 53, 57, 114, 48, 73, 43, 83, 79, 53, 74, 103, 109, 51, 66, 57, 105, 49, 116, 111, 82, 117, 114, 122, 72, 118, 57, 69, 90, 74, 57, 121, 90, 76, 56, 110, 97, 102, 98, 47, 84, 49, 70, 97, 111, 80, 68, 107, 117, 74, 102, 77, 43, 105, 80, 115, 48, 106, 56, 120, 110, 83, 55, 84, 97, 85, 47, 103, 69, 75, 48, 119, 67, 120, 101, 68, 89, 82, 89, 116, 74, 120, 57, 106, 52, 104, 85, 81, 113, 55, 112, 65, 117, 47, 84, 50, 121, 87, 121, 48, 118, 106, 99, 85, 72, 107, 105, 57, 53, 50, 90, 78, 98, 88, 110, 88, 120, 66, 56, 109, 56, 112, 86, 53, 120, 57, 69, 49, 115, 102, 76, 106, 53, 77, 90, 69, 103, 112, 85, 50, 88, 86, 56, 82, 72, 114, 86, 118, 87, 110, 105, 67, 106, 115, 102, 54, 118, 103, 120, 109, 82, 55, 43, 75, 116, 119, 73, 98, 77, 106, 97, 104, 105, 116, 85, 71, 116, 72, 101, 116, 49, 87, 100, 76, 43, 56, 77, 109, 100, 76, 50, 57, 105, 81, 74, 67, 51, 55, 112, 68, 88, 105, 114, 105, 114, 49, 78, 105, 98, 120, 75, 75, 104, 70, 89, 82, 117, 74, 51, 120, 87, 57, 79, 48, 114, 57, 43, 86, 110, 104, 56, 100, 105, 113, 98, 66, 117, 88, 113, 68, 98, 89, 82, 47, 77, 83, 111, 72, 118, 115, 99, 79, 67, 109, 50, 116, 57, 53, 100, 78, 53, 87, 66, 100, 82, 85, 111, 68, 55, 89, 67, 71, 47, 90, 72, 87, 99, 55, 89, 112, 118, 47, 120, 47, 97, 108, 52, 102, 107, 66, 50, 108, 90, 108, 89, 104, 86, 87, 72, 120, 106, 97, 111, 101, 70, 57, 106, 69, 80, 73, 48, 103, 65, 78, 53, 88, 115, 118, 85, 73, 54, 104, 98, 122, 69, 122, 87, 77, 115, 78, 87, 47, 49, 111, 114, 107, 78, 79, 110, 108, 115, 107, 97, 108, 103, 109, 112, 73, 52, 66, 50, 114, 109, 52, 71, 99, 55, 76, 78, 117, 105, 43, 77, 117, 77, 66, 114, 112, 110, 66, 118, 76, 107, 98, 89, 88, 57, 101, 120, 101, 57, 103, 56, 116, 117, 55, 119, 76, 116, 55, 83, 99, 79, 106, 68, 99, 76, 57, 57, 111, 79, 121, 82, 56, 57, 77, 104, 57, 76, 56, 114, 100, 52, 43, 52, 51, 43, 74, 81, 121, 82, 54, 116, 115, 73, 102, 99, 80, 74, 111, 54, 84, 54, 70, 120, 72, 102, 49, 49, 100, 47, 77, 71, 97, 121, 74, 105, 43, 83, 87, 99, 116, 47, 117, 104, 118, 118, 117, 97, 48, 111, 79, 104, 43, 122, 88, 78, 73, 97, 85, 122, 103, 111, 66, 109, 117, 49, 88, 85, 76, 106, 107, 112, 117, 65, 48, 71, 104, 122, 99, 116, 102, 51, 48, 106, 98, 89, 49, 65, 79, 77, 52, 57, 113, 98, 77, 90, 82, 89, 83, 57, 65, 43, 48, 83, 49, 72, 114, 72, 80, 110, 119, 82, 118, 112, 81, 89, 47, 83, 106, 52, 120, 75, 80, 110, 48, 103, 100, 112, 118, 47, 43, 105, 84, 98, 75, 74, 98, 56, 122, 107, 80, 67, 52, 47, 57, 97, 102, 48, 74, 118, 101, 115, 97, 43, 71, 68, 71, 48, 47, 105, 119, 51, 84, 115, 119, 101, 110, 77, 104, 113, 108, 104, 55, 66, 77, 57, 77, 87, 53, 116, 120, 112, 101, 98, 108, 115, 66, 121, 120, 52, 87, 110, 74, 47, 111, 72, 118, 54, 99, 99, 48, 100, 109, 77, 55, 116, 115, 86, 51, 54, 108, 89, 107, 67, 84, 85, 88, 69, 102, 47, 48, 101, 75, 108, 110, 102, 105, 118, 110, 78, 48, 103, 49, 103, 43, 106, 47, 76, 107, 57, 101, 116, 47, 117, 111, 97, 54, 84, 70, 67, 87, 48, 72, 103, 119, 70, 79, 73, 86, 70, 117, 109, 69, 89, 100, 84, 54, 55, 53, 80, 102, 117, 84, 114, 89, 79, 53, 111, 56, 90, 114, 87, 69, 73, 72, 116, 118, 50, 67, 116, 108, 114, 118, 57, 74, 51, 84, 114, 115, 108, 68, 47, 105, 75, 69, 119, 116, 105, 112, 71, 72, 116, 110, 48, 86, 97, 107, 56, 66, 57, 119, 76, 76, 43, 107, 122, 43, 67, 73, 81, 47, 86, 71, 52, 75, 74, 112, 88, 106, 120, 56, 56, 67, 101, 67, 67, 52, 88, 97, 71, 105, 116, 69, 100, 106, 65, 65, 65, 34 },
- 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",
- Length = 1.75,
- Password = "super789",
- ProfilPicture = new byte[] { 34, 85, 107, 108, 71, 82, 116, 119, 68, 65, 65, 66, 88, 82, 85, 74, 81, 86, 108, 65, 52, 73, 78, 65, 68, 65, 65, 65, 119, 69, 65, 67, 100, 65, 83, 111, 113, 65, 67, 111, 65, 65, 77, 65, 83, 74, 90, 103, 67, 100, 77, 111, 83, 67, 122, 54, 53, 53, 110, 100, 85, 52, 88, 88, 65, 80, 50, 121, 88, 73, 103, 101, 53, 110, 101, 77, 47, 81, 100, 54, 87, 67, 102, 79, 56, 101, 118, 111, 106, 50, 83, 48, 65, 47, 112, 55, 43, 102, 48, 65, 110, 56, 53, 99, 66, 120, 108, 76, 68, 103, 80, 67, 56, 106, 79, 47, 48, 110, 115, 108, 47, 49, 51, 47, 79, 56, 118, 118, 122, 106, 55, 65, 102, 56, 115, 47, 112, 51, 47, 72, 52, 70, 85, 54, 116, 100, 52, 77, 67, 119, 113, 50, 51, 122, 49, 72, 50, 117, 122, 111, 75, 73, 88, 97, 113, 74, 110, 105, 80, 73, 47, 98, 82, 77, 102, 56, 113, 122, 118, 48, 90, 112, 43, 72, 69, 49, 82, 67, 66, 119, 53, 87, 81, 49, 106, 47, 74, 111, 118, 100, 77, 49, 70, 83, 53, 50, 43, 81, 99, 97, 65, 65, 65, 47, 118, 47, 43, 78, 120, 85, 52, 68, 112, 80, 107, 51, 43, 120, 81, 80, 87, 55, 116, 99, 109, 85, 82, 83, 111, 57, 118, 67, 52, 113, 99, 43, 88, 77, 120, 78, 86, 66, 122, 69, 77, 53, 69, 56, 97, 99, 116, 68, 122, 57, 56, 103, 109, 119, 84, 88, 103, 68, 54, 50, 101, 57, 69, 109, 71, 47, 101, 114, 118, 100, 100, 50, 111, 118, 70, 70, 83, 117, 120, 89, 112, 112, 87, 108, 47, 119, 116, 97, 88, 51, 114, 107, 110, 48, 120, 114, 116, 56, 113, 79, 113, 108, 47, 53, 73, 50, 106, 102, 76, 79, 110, 67, 85, 48, 107, 65, 76, 76, 99, 87, 52, 70, 47, 119, 84, 106, 85, 49, 48, 113, 115, 120, 90, 88, 87, 57, 102, 120, 97, 117, 67, 54, 79, 80, 86, 82, 70, 50, 56, 115, 99, 57, 52, 86, 57, 111, 99, 109, 111, 83, 87, 121, 43, 115, 102, 54, 106, 87, 51, 118, 89, 107, 86, 79, 104, 43, 103, 69, 47, 82, 69, 48, 76, 54, 98, 50, 100, 51, 111, 70, 121, 72, 109, 107, 82, 74, 110, 102, 89, 119, 71, 56, 111, 51, 112, 54, 102, 118, 57, 112, 105, 118, 78, 70, 53, 97, 111, 112, 73, 66, 122, 70, 110, 106, 122, 119, 98, 47, 86, 113, 83, 113, 51, 47, 98, 43, 77, 87, 75, 70, 109, 106, 114, 56, 84, 49, 113, 101, 52, 47, 102, 73, 84, 111, 50, 118, 66, 87, 69, 113, 68, 121, 111, 103, 86, 51, 90, 86, 71, 110, 68, 86, 105, 50, 68, 98, 105, 69, 70, 86, 83, 85, 114, 50, 101, 88, 84, 78, 90, 81, 57, 86, 47, 68, 57, 81, 67, 47, 43, 118, 67, 82, 53, 84, 71, 121, 88, 57, 81, 79, 86, 66, 103, 116, 65, 89, 116, 109, 47, 90, 84, 73, 119, 122, 80, 69, 89, 66, 57, 78, 114, 86, 49, 78, 101, 79, 49, 47, 115, 65, 122, 55, 56, 117, 48, 116, 87, 53, 57, 114, 48, 73, 43, 83, 79, 53, 74, 103, 109, 51, 66, 57, 105, 49, 116, 111, 82, 117, 114, 122, 72, 118, 57, 69, 90, 74, 57, 121, 90, 76, 56, 110, 97, 102, 98, 47, 84, 49, 70, 97, 111, 80, 68, 107, 117, 74, 102, 77, 43, 105, 80, 115, 48, 106, 56, 120, 110, 83, 55, 84, 97, 85, 47, 103, 69, 75, 48, 119, 67, 120, 101, 68, 89, 82, 89, 116, 74, 120, 57, 106, 52, 104, 85, 81, 113, 55, 112, 65, 117, 47, 84, 50, 121, 87, 121, 48, 118, 106, 99, 85, 72, 107, 105, 57, 53, 50, 90, 78, 98, 88, 110, 88, 120, 66, 56, 109, 56, 112, 86, 53, 120, 57, 69, 49, 115, 102, 76, 106, 53, 77, 90, 69, 103, 112, 85, 50, 88, 86, 56, 82, 72, 114, 86, 118, 87, 110, 105, 67, 106, 115, 102, 54, 118, 103, 120, 109, 82, 55, 43, 75, 116, 119, 73, 98, 77, 106, 97, 104, 105, 116, 85, 71, 116, 72, 101, 116, 49, 87, 100, 76, 43, 56, 77, 109, 100, 76, 50, 57, 105, 81, 74, 67, 51, 55, 112, 68, 88, 105, 114, 105, 114, 49, 78, 105, 98, 120, 75, 75, 104, 70, 89, 82, 117, 74, 51, 120, 87, 57, 79, 48, 114, 57, 43, 86, 110, 104, 56, 100, 105, 113, 98, 66, 117, 88, 113, 68, 98, 89, 82, 47, 77, 83, 111, 72, 118, 115, 99, 79, 67, 109, 50, 116, 57, 53, 100, 78, 53, 87, 66, 100, 82, 85, 111, 68, 55, 89, 67, 71, 47, 90, 72, 87, 99, 55, 89, 112, 118, 47, 120, 47, 97, 108, 52, 102, 107, 66, 50, 108, 90, 108, 89, 104, 86, 87, 72, 120, 106, 97, 111, 101, 70, 57, 106, 69, 80, 73, 48, 103, 65, 78, 53, 88, 115, 118, 85, 73, 54, 104, 98, 122, 69, 122, 87, 77, 115, 78, 87, 47, 49, 111, 114, 107, 78, 79, 110, 108, 115, 107, 97, 108, 103, 109, 112, 73, 52, 66, 50, 114, 109, 52, 71, 99, 55, 76, 78, 117, 105, 43, 77, 117, 77, 66, 114, 112, 110, 66, 118, 76, 107, 98, 89, 88, 57, 101, 120, 101, 57, 103, 56, 116, 117, 55, 119, 76, 116, 55, 83, 99, 79, 106, 68, 99, 76, 57, 57, 111, 79, 121, 82, 56, 57, 77, 104, 57, 76, 56, 114, 100, 52, 43, 52, 51, 43, 74, 81, 121, 82, 54, 116, 115, 73, 102, 99, 80, 74, 111, 54, 84, 54, 70, 120, 72, 102, 49, 49, 100, 47, 77, 71, 97, 121, 74, 105, 43, 83, 87, 99, 116, 47, 117, 104, 118, 118, 117, 97, 48, 111, 79, 104, 43, 122, 88, 78, 73, 97, 85, 122, 103, 111, 66, 109, 117, 49, 88, 85, 76, 106, 107, 112, 117, 65, 48, 71, 104, 122, 99, 116, 102, 51, 48, 106, 98, 89, 49, 65, 79, 77, 52, 57, 113, 98, 77, 90, 82, 89, 83, 57, 65, 43, 48, 83, 49, 72, 114, 72, 80, 110, 119, 82, 118, 112, 81, 89, 47, 83, 106, 52, 120, 75, 80, 110, 48, 103, 100, 112, 118, 47, 43, 105, 84, 98, 75, 74, 98, 56, 122, 107, 80, 67, 52, 47, 57, 97, 102, 48, 74, 118, 101, 115, 97, 43, 71, 68, 71, 48, 47, 105, 119, 51, 84, 115, 119, 101, 110, 77, 104, 113, 108, 104, 55, 66, 77, 57, 77, 87, 53, 116, 120, 112, 101, 98, 108, 115, 66, 121, 120, 52, 87, 110, 74, 47, 111, 72, 118, 54, 99, 99, 48, 100, 109, 77, 55, 116, 115, 86, 51, 54, 108, 89, 107, 67, 84, 85, 88, 69, 102, 47, 48, 101, 75, 108, 110, 102, 105, 118, 110, 78, 48, 103, 49, 103, 43, 106, 47, 76, 107, 57, 101, 116, 47, 117, 111, 97, 54, 84, 70, 67, 87, 48, 72, 103, 119, 70, 79, 73, 86, 70, 117, 109, 69, 89, 100, 84, 54, 55, 53, 80, 102, 117, 84, 114, 89, 79, 53, 111, 56, 90, 114, 87, 69, 73, 72, 116, 118, 50, 67, 116, 108, 114, 118, 57, 74, 51, 84, 114, 115, 108, 68, 47, 105, 75, 69, 119, 116, 105, 112, 71, 72, 116, 110, 48, 86, 97, 107, 56, 66, 57, 119, 76, 76, 43, 107, 122, 43, 67, 73, 81, 47, 86, 71, 52, 75, 74, 112, 88, 106, 120, 56, 56, 67, 101, 67, 67, 52, 88, 97, 71, 105, 116, 69, 100, 106, 65, 65, 65, 34 },
- 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",
- Length = 1.7,
- Password = "test000",
- ProfilPicture = new byte[] { 34, 85, 107, 108, 71, 82, 116, 119, 68, 65, 65, 66, 88, 82, 85, 74, 81, 86, 108, 65, 52, 73, 78, 65, 68, 65, 65, 65, 119, 69, 65, 67, 100, 65, 83, 111, 113, 65, 67, 111, 65, 65, 77, 65, 83, 74, 90, 103, 67, 100, 77, 111, 83, 67, 122, 54, 53, 53, 110, 100, 85, 52, 88, 88, 65, 80, 50, 121, 88, 73, 103, 101, 53, 110, 101, 77, 47, 81, 100, 54, 87, 67, 102, 79, 56, 101, 118, 111, 106, 50, 83, 48, 65, 47, 112, 55, 43, 102, 48, 65, 110, 56, 53, 99, 66, 120, 108, 76, 68, 103, 80, 67, 56, 106, 79, 47, 48, 110, 115, 108, 47, 49, 51, 47, 79, 56, 118, 118, 122, 106, 55, 65, 102, 56, 115, 47, 112, 51, 47, 72, 52, 70, 85, 54, 116, 100, 52, 77, 67, 119, 113, 50, 51, 122, 49, 72, 50, 117, 122, 111, 75, 73, 88, 97, 113, 74, 110, 105, 80, 73, 47, 98, 82, 77, 102, 56, 113, 122, 118, 48, 90, 112, 43, 72, 69, 49, 82, 67, 66, 119, 53, 87, 81, 49, 106, 47, 74, 111, 118, 100, 77, 49, 70, 83, 53, 50, 43, 81, 99, 97, 65, 65, 65, 47, 118, 47, 43, 78, 120, 85, 52, 68, 112, 80, 107, 51, 43, 120, 81, 80, 87, 55, 116, 99, 109, 85, 82, 83, 111, 57, 118, 67, 52, 113, 99, 43, 88, 77, 120, 78, 86, 66, 122, 69, 77, 53, 69, 56, 97, 99, 116, 68, 122, 57, 56, 103, 109, 119, 84, 88, 103, 68, 54, 50, 101, 57, 69, 109, 71, 47, 101, 114, 118, 100, 100, 50, 111, 118, 70, 70, 83, 117, 120, 89, 112, 112, 87, 108, 47, 119, 116, 97, 88, 51, 114, 107, 110, 48, 120, 114, 116, 56, 113, 79, 113, 108, 47, 53, 73, 50, 106, 102, 76, 79, 110, 67, 85, 48, 107, 65, 76, 76, 99, 87, 52, 70, 47, 119, 84, 106, 85, 49, 48, 113, 115, 120, 90, 88, 87, 57, 102, 120, 97, 117, 67, 54, 79, 80, 86, 82, 70, 50, 56, 115, 99, 57, 52, 86, 57, 111, 99, 109, 111, 83, 87, 121, 43, 115, 102, 54, 106, 87, 51, 118, 89, 107, 86, 79, 104, 43, 103, 69, 47, 82, 69, 48, 76, 54, 98, 50, 100, 51, 111, 70, 121, 72, 109, 107, 82, 74, 110, 102, 89, 119, 71, 56, 111, 51, 112, 54, 102, 118, 57, 112, 105, 118, 78, 70, 53, 97, 111, 112, 73, 66, 122, 70, 110, 106, 122, 119, 98, 47, 86, 113, 83, 113, 51, 47, 98, 43, 77, 87, 75, 70, 109, 106, 114, 56, 84, 49, 113, 101, 52, 47, 102, 73, 84, 111, 50, 118, 66, 87, 69, 113, 68, 121, 111, 103, 86, 51, 90, 86, 71, 110, 68, 86, 105, 50, 68, 98, 105, 69, 70, 86, 83, 85, 114, 50, 101, 88, 84, 78, 90, 81, 57, 86, 47, 68, 57, 81, 67, 47, 43, 118, 67, 82, 53, 84, 71, 121, 88, 57, 81, 79, 86, 66, 103, 116, 65, 89, 116, 109, 47, 90, 84, 73, 119, 122, 80, 69, 89, 66, 57, 78, 114, 86, 49, 78, 101, 79, 49, 47, 115, 65, 122, 55, 56, 117, 48, 116, 87, 53, 57, 114, 48, 73, 43, 83, 79, 53, 74, 103, 109, 51, 66, 57, 105, 49, 116, 111, 82, 117, 114, 122, 72, 118, 57, 69, 90, 74, 57, 121, 90, 76, 56, 110, 97, 102, 98, 47, 84, 49, 70, 97, 111, 80, 68, 107, 117, 74, 102, 77, 43, 105, 80, 115, 48, 106, 56, 120, 110, 83, 55, 84, 97, 85, 47, 103, 69, 75, 48, 119, 67, 120, 101, 68, 89, 82, 89, 116, 74, 120, 57, 106, 52, 104, 85, 81, 113, 55, 112, 65, 117, 47, 84, 50, 121, 87, 121, 48, 118, 106, 99, 85, 72, 107, 105, 57, 53, 50, 90, 78, 98, 88, 110, 88, 120, 66, 56, 109, 56, 112, 86, 53, 120, 57, 69, 49, 115, 102, 76, 106, 53, 77, 90, 69, 103, 112, 85, 50, 88, 86, 56, 82, 72, 114, 86, 118, 87, 110, 105, 67, 106, 115, 102, 54, 118, 103, 120, 109, 82, 55, 43, 75, 116, 119, 73, 98, 77, 106, 97, 104, 105, 116, 85, 71, 116, 72, 101, 116, 49, 87, 100, 76, 43, 56, 77, 109, 100, 76, 50, 57, 105, 81, 74, 67, 51, 55, 112, 68, 88, 105, 114, 105, 114, 49, 78, 105, 98, 120, 75, 75, 104, 70, 89, 82, 117, 74, 51, 120, 87, 57, 79, 48, 114, 57, 43, 86, 110, 104, 56, 100, 105, 113, 98, 66, 117, 88, 113, 68, 98, 89, 82, 47, 77, 83, 111, 72, 118, 115, 99, 79, 67, 109, 50, 116, 57, 53, 100, 78, 53, 87, 66, 100, 82, 85, 111, 68, 55, 89, 67, 71, 47, 90, 72, 87, 99, 55, 89, 112, 118, 47, 120, 47, 97, 108, 52, 102, 107, 66, 50, 108, 90, 108, 89, 104, 86, 87, 72, 120, 106, 97, 111, 101, 70, 57, 106, 69, 80, 73, 48, 103, 65, 78, 53, 88, 115, 118, 85, 73, 54, 104, 98, 122, 69, 122, 87, 77, 115, 78, 87, 47, 49, 111, 114, 107, 78, 79, 110, 108, 115, 107, 97, 108, 103, 109, 112, 73, 52, 66, 50, 114, 109, 52, 71, 99, 55, 76, 78, 117, 105, 43, 77, 117, 77, 66, 114, 112, 110, 66, 118, 76, 107, 98, 89, 88, 57, 101, 120, 101, 57, 103, 56, 116, 117, 55, 119, 76, 116, 55, 83, 99, 79, 106, 68, 99, 76, 57, 57, 111, 79, 121, 82, 56, 57, 77, 104, 57, 76, 56, 114, 100, 52, 43, 52, 51, 43, 74, 81, 121, 82, 54, 116, 115, 73, 102, 99, 80, 74, 111, 54, 84, 54, 70, 120, 72, 102, 49, 49, 100, 47, 77, 71, 97, 121, 74, 105, 43, 83, 87, 99, 116, 47, 117, 104, 118, 118, 117, 97, 48, 111, 79, 104, 43, 122, 88, 78, 73, 97, 85, 122, 103, 111, 66, 109, 117, 49, 88, 85, 76, 106, 107, 112, 117, 65, 48, 71, 104, 122, 99, 116, 102, 51, 48, 106, 98, 89, 49, 65, 79, 77, 52, 57, 113, 98, 77, 90, 82, 89, 83, 57, 65, 43, 48, 83, 49, 72, 114, 72, 80, 110, 119, 82, 118, 112, 81, 89, 47, 83, 106, 52, 120, 75, 80, 110, 48, 103, 100, 112, 118, 47, 43, 105, 84, 98, 75, 74, 98, 56, 122, 107, 80, 67, 52, 47, 57, 97, 102, 48, 74, 118, 101, 115, 97, 43, 71, 68, 71, 48, 47, 105, 119, 51, 84, 115, 119, 101, 110, 77, 104, 113, 108, 104, 55, 66, 77, 57, 77, 87, 53, 116, 120, 112, 101, 98, 108, 115, 66, 121, 120, 52, 87, 110, 74, 47, 111, 72, 118, 54, 99, 99, 48, 100, 109, 77, 55, 116, 115, 86, 51, 54, 108, 89, 107, 67, 84, 85, 88, 69, 102, 47, 48, 101, 75, 108, 110, 102, 105, 118, 110, 78, 48, 103, 49, 103, 43, 106, 47, 76, 107, 57, 101, 116, 47, 117, 111, 97, 54, 84, 70, 67, 87, 48, 72, 103, 119, 70, 79, 73, 86, 70, 117, 109, 69, 89, 100, 84, 54, 55, 53, 80, 102, 117, 84, 114, 89, 79, 53, 111, 56, 90, 114, 87, 69, 73, 72, 116, 118, 50, 67, 116, 108, 114, 118, 57, 74, 51, 84, 114, 115, 108, 68, 47, 105, 75, 69, 119, 116, 105, 112, 71, 72, 116, 110, 48, 86, 97, 107, 56, 66, 57, 119, 76, 76, 43, 107, 122, 43, 67, 73, 81, 47, 86, 71, 52, 75, 74, 112, 88, 106, 120, 56, 56, 67, 101, 67, 67, 52, 88, 97, 71, 105, 116, 69, 100, 106, 65, 65, 65, 34 },
- Sexe = "F",
- Username = "Brown",
- Weight = 58f
- },
- new
- {
- IdAthlete = 5,
- DataSourceId = 3,
- DateOfBirth = new DateOnly(1991, 1, 1),
- Email = "bruce.lee@example.com",
- FirstName = "Bruce",
- IsCoach = false,
- LastName = "Lee",
- Length = 2.0,
- Password = "hello321",
- ProfilPicture = new byte[] { 34, 85, 107, 108, 71, 82, 116, 119, 68, 65, 65, 66, 88, 82, 85, 74, 81, 86, 108, 65, 52, 73, 78, 65, 68, 65, 65, 65, 119, 69, 65, 67, 100, 65, 83, 111, 113, 65, 67, 111, 65, 65, 77, 65, 83, 74, 90, 103, 67, 100, 77, 111, 83, 67, 122, 54, 53, 53, 110, 100, 85, 52, 88, 88, 65, 80, 50, 121, 88, 73, 103, 101, 53, 110, 101, 77, 47, 81, 100, 54, 87, 67, 102, 79, 56, 101, 118, 111, 106, 50, 83, 48, 65, 47, 112, 55, 43, 102, 48, 65, 110, 56, 53, 99, 66, 120, 108, 76, 68, 103, 80, 67, 56, 106, 79, 47, 48, 110, 115, 108, 47, 49, 51, 47, 79, 56, 118, 118, 122, 106, 55, 65, 102, 56, 115, 47, 112, 51, 47, 72, 52, 70, 85, 54, 116, 100, 52, 77, 67, 119, 113, 50, 51, 122, 49, 72, 50, 117, 122, 111, 75, 73, 88, 97, 113, 74, 110, 105, 80, 73, 47, 98, 82, 77, 102, 56, 113, 122, 118, 48, 90, 112, 43, 72, 69, 49, 82, 67, 66, 119, 53, 87, 81, 49, 106, 47, 74, 111, 118, 100, 77, 49, 70, 83, 53, 50, 43, 81, 99, 97, 65, 65, 65, 47, 118, 47, 43, 78, 120, 85, 52, 68, 112, 80, 107, 51, 43, 120, 81, 80, 87, 55, 116, 99, 109, 85, 82, 83, 111, 57, 118, 67, 52, 113, 99, 43, 88, 77, 120, 78, 86, 66, 122, 69, 77, 53, 69, 56, 97, 99, 116, 68, 122, 57, 56, 103, 109, 119, 84, 88, 103, 68, 54, 50, 101, 57, 69, 109, 71, 47, 101, 114, 118, 100, 100, 50, 111, 118, 70, 70, 83, 117, 120, 89, 112, 112, 87, 108, 47, 119, 116, 97, 88, 51, 114, 107, 110, 48, 120, 114, 116, 56, 113, 79, 113, 108, 47, 53, 73, 50, 106, 102, 76, 79, 110, 67, 85, 48, 107, 65, 76, 76, 99, 87, 52, 70, 47, 119, 84, 106, 85, 49, 48, 113, 115, 120, 90, 88, 87, 57, 102, 120, 97, 117, 67, 54, 79, 80, 86, 82, 70, 50, 56, 115, 99, 57, 52, 86, 57, 111, 99, 109, 111, 83, 87, 121, 43, 115, 102, 54, 106, 87, 51, 118, 89, 107, 86, 79, 104, 43, 103, 69, 47, 82, 69, 48, 76, 54, 98, 50, 100, 51, 111, 70, 121, 72, 109, 107, 82, 74, 110, 102, 89, 119, 71, 56, 111, 51, 112, 54, 102, 118, 57, 112, 105, 118, 78, 70, 53, 97, 111, 112, 73, 66, 122, 70, 110, 106, 122, 119, 98, 47, 86, 113, 83, 113, 51, 47, 98, 43, 77, 87, 75, 70, 109, 106, 114, 56, 84, 49, 113, 101, 52, 47, 102, 73, 84, 111, 50, 118, 66, 87, 69, 113, 68, 121, 111, 103, 86, 51, 90, 86, 71, 110, 68, 86, 105, 50, 68, 98, 105, 69, 70, 86, 83, 85, 114, 50, 101, 88, 84, 78, 90, 81, 57, 86, 47, 68, 57, 81, 67, 47, 43, 118, 67, 82, 53, 84, 71, 121, 88, 57, 81, 79, 86, 66, 103, 116, 65, 89, 116, 109, 47, 90, 84, 73, 119, 122, 80, 69, 89, 66, 57, 78, 114, 86, 49, 78, 101, 79, 49, 47, 115, 65, 122, 55, 56, 117, 48, 116, 87, 53, 57, 114, 48, 73, 43, 83, 79, 53, 74, 103, 109, 51, 66, 57, 105, 49, 116, 111, 82, 117, 114, 122, 72, 118, 57, 69, 90, 74, 57, 121, 90, 76, 56, 110, 97, 102, 98, 47, 84, 49, 70, 97, 111, 80, 68, 107, 117, 74, 102, 77, 43, 105, 80, 115, 48, 106, 56, 120, 110, 83, 55, 84, 97, 85, 47, 103, 69, 75, 48, 119, 67, 120, 101, 68, 89, 82, 89, 116, 74, 120, 57, 106, 52, 104, 85, 81, 113, 55, 112, 65, 117, 47, 84, 50, 121, 87, 121, 48, 118, 106, 99, 85, 72, 107, 105, 57, 53, 50, 90, 78, 98, 88, 110, 88, 120, 66, 56, 109, 56, 112, 86, 53, 120, 57, 69, 49, 115, 102, 76, 106, 53, 77, 90, 69, 103, 112, 85, 50, 88, 86, 56, 82, 72, 114, 86, 118, 87, 110, 105, 67, 106, 115, 102, 54, 118, 103, 120, 109, 82, 55, 43, 75, 116, 119, 73, 98, 77, 106, 97, 104, 105, 116, 85, 71, 116, 72, 101, 116, 49, 87, 100, 76, 43, 56, 77, 109, 100, 76, 50, 57, 105, 81, 74, 67, 51, 55, 112, 68, 88, 105, 114, 105, 114, 49, 78, 105, 98, 120, 75, 75, 104, 70, 89, 82, 117, 74, 51, 120, 87, 57, 79, 48, 114, 57, 43, 86, 110, 104, 56, 100, 105, 113, 98, 66, 117, 88, 113, 68, 98, 89, 82, 47, 77, 83, 111, 72, 118, 115, 99, 79, 67, 109, 50, 116, 57, 53, 100, 78, 53, 87, 66, 100, 82, 85, 111, 68, 55, 89, 67, 71, 47, 90, 72, 87, 99, 55, 89, 112, 118, 47, 120, 47, 97, 108, 52, 102, 107, 66, 50, 108, 90, 108, 89, 104, 86, 87, 72, 120, 106, 97, 111, 101, 70, 57, 106, 69, 80, 73, 48, 103, 65, 78, 53, 88, 115, 118, 85, 73, 54, 104, 98, 122, 69, 122, 87, 77, 115, 78, 87, 47, 49, 111, 114, 107, 78, 79, 110, 108, 115, 107, 97, 108, 103, 109, 112, 73, 52, 66, 50, 114, 109, 52, 71, 99, 55, 76, 78, 117, 105, 43, 77, 117, 77, 66, 114, 112, 110, 66, 118, 76, 107, 98, 89, 88, 57, 101, 120, 101, 57, 103, 56, 116, 117, 55, 119, 76, 116, 55, 83, 99, 79, 106, 68, 99, 76, 57, 57, 111, 79, 121, 82, 56, 57, 77, 104, 57, 76, 56, 114, 100, 52, 43, 52, 51, 43, 74, 81, 121, 82, 54, 116, 115, 73, 102, 99, 80, 74, 111, 54, 84, 54, 70, 120, 72, 102, 49, 49, 100, 47, 77, 71, 97, 121, 74, 105, 43, 83, 87, 99, 116, 47, 117, 104, 118, 118, 117, 97, 48, 111, 79, 104, 43, 122, 88, 78, 73, 97, 85, 122, 103, 111, 66, 109, 117, 49, 88, 85, 76, 106, 107, 112, 117, 65, 48, 71, 104, 122, 99, 116, 102, 51, 48, 106, 98, 89, 49, 65, 79, 77, 52, 57, 113, 98, 77, 90, 82, 89, 83, 57, 65, 43, 48, 83, 49, 72, 114, 72, 80, 110, 119, 82, 118, 112, 81, 89, 47, 83, 106, 52, 120, 75, 80, 110, 48, 103, 100, 112, 118, 47, 43, 105, 84, 98, 75, 74, 98, 56, 122, 107, 80, 67, 52, 47, 57, 97, 102, 48, 74, 118, 101, 115, 97, 43, 71, 68, 71, 48, 47, 105, 119, 51, 84, 115, 119, 101, 110, 77, 104, 113, 108, 104, 55, 66, 77, 57, 77, 87, 53, 116, 120, 112, 101, 98, 108, 115, 66, 121, 120, 52, 87, 110, 74, 47, 111, 72, 118, 54, 99, 99, 48, 100, 109, 77, 55, 116, 115, 86, 51, 54, 108, 89, 107, 67, 84, 85, 88, 69, 102, 47, 48, 101, 75, 108, 110, 102, 105, 118, 110, 78, 48, 103, 49, 103, 43, 106, 47, 76, 107, 57, 101, 116, 47, 117, 111, 97, 54, 84, 70, 67, 87, 48, 72, 103, 119, 70, 79, 73, 86, 70, 117, 109, 69, 89, 100, 84, 54, 55, 53, 80, 102, 117, 84, 114, 89, 79, 53, 111, 56, 90, 114, 87, 69, 73, 72, 116, 118, 50, 67, 116, 108, 114, 118, 57, 74, 51, 84, 114, 115, 108, 68, 47, 105, 75, 69, 119, 116, 105, 112, 71, 72, 116, 110, 48, 86, 97, 107, 56, 66, 57, 119, 76, 76, 43, 107, 122, 43, 67, 73, 81, 47, 86, 71, 52, 75, 74, 112, 88, 106, 120, 56, 56, 67, 101, 67, 67, 52, 88, 97, 71, 105, 116, 69, 100, 106, 65, 65, 65, 34 },
- Sexe = "M",
- Username = "Lee",
- Weight = 90f
- });
- });
-
- modelBuilder.Entity("Entities.DataSourceEntity", b =>
- {
- b.Property("IdSource")
- .ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
-
- b.Property("Model")
- .IsRequired()
- .HasMaxLength(100)
- .HasColumnType("TEXT");
-
- b.Property("Precision")
- .HasColumnType("REAL");
-
- b.Property("Type")
- .IsRequired()
- .HasMaxLength(100)
- .HasColumnType("TEXT");
-
- b.HasKey("IdSource");
-
- b.ToTable("DataSource");
-
- b.HasData(
- new
- {
- IdSource = 1,
- Model = "Garmin",
- Precision = 0.5f,
- Type = "Smartwatch"
- },
- new
- {
- IdSource = 2,
- Model = "Polar",
- Precision = 0.5f,
- Type = "Smartwatch"
- },
- new
- {
- IdSource = 3,
- Model = "Suunto",
- Precision = 0.5f,
- Type = "Smartwatch"
- },
- new
- {
- IdSource = 4,
- Model = "Fitbit",
- Precision = 0.5f,
- Type = "Smartwatch"
- },
- new
- {
- IdSource = 5,
- Model = "Apple Watch",
- Precision = 0.5f,
- Type = "Smartwatch"
- });
- });
-
- modelBuilder.Entity("Entities.FriendshipEntity", b =>
- {
- b.Property("FollowingId")
- .HasColumnType("INTEGER");
-
- b.Property("FollowerId")
- .HasColumnType("INTEGER");
-
- b.Property("StartDate")
- .HasColumnType("TEXT");
-
- b.HasKey("FollowingId", "FollowerId");
-
- b.HasIndex("FollowerId");
-
- b.ToTable("FriendshipEntity");
-
- b.HasData(
- new
- {
- FollowingId = 2,
- FollowerId = 1,
- StartDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)
- },
- new
- {
- FollowingId = 3,
- FollowerId = 1,
- StartDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)
- },
- new
- {
- FollowingId = 4,
- FollowerId = 1,
- StartDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)
- },
- new
- {
- FollowingId = 5,
- FollowerId = 1,
- StartDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)
- },
- new
- {
- FollowingId = 1,
- FollowerId = 2,
- StartDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)
- },
- new
- {
- FollowingId = 3,
- FollowerId = 2,
- StartDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)
- });
- });
-
- modelBuilder.Entity("Entities.HeartRateEntity", b =>
- {
- b.Property("IdHeartRate")
- .ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
-
- b.Property("ActivityId")
- .HasColumnType("INTEGER");
-
- b.Property("Altitude")
- .HasColumnType("REAL");
-
- b.Property("Bpm")
- .HasColumnType("INTEGER");
-
- b.Property("Latitude")
- .HasColumnType("REAL");
-
- b.Property("Longitude")
- .HasColumnType("REAL");
-
- b.Property("Temperature")
- .HasColumnType("REAL");
-
- b.Property("Time")
- .HasColumnType("TEXT");
-
- b.HasKey("IdHeartRate");
-
- b.HasIndex("ActivityId");
-
- b.ToTable("HeartRate");
-
- b.HasData(
- new
- {
- IdHeartRate = 1,
- ActivityId = 1,
- Altitude = 0.0,
- Bpm = 60,
- Latitude = 66f,
- Longitude = 35f,
- Temperature = 20f,
- Time = new TimeOnly(13, 0, 30)
- },
- new
- {
- IdHeartRate = 2,
- ActivityId = 2,
- Altitude = 10.0,
- Bpm = 65,
- Latitude = 67f,
- Longitude = 35f,
- Temperature = 20.5f,
- Time = new TimeOnly(13, 0, 31)
- },
- new
- {
- IdHeartRate = 3,
- ActivityId = 1,
- Altitude = 11.0,
- Bpm = 71,
- Latitude = 66f,
- Longitude = 36f,
- Temperature = 20f,
- Time = new TimeOnly(13, 0, 32)
- },
- new
- {
- IdHeartRate = 4,
- ActivityId = 2,
- Altitude = 12.0,
- Bpm = 75,
- Latitude = 67f,
- Longitude = 36f,
- Temperature = 20.5f,
- Time = new TimeOnly(13, 0, 33)
- },
- new
- {
- IdHeartRate = 5,
- ActivityId = 4,
- Altitude = 13.0,
- Bpm = 80,
- Latitude = 66f,
- Longitude = 37f,
- Temperature = 20f,
- Time = new TimeOnly(13, 0, 34)
- });
- });
-
- modelBuilder.Entity("Entities.NotificationEntity", b =>
- {
- b.Property("IdNotif")
- .ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
-
- b.Property("Date")
- .HasColumnType("TEXT");
-
- b.Property("Message")
- .IsRequired()
- .HasMaxLength(100)
- .HasColumnType("TEXT");
-
- b.Property("SenderId")
- .HasColumnType("INTEGER");
-
- b.Property("Statut")
- .HasColumnType("INTEGER");
-
- b.Property("Urgence")
- .IsRequired()
- .HasMaxLength(100)
- .HasColumnType("TEXT");
-
- b.HasKey("IdNotif");
-
- b.HasIndex("SenderId");
-
- 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",
- SenderId = 1,
- 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",
- SenderId = 2,
- 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",
- SenderId = 3,
- 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",
- SenderId = 4,
- 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",
- SenderId = 5,
- Statut = true,
- Urgence = "3"
- });
- });
-
- modelBuilder.Entity("Entities.StatisticEntity", b =>
- {
- b.Property("IdStatistic")
- .ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
-
- b.Property("AthleteId")
- .HasColumnType("INTEGER");
-
- b.Property("AverageCaloriesBurned")
- .HasColumnType("REAL");
-
- b.Property("AverageHeartRate")
- .HasColumnType("REAL");
-
- b.Property("Date")
- .HasColumnType("TEXT");
-
- b.Property("MaximumHeartRate")
- .HasColumnType("REAL");
-
- b.Property("Weight")
- .HasColumnType("REAL");
-
- b.HasKey("IdStatistic");
-
- b.HasIndex("AthleteId");
-
- b.ToTable("Statistic");
-
- b.HasData(
- new
- {
- IdStatistic = 1,
- AthleteId = 1,
- AverageCaloriesBurned = 500.0,
- AverageHeartRate = 120.0,
- Date = new DateOnly(2021, 12, 12),
- MaximumHeartRate = 180.0,
- Weight = 75f
- },
- new
- {
- IdStatistic = 2,
- AthleteId = 2,
- AverageCaloriesBurned = 600.0,
- AverageHeartRate = 130.0,
- Date = new DateOnly(2021, 1, 11),
- MaximumHeartRate = 190.0,
- Weight = 60f
- },
- new
- {
- IdStatistic = 3,
- AthleteId = 1,
- AverageCaloriesBurned = 550.0,
- AverageHeartRate = 125.0,
- Date = new DateOnly(2022, 12, 30),
- MaximumHeartRate = 185.0,
- Weight = 68f
- },
- new
- {
- IdStatistic = 4,
- AthleteId = 3,
- AverageCaloriesBurned = 650.0,
- AverageHeartRate = 135.0,
- Date = new DateOnly(2023, 2, 20),
- MaximumHeartRate = 195.0,
- Weight = 58f
- },
- new
- {
- IdStatistic = 5,
- AthleteId = 4,
- AverageCaloriesBurned = 450.0,
- AverageHeartRate = 110.0,
- Date = new DateOnly(2024, 1, 10),
- MaximumHeartRate = 170.0,
- Weight = 90f
- });
- });
-
- modelBuilder.Entity("Entities.TrainingEntity", b =>
- {
- b.Property("IdTraining")
- .ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
-
- b.Property("CoachId")
- .HasColumnType("INTEGER");
-
- b.Property("Date")
- .HasColumnType("TEXT");
-
- b.Property("Description")
- .HasMaxLength(300)
- .HasColumnType("TEXT");
-
- b.Property("FeedBack")
- .HasMaxLength(300)
- .HasColumnType("TEXT");
-
- b.Property("Latitude")
- .HasColumnType("REAL");
-
- b.Property("Longitude")
- .HasColumnType("REAL");
-
- b.HasKey("IdTraining");
-
- b.HasIndex("CoachId");
-
- b.ToTable("Training");
-
- b.HasData(
- new
- {
- IdTraining = 1,
- CoachId = 1,
- Date = new DateOnly(2024, 1, 19),
- Description = "Running",
- FeedBack = "Good",
- Latitude = 48.8566f,
- Longitude = 2.3522f
- },
- new
- {
- IdTraining = 2,
- CoachId = 5,
- Date = new DateOnly(2024, 2, 20),
- Description = "Cycling",
- Latitude = 48.8566f,
- Longitude = 2.3522f
- },
- new
- {
- IdTraining = 3,
- CoachId = 4,
- Date = new DateOnly(2024, 2, 21),
- FeedBack = "Good",
- Latitude = 48.8566f,
- Longitude = 2.3522f
- },
- new
- {
- IdTraining = 4,
- CoachId = 3,
- Date = new DateOnly(2024, 2, 22),
- Description = "Running",
- FeedBack = "Good",
- Latitude = 48.8566f,
- Longitude = 2.3522f
- },
- new
- {
- IdTraining = 5,
- CoachId = 1,
- Date = new DateOnly(2024, 2, 23),
- Description = "Cycling",
- Latitude = 48.8566f,
- Longitude = 2.3522f
- });
- });
-
- modelBuilder.Entity("AthleteEntityNotificationEntity", b =>
- {
- b.HasOne("Entities.NotificationEntity", null)
- .WithMany()
- .HasForeignKey("NotificationsReceivedIdNotif")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("Entities.AthleteEntity", null)
- .WithMany()
- .HasForeignKey("ReceiversIdAthlete")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
-
- modelBuilder.Entity("AthleteEntityTrainingEntity", b =>
- {
- b.HasOne("Entities.AthleteEntity", null)
- .WithMany()
- .HasForeignKey("AthletesIdAthlete")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("Entities.TrainingEntity", null)
- .WithMany()
- .HasForeignKey("TrainingsAthleteIdTraining")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
-
- modelBuilder.Entity("Entities.ActivityEntity", b =>
- {
- b.HasOne("Entities.AthleteEntity", "Athlete")
- .WithMany("Activities")
- .HasForeignKey("AthleteId");
-
- b.HasOne("Entities.DataSourceEntity", "DataSource")
- .WithMany("Activities")
- .HasForeignKey("DataSourceId");
-
- b.Navigation("Athlete");
-
- b.Navigation("DataSource");
- });
-
- modelBuilder.Entity("Entities.AthleteEntity", b =>
- {
- b.HasOne("Entities.DataSourceEntity", "DataSource")
- .WithMany("Athletes")
- .HasForeignKey("DataSourceId");
-
- b.Navigation("DataSource");
- });
-
- modelBuilder.Entity("Entities.FriendshipEntity", b =>
- {
- b.HasOne("Entities.AthleteEntity", "Follower")
- .WithMany("Followers")
- .HasForeignKey("FollowerId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("Entities.AthleteEntity", "Following")
- .WithMany("Followings")
- .HasForeignKey("FollowingId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("Follower");
-
- b.Navigation("Following");
- });
-
- modelBuilder.Entity("Entities.HeartRateEntity", b =>
- {
- b.HasOne("Entities.ActivityEntity", "Activity")
- .WithMany("HeartRates")
- .HasForeignKey("ActivityId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("Activity");
- });
-
- modelBuilder.Entity("Entities.NotificationEntity", b =>
- {
- b.HasOne("Entities.AthleteEntity", "Sender")
- .WithMany("NotificationsSent")
- .HasForeignKey("SenderId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("Sender");
- });
-
- modelBuilder.Entity("Entities.StatisticEntity", b =>
- {
- b.HasOne("Entities.AthleteEntity", "Athlete")
- .WithMany("Statistics")
- .HasForeignKey("AthleteId");
-
- b.Navigation("Athlete");
- });
-
- modelBuilder.Entity("Entities.TrainingEntity", b =>
- {
- b.HasOne("Entities.AthleteEntity", "Coach")
- .WithMany("TrainingsCoach")
- .HasForeignKey("CoachId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("Coach");
- });
-
- modelBuilder.Entity("Entities.ActivityEntity", b =>
- {
- b.Navigation("HeartRates");
- });
-
- modelBuilder.Entity("Entities.AthleteEntity", b =>
- {
- b.Navigation("Activities");
-
- b.Navigation("Followers");
-
- b.Navigation("Followings");
-
- b.Navigation("NotificationsSent");
-
- b.Navigation("Statistics");
-
- b.Navigation("TrainingsCoach");
- });
-
- modelBuilder.Entity("Entities.DataSourceEntity", b =>
- {
- b.Navigation("Activities");
-
- b.Navigation("Athletes");
- });
-#pragma warning restore 612, 618
- }
- }
-}
diff --git a/src/StubbedContextLib/Migrations/20240312203935_MyMigrations.cs b/src/StubbedContextLib/Migrations/20240312203935_MyMigrations.cs
deleted file mode 100644
index ee2a463..0000000
--- a/src/StubbedContextLib/Migrations/20240312203935_MyMigrations.cs
+++ /dev/null
@@ -1,492 +0,0 @@
-using System;
-using Microsoft.EntityFrameworkCore.Migrations;
-
-#nullable disable
-
-#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
-
-namespace StubbedContextLib.Migrations
-{
- ///
- public partial class MyMigrations : Migration
- {
- ///
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.CreateTable(
- name: "DataSource",
- columns: table => new
- {
- IdSource = table.Column(type: "INTEGER", nullable: false)
- .Annotation("Sqlite:Autoincrement", true),
- Type = table.Column(type: "TEXT", maxLength: 100, nullable: false),
- Model = table.Column(type: "TEXT", maxLength: 100, nullable: false),
- Precision = table.Column(type: "REAL", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_DataSource", x => x.IdSource);
- });
-
- migrationBuilder.CreateTable(
- name: "Athlete",
- columns: table => new
- {
- IdAthlete = table.Column(type: "INTEGER", nullable: false)
- .Annotation("Sqlite:Autoincrement", true),
- Username = table.Column(type: "TEXT", maxLength: 100, nullable: false),
- LastName = table.Column(type: "TEXT", maxLength: 100, nullable: false),
- FirstName = table.Column(type: "TEXT", maxLength: 150, nullable: false),
- Email = table.Column(type: "TEXT", maxLength: 100, nullable: false),
- Sexe = table.Column(type: "TEXT", maxLength: 1, nullable: false),
- Length = table.Column(type: "REAL", nullable: false),
- Weight = table.Column(type: "REAL", nullable: false),
- Password = table.Column(type: "TEXT", nullable: false),
- DateOfBirth = table.Column(type: "TEXT", nullable: false),
- IsCoach = table.Column(type: "INTEGER", nullable: false),
- ProfilPicture = table.Column(type: "BLOB", nullable: false),
- DataSourceId = table.Column(type: "INTEGER", nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Athlete", x => x.IdAthlete);
- table.ForeignKey(
- name: "FK_Athlete_DataSource_DataSourceId",
- column: x => x.DataSourceId,
- principalTable: "DataSource",
- principalColumn: "IdSource");
- });
-
- migrationBuilder.CreateTable(
- name: "Activity",
- columns: table => new
- {
- IdActivity = table.Column(type: "INTEGER", nullable: false)
- .Annotation("Sqlite:Autoincrement", true),
- Type = table.Column(type: "TEXT", maxLength: 100, nullable: false),
- Date = table.Column(type: "TEXT", nullable: false),
- StartTime = table.Column(type: "TEXT", nullable: false),
- EndTime = table.Column(type: "TEXT", nullable: false),
- EffortFelt = table.Column(type: "INTEGER", nullable: false),
- Variability = table.Column(type: "REAL", nullable: false),
- Variance = table.Column(type: "REAL", nullable: false),
- StandardDeviation = table.Column(type: "REAL", nullable: false),
- Average = table.Column(type: "REAL", nullable: false),
- Maximum = table.Column(type: "INTEGER", nullable: false),
- Minimum = table.Column(type: "INTEGER", nullable: false),
- AverageTemperature = table.Column(type: "REAL", nullable: false),
- HasAutoPause = table.Column(type: "INTEGER", nullable: false),
- DataSourceId = table.Column(type: "INTEGER", nullable: false),
- AthleteId = table.Column(type: "INTEGER", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Activity", x => x.IdActivity);
- table.ForeignKey(
- name: "FK_Activity_Athlete_AthleteId",
- column: x => x.AthleteId,
- principalTable: "Athlete",
- principalColumn: "IdAthlete");
- table.ForeignKey(
- name: "FK_Activity_DataSource_DataSourceId",
- column: x => x.DataSourceId,
- principalTable: "DataSource",
- principalColumn: "IdSource");
- });
-
- migrationBuilder.CreateTable(
- name: "FriendshipEntity",
- columns: table => new
- {
- FollowingId = table.Column(type: "INTEGER", nullable: false),
- FollowerId = table.Column(type: "INTEGER", nullable: false),
- StartDate = table.Column(type: "TEXT", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_FriendshipEntity", x => new { x.FollowingId, x.FollowerId });
- table.ForeignKey(
- name: "FK_FriendshipEntity_Athlete_FollowerId",
- column: x => x.FollowerId,
- principalTable: "Athlete",
- principalColumn: "IdAthlete",
- onDelete: ReferentialAction.Cascade);
- table.ForeignKey(
- name: "FK_FriendshipEntity_Athlete_FollowingId",
- column: x => x.FollowingId,
- principalTable: "Athlete",
- principalColumn: "IdAthlete",
- onDelete: ReferentialAction.Cascade);
- });
-
- migrationBuilder.CreateTable(
- name: "Notification",
- columns: table => new
- {
- IdNotif = table.Column(type: "INTEGER", nullable: false)
- .Annotation("Sqlite:Autoincrement", true),
- Message = table.Column(type: "TEXT", maxLength: 100, nullable: false),
- Date = table.Column(type: "TEXT", nullable: false),
- Statut = table.Column(type: "INTEGER", nullable: false),
- Urgence = table.Column(type: "TEXT", maxLength: 100, nullable: false),
- SenderId = table.Column(type: "INTEGER", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Notification", x => x.IdNotif);
- table.ForeignKey(
- name: "FK_Notification_Athlete_SenderId",
- column: x => x.SenderId,
- principalTable: "Athlete",
- principalColumn: "IdAthlete",
- onDelete: ReferentialAction.Cascade);
- });
-
- migrationBuilder.CreateTable(
- name: "Statistic",
- columns: table => new
- {
- IdStatistic = table.Column(type: "INTEGER", nullable: false)
- .Annotation("Sqlite:Autoincrement", true),
- Weight = table.Column(type: "REAL", nullable: false),
- AverageHeartRate = table.Column(type: "REAL", nullable: false),
- MaximumHeartRate = table.Column(type: "REAL", nullable: false),
- AverageCaloriesBurned = table.Column(type: "REAL", nullable: false),
- Date = table.Column(type: "TEXT", nullable: false),
- AthleteId = table.Column(type: "INTEGER", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Statistic", x => x.IdStatistic);
- table.ForeignKey(
- name: "FK_Statistic_Athlete_AthleteId",
- column: x => x.AthleteId,
- principalTable: "Athlete",
- principalColumn: "IdAthlete");
- });
-
- migrationBuilder.CreateTable(
- name: "Training",
- columns: table => new
- {
- IdTraining = table.Column(type: "INTEGER", nullable: false)
- .Annotation("Sqlite:Autoincrement", true),
- Date = table.Column(type: "TEXT", nullable: false),
- Description = table.Column(type: "TEXT", maxLength: 300, nullable: true),
- Latitude = table.Column(type: "REAL", nullable: false),
- Longitude = table.Column(type: "REAL", nullable: false),
- FeedBack = table.Column(type: "TEXT", maxLength: 300, nullable: true),
- CoachId = table.Column(type: "INTEGER", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Training", x => x.IdTraining);
- table.ForeignKey(
- name: "FK_Training_Athlete_CoachId",
- column: x => x.CoachId,
- principalTable: "Athlete",
- principalColumn: "IdAthlete",
- onDelete: ReferentialAction.Cascade);
- });
-
- migrationBuilder.CreateTable(
- name: "HeartRate",
- columns: table => new
- {
- IdHeartRate = table.Column(type: "INTEGER", nullable: false)
- .Annotation("Sqlite:Autoincrement", true),
- Altitude = table.Column(type: "REAL", nullable: false),
- Time = table.Column(type: "TEXT", nullable: false),
- Temperature = table.Column(type: "REAL", nullable: false),
- Bpm = table.Column(type: "INTEGER", nullable: false),
- Longitude = table.Column(type: "REAL", nullable: false),
- Latitude = table.Column(type: "REAL", nullable: false),
- ActivityId = table.Column(type: "INTEGER", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_HeartRate", x => x.IdHeartRate);
- table.ForeignKey(
- name: "FK_HeartRate_Activity_ActivityId",
- column: x => x.ActivityId,
- principalTable: "Activity",
- principalColumn: "IdActivity",
- onDelete: ReferentialAction.Cascade);
- });
-
- migrationBuilder.CreateTable(
- name: "AthleteEntityNotificationEntity",
- columns: table => new
- {
- NotificationsReceivedIdNotif = table.Column(type: "INTEGER", nullable: false),
- ReceiversIdAthlete = table.Column(type: "INTEGER", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_AthleteEntityNotificationEntity", x => new { x.NotificationsReceivedIdNotif, x.ReceiversIdAthlete });
- table.ForeignKey(
- name: "FK_AthleteEntityNotificationEntity_Athlete_ReceiversIdAthlete",
- column: x => x.ReceiversIdAthlete,
- principalTable: "Athlete",
- principalColumn: "IdAthlete",
- onDelete: ReferentialAction.Cascade);
- table.ForeignKey(
- name: "FK_AthleteEntityNotificationEntity_Notification_NotificationsReceivedIdNotif",
- column: x => x.NotificationsReceivedIdNotif,
- principalTable: "Notification",
- principalColumn: "IdNotif",
- onDelete: ReferentialAction.Cascade);
- });
-
- migrationBuilder.CreateTable(
- name: "AthleteEntityTrainingEntity",
- columns: table => new
- {
- AthletesIdAthlete = table.Column(type: "INTEGER", nullable: false),
- TrainingsAthleteIdTraining = table.Column(type: "INTEGER", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_AthleteEntityTrainingEntity", x => new { x.AthletesIdAthlete, x.TrainingsAthleteIdTraining });
- table.ForeignKey(
- name: "FK_AthleteEntityTrainingEntity_Athlete_AthletesIdAthlete",
- column: x => x.AthletesIdAthlete,
- principalTable: "Athlete",
- principalColumn: "IdAthlete",
- onDelete: ReferentialAction.Cascade);
- table.ForeignKey(
- name: "FK_AthleteEntityTrainingEntity_Training_TrainingsAthleteIdTraining",
- column: x => x.TrainingsAthleteIdTraining,
- principalTable: "Training",
- principalColumn: "IdTraining",
- onDelete: ReferentialAction.Cascade);
- });
-
- migrationBuilder.InsertData(
- table: "Athlete",
- columns: new[] { "IdAthlete", "DataSourceId", "DateOfBirth", "Email", "FirstName", "IsCoach", "LastName", "Length", "Password", "ProfilPicture", "Sexe", "Username", "Weight" },
- values: new object[,]
- {
- { 1, null, new DateOnly(1990, 1, 1), "john.doe@example.com", "John", true, "Doe", 1.8, "password123", new byte[] { 34, 85, 107, 108, 71, 82, 116, 119, 68, 65, 65, 66, 88, 82, 85, 74, 81, 86, 108, 65, 52, 73, 78, 65, 68, 65, 65, 65, 119, 69, 65, 67, 100, 65, 83, 111, 113, 65, 67, 111, 65, 65, 77, 65, 83, 74, 90, 103, 67, 100, 77, 111, 83, 67, 122, 54, 53, 53, 110, 100, 85, 52, 88, 88, 65, 80, 50, 121, 88, 73, 103, 101, 53, 110, 101, 77, 47, 81, 100, 54, 87, 67, 102, 79, 56, 101, 118, 111, 106, 50, 83, 48, 65, 47, 112, 55, 43, 102, 48, 65, 110, 56, 53, 99, 66, 120, 108, 76, 68, 103, 80, 67, 56, 106, 79, 47, 48, 110, 115, 108, 47, 49, 51, 47, 79, 56, 118, 118, 122, 106, 55, 65, 102, 56, 115, 47, 112, 51, 47, 72, 52, 70, 85, 54, 116, 100, 52, 77, 67, 119, 113, 50, 51, 122, 49, 72, 50, 117, 122, 111, 75, 73, 88, 97, 113, 74, 110, 105, 80, 73, 47, 98, 82, 77, 102, 56, 113, 122, 118, 48, 90, 112, 43, 72, 69, 49, 82, 67, 66, 119, 53, 87, 81, 49, 106, 47, 74, 111, 118, 100, 77, 49, 70, 83, 53, 50, 43, 81, 99, 97, 65, 65, 65, 47, 118, 47, 43, 78, 120, 85, 52, 68, 112, 80, 107, 51, 43, 120, 81, 80, 87, 55, 116, 99, 109, 85, 82, 83, 111, 57, 118, 67, 52, 113, 99, 43, 88, 77, 120, 78, 86, 66, 122, 69, 77, 53, 69, 56, 97, 99, 116, 68, 122, 57, 56, 103, 109, 119, 84, 88, 103, 68, 54, 50, 101, 57, 69, 109, 71, 47, 101, 114, 118, 100, 100, 50, 111, 118, 70, 70, 83, 117, 120, 89, 112, 112, 87, 108, 47, 119, 116, 97, 88, 51, 114, 107, 110, 48, 120, 114, 116, 56, 113, 79, 113, 108, 47, 53, 73, 50, 106, 102, 76, 79, 110, 67, 85, 48, 107, 65, 76, 76, 99, 87, 52, 70, 47, 119, 84, 106, 85, 49, 48, 113, 115, 120, 90, 88, 87, 57, 102, 120, 97, 117, 67, 54, 79, 80, 86, 82, 70, 50, 56, 115, 99, 57, 52, 86, 57, 111, 99, 109, 111, 83, 87, 121, 43, 115, 102, 54, 106, 87, 51, 118, 89, 107, 86, 79, 104, 43, 103, 69, 47, 82, 69, 48, 76, 54, 98, 50, 100, 51, 111, 70, 121, 72, 109, 107, 82, 74, 110, 102, 89, 119, 71, 56, 111, 51, 112, 54, 102, 118, 57, 112, 105, 118, 78, 70, 53, 97, 111, 112, 73, 66, 122, 70, 110, 106, 122, 119, 98, 47, 86, 113, 83, 113, 51, 47, 98, 43, 77, 87, 75, 70, 109, 106, 114, 56, 84, 49, 113, 101, 52, 47, 102, 73, 84, 111, 50, 118, 66, 87, 69, 113, 68, 121, 111, 103, 86, 51, 90, 86, 71, 110, 68, 86, 105, 50, 68, 98, 105, 69, 70, 86, 83, 85, 114, 50, 101, 88, 84, 78, 90, 81, 57, 86, 47, 68, 57, 81, 67, 47, 43, 118, 67, 82, 53, 84, 71, 121, 88, 57, 81, 79, 86, 66, 103, 116, 65, 89, 116, 109, 47, 90, 84, 73, 119, 122, 80, 69, 89, 66, 57, 78, 114, 86, 49, 78, 101, 79, 49, 47, 115, 65, 122, 55, 56, 117, 48, 116, 87, 53, 57, 114, 48, 73, 43, 83, 79, 53, 74, 103, 109, 51, 66, 57, 105, 49, 116, 111, 82, 117, 114, 122, 72, 118, 57, 69, 90, 74, 57, 121, 90, 76, 56, 110, 97, 102, 98, 47, 84, 49, 70, 97, 111, 80, 68, 107, 117, 74, 102, 77, 43, 105, 80, 115, 48, 106, 56, 120, 110, 83, 55, 84, 97, 85, 47, 103, 69, 75, 48, 119, 67, 120, 101, 68, 89, 82, 89, 116, 74, 120, 57, 106, 52, 104, 85, 81, 113, 55, 112, 65, 117, 47, 84, 50, 121, 87, 121, 48, 118, 106, 99, 85, 72, 107, 105, 57, 53, 50, 90, 78, 98, 88, 110, 88, 120, 66, 56, 109, 56, 112, 86, 53, 120, 57, 69, 49, 115, 102, 76, 106, 53, 77, 90, 69, 103, 112, 85, 50, 88, 86, 56, 82, 72, 114, 86, 118, 87, 110, 105, 67, 106, 115, 102, 54, 118, 103, 120, 109, 82, 55, 43, 75, 116, 119, 73, 98, 77, 106, 97, 104, 105, 116, 85, 71, 116, 72, 101, 116, 49, 87, 100, 76, 43, 56, 77, 109, 100, 76, 50, 57, 105, 81, 74, 67, 51, 55, 112, 68, 88, 105, 114, 105, 114, 49, 78, 105, 98, 120, 75, 75, 104, 70, 89, 82, 117, 74, 51, 120, 87, 57, 79, 48, 114, 57, 43, 86, 110, 104, 56, 100, 105, 113, 98, 66, 117, 88, 113, 68, 98, 89, 82, 47, 77, 83, 111, 72, 118, 115, 99, 79, 67, 109, 50, 116, 57, 53, 100, 78, 53, 87, 66, 100, 82, 85, 111, 68, 55, 89, 67, 71, 47, 90, 72, 87, 99, 55, 89, 112, 118, 47, 120, 47, 97, 108, 52, 102, 107, 66, 50, 108, 90, 108, 89, 104, 86, 87, 72, 120, 106, 97, 111, 101, 70, 57, 106, 69, 80, 73, 48, 103, 65, 78, 53, 88, 115, 118, 85, 73, 54, 104, 98, 122, 69, 122, 87, 77, 115, 78, 87, 47, 49, 111, 114, 107, 78, 79, 110, 108, 115, 107, 97, 108, 103, 109, 112, 73, 52, 66, 50, 114, 109, 52, 71, 99, 55, 76, 78, 117, 105, 43, 77, 117, 77, 66, 114, 112, 110, 66, 118, 76, 107, 98, 89, 88, 57, 101, 120, 101, 57, 103, 56, 116, 117, 55, 119, 76, 116, 55, 83, 99, 79, 106, 68, 99, 76, 57, 57, 111, 79, 121, 82, 56, 57, 77, 104, 57, 76, 56, 114, 100, 52, 43, 52, 51, 43, 74, 81, 121, 82, 54, 116, 115, 73, 102, 99, 80, 74, 111, 54, 84, 54, 70, 120, 72, 102, 49, 49, 100, 47, 77, 71, 97, 121, 74, 105, 43, 83, 87, 99, 116, 47, 117, 104, 118, 118, 117, 97, 48, 111, 79, 104, 43, 122, 88, 78, 73, 97, 85, 122, 103, 111, 66, 109, 117, 49, 88, 85, 76, 106, 107, 112, 117, 65, 48, 71, 104, 122, 99, 116, 102, 51, 48, 106, 98, 89, 49, 65, 79, 77, 52, 57, 113, 98, 77, 90, 82, 89, 83, 57, 65, 43, 48, 83, 49, 72, 114, 72, 80, 110, 119, 82, 118, 112, 81, 89, 47, 83, 106, 52, 120, 75, 80, 110, 48, 103, 100, 112, 118, 47, 43, 105, 84, 98, 75, 74, 98, 56, 122, 107, 80, 67, 52, 47, 57, 97, 102, 48, 74, 118, 101, 115, 97, 43, 71, 68, 71, 48, 47, 105, 119, 51, 84, 115, 119, 101, 110, 77, 104, 113, 108, 104, 55, 66, 77, 57, 77, 87, 53, 116, 120, 112, 101, 98, 108, 115, 66, 121, 120, 52, 87, 110, 74, 47, 111, 72, 118, 54, 99, 99, 48, 100, 109, 77, 55, 116, 115, 86, 51, 54, 108, 89, 107, 67, 84, 85, 88, 69, 102, 47, 48, 101, 75, 108, 110, 102, 105, 118, 110, 78, 48, 103, 49, 103, 43, 106, 47, 76, 107, 57, 101, 116, 47, 117, 111, 97, 54, 84, 70, 67, 87, 48, 72, 103, 119, 70, 79, 73, 86, 70, 117, 109, 69, 89, 100, 84, 54, 55, 53, 80, 102, 117, 84, 114, 89, 79, 53, 111, 56, 90, 114, 87, 69, 73, 72, 116, 118, 50, 67, 116, 108, 114, 118, 57, 74, 51, 84, 114, 115, 108, 68, 47, 105, 75, 69, 119, 116, 105, 112, 71, 72, 116, 110, 48, 86, 97, 107, 56, 66, 57, 119, 76, 76, 43, 107, 122, 43, 67, 73, 81, 47, 86, 71, 52, 75, 74, 112, 88, 106, 120, 56, 56, 67, 101, 67, 67, 52, 88, 97, 71, 105, 116, 69, 100, 106, 65, 65, 65, 34 }, "M", "Doe", 75f },
- { 3, null, new DateOnly(1992, 1, 1), "paul.martin@example.com", "Paul", true, "Martin", 1.75, "super789", new byte[] { 34, 85, 107, 108, 71, 82, 116, 119, 68, 65, 65, 66, 88, 82, 85, 74, 81, 86, 108, 65, 52, 73, 78, 65, 68, 65, 65, 65, 119, 69, 65, 67, 100, 65, 83, 111, 113, 65, 67, 111, 65, 65, 77, 65, 83, 74, 90, 103, 67, 100, 77, 111, 83, 67, 122, 54, 53, 53, 110, 100, 85, 52, 88, 88, 65, 80, 50, 121, 88, 73, 103, 101, 53, 110, 101, 77, 47, 81, 100, 54, 87, 67, 102, 79, 56, 101, 118, 111, 106, 50, 83, 48, 65, 47, 112, 55, 43, 102, 48, 65, 110, 56, 53, 99, 66, 120, 108, 76, 68, 103, 80, 67, 56, 106, 79, 47, 48, 110, 115, 108, 47, 49, 51, 47, 79, 56, 118, 118, 122, 106, 55, 65, 102, 56, 115, 47, 112, 51, 47, 72, 52, 70, 85, 54, 116, 100, 52, 77, 67, 119, 113, 50, 51, 122, 49, 72, 50, 117, 122, 111, 75, 73, 88, 97, 113, 74, 110, 105, 80, 73, 47, 98, 82, 77, 102, 56, 113, 122, 118, 48, 90, 112, 43, 72, 69, 49, 82, 67, 66, 119, 53, 87, 81, 49, 106, 47, 74, 111, 118, 100, 77, 49, 70, 83, 53, 50, 43, 81, 99, 97, 65, 65, 65, 47, 118, 47, 43, 78, 120, 85, 52, 68, 112, 80, 107, 51, 43, 120, 81, 80, 87, 55, 116, 99, 109, 85, 82, 83, 111, 57, 118, 67, 52, 113, 99, 43, 88, 77, 120, 78, 86, 66, 122, 69, 77, 53, 69, 56, 97, 99, 116, 68, 122, 57, 56, 103, 109, 119, 84, 88, 103, 68, 54, 50, 101, 57, 69, 109, 71, 47, 101, 114, 118, 100, 100, 50, 111, 118, 70, 70, 83, 117, 120, 89, 112, 112, 87, 108, 47, 119, 116, 97, 88, 51, 114, 107, 110, 48, 120, 114, 116, 56, 113, 79, 113, 108, 47, 53, 73, 50, 106, 102, 76, 79, 110, 67, 85, 48, 107, 65, 76, 76, 99, 87, 52, 70, 47, 119, 84, 106, 85, 49, 48, 113, 115, 120, 90, 88, 87, 57, 102, 120, 97, 117, 67, 54, 79, 80, 86, 82, 70, 50, 56, 115, 99, 57, 52, 86, 57, 111, 99, 109, 111, 83, 87, 121, 43, 115, 102, 54, 106, 87, 51, 118, 89, 107, 86, 79, 104, 43, 103, 69, 47, 82, 69, 48, 76, 54, 98, 50, 100, 51, 111, 70, 121, 72, 109, 107, 82, 74, 110, 102, 89, 119, 71, 56, 111, 51, 112, 54, 102, 118, 57, 112, 105, 118, 78, 70, 53, 97, 111, 112, 73, 66, 122, 70, 110, 106, 122, 119, 98, 47, 86, 113, 83, 113, 51, 47, 98, 43, 77, 87, 75, 70, 109, 106, 114, 56, 84, 49, 113, 101, 52, 47, 102, 73, 84, 111, 50, 118, 66, 87, 69, 113, 68, 121, 111, 103, 86, 51, 90, 86, 71, 110, 68, 86, 105, 50, 68, 98, 105, 69, 70, 86, 83, 85, 114, 50, 101, 88, 84, 78, 90, 81, 57, 86, 47, 68, 57, 81, 67, 47, 43, 118, 67, 82, 53, 84, 71, 121, 88, 57, 81, 79, 86, 66, 103, 116, 65, 89, 116, 109, 47, 90, 84, 73, 119, 122, 80, 69, 89, 66, 57, 78, 114, 86, 49, 78, 101, 79, 49, 47, 115, 65, 122, 55, 56, 117, 48, 116, 87, 53, 57, 114, 48, 73, 43, 83, 79, 53, 74, 103, 109, 51, 66, 57, 105, 49, 116, 111, 82, 117, 114, 122, 72, 118, 57, 69, 90, 74, 57, 121, 90, 76, 56, 110, 97, 102, 98, 47, 84, 49, 70, 97, 111, 80, 68, 107, 117, 74, 102, 77, 43, 105, 80, 115, 48, 106, 56, 120, 110, 83, 55, 84, 97, 85, 47, 103, 69, 75, 48, 119, 67, 120, 101, 68, 89, 82, 89, 116, 74, 120, 57, 106, 52, 104, 85, 81, 113, 55, 112, 65, 117, 47, 84, 50, 121, 87, 121, 48, 118, 106, 99, 85, 72, 107, 105, 57, 53, 50, 90, 78, 98, 88, 110, 88, 120, 66, 56, 109, 56, 112, 86, 53, 120, 57, 69, 49, 115, 102, 76, 106, 53, 77, 90, 69, 103, 112, 85, 50, 88, 86, 56, 82, 72, 114, 86, 118, 87, 110, 105, 67, 106, 115, 102, 54, 118, 103, 120, 109, 82, 55, 43, 75, 116, 119, 73, 98, 77, 106, 97, 104, 105, 116, 85, 71, 116, 72, 101, 116, 49, 87, 100, 76, 43, 56, 77, 109, 100, 76, 50, 57, 105, 81, 74, 67, 51, 55, 112, 68, 88, 105, 114, 105, 114, 49, 78, 105, 98, 120, 75, 75, 104, 70, 89, 82, 117, 74, 51, 120, 87, 57, 79, 48, 114, 57, 43, 86, 110, 104, 56, 100, 105, 113, 98, 66, 117, 88, 113, 68, 98, 89, 82, 47, 77, 83, 111, 72, 118, 115, 99, 79, 67, 109, 50, 116, 57, 53, 100, 78, 53, 87, 66, 100, 82, 85, 111, 68, 55, 89, 67, 71, 47, 90, 72, 87, 99, 55, 89, 112, 118, 47, 120, 47, 97, 108, 52, 102, 107, 66, 50, 108, 90, 108, 89, 104, 86, 87, 72, 120, 106, 97, 111, 101, 70, 57, 106, 69, 80, 73, 48, 103, 65, 78, 53, 88, 115, 118, 85, 73, 54, 104, 98, 122, 69, 122, 87, 77, 115, 78, 87, 47, 49, 111, 114, 107, 78, 79, 110, 108, 115, 107, 97, 108, 103, 109, 112, 73, 52, 66, 50, 114, 109, 52, 71, 99, 55, 76, 78, 117, 105, 43, 77, 117, 77, 66, 114, 112, 110, 66, 118, 76, 107, 98, 89, 88, 57, 101, 120, 101, 57, 103, 56, 116, 117, 55, 119, 76, 116, 55, 83, 99, 79, 106, 68, 99, 76, 57, 57, 111, 79, 121, 82, 56, 57, 77, 104, 57, 76, 56, 114, 100, 52, 43, 52, 51, 43, 74, 81, 121, 82, 54, 116, 115, 73, 102, 99, 80, 74, 111, 54, 84, 54, 70, 120, 72, 102, 49, 49, 100, 47, 77, 71, 97, 121, 74, 105, 43, 83, 87, 99, 116, 47, 117, 104, 118, 118, 117, 97, 48, 111, 79, 104, 43, 122, 88, 78, 73, 97, 85, 122, 103, 111, 66, 109, 117, 49, 88, 85, 76, 106, 107, 112, 117, 65, 48, 71, 104, 122, 99, 116, 102, 51, 48, 106, 98, 89, 49, 65, 79, 77, 52, 57, 113, 98, 77, 90, 82, 89, 83, 57, 65, 43, 48, 83, 49, 72, 114, 72, 80, 110, 119, 82, 118, 112, 81, 89, 47, 83, 106, 52, 120, 75, 80, 110, 48, 103, 100, 112, 118, 47, 43, 105, 84, 98, 75, 74, 98, 56, 122, 107, 80, 67, 52, 47, 57, 97, 102, 48, 74, 118, 101, 115, 97, 43, 71, 68, 71, 48, 47, 105, 119, 51, 84, 115, 119, 101, 110, 77, 104, 113, 108, 104, 55, 66, 77, 57, 77, 87, 53, 116, 120, 112, 101, 98, 108, 115, 66, 121, 120, 52, 87, 110, 74, 47, 111, 72, 118, 54, 99, 99, 48, 100, 109, 77, 55, 116, 115, 86, 51, 54, 108, 89, 107, 67, 84, 85, 88, 69, 102, 47, 48, 101, 75, 108, 110, 102, 105, 118, 110, 78, 48, 103, 49, 103, 43, 106, 47, 76, 107, 57, 101, 116, 47, 117, 111, 97, 54, 84, 70, 67, 87, 48, 72, 103, 119, 70, 79, 73, 86, 70, 117, 109, 69, 89, 100, 84, 54, 55, 53, 80, 102, 117, 84, 114, 89, 79, 53, 111, 56, 90, 114, 87, 69, 73, 72, 116, 118, 50, 67, 116, 108, 114, 118, 57, 74, 51, 84, 114, 115, 108, 68, 47, 105, 75, 69, 119, 116, 105, 112, 71, 72, 116, 110, 48, 86, 97, 107, 56, 66, 57, 119, 76, 76, 43, 107, 122, 43, 67, 73, 81, 47, 86, 71, 52, 75, 74, 112, 88, 106, 120, 56, 56, 67, 101, 67, 67, 52, 88, 97, 71, 105, 116, 69, 100, 106, 65, 65, 65, 34 }, "M", "Martin", 68f },
- { 4, null, new DateOnly(1993, 1, 1), "anna.brown@example.com", "Anna", false, "Brown", 1.7, "test000", new byte[] { 34, 85, 107, 108, 71, 82, 116, 119, 68, 65, 65, 66, 88, 82, 85, 74, 81, 86, 108, 65, 52, 73, 78, 65, 68, 65, 65, 65, 119, 69, 65, 67, 100, 65, 83, 111, 113, 65, 67, 111, 65, 65, 77, 65, 83, 74, 90, 103, 67, 100, 77, 111, 83, 67, 122, 54, 53, 53, 110, 100, 85, 52, 88, 88, 65, 80, 50, 121, 88, 73, 103, 101, 53, 110, 101, 77, 47, 81, 100, 54, 87, 67, 102, 79, 56, 101, 118, 111, 106, 50, 83, 48, 65, 47, 112, 55, 43, 102, 48, 65, 110, 56, 53, 99, 66, 120, 108, 76, 68, 103, 80, 67, 56, 106, 79, 47, 48, 110, 115, 108, 47, 49, 51, 47, 79, 56, 118, 118, 122, 106, 55, 65, 102, 56, 115, 47, 112, 51, 47, 72, 52, 70, 85, 54, 116, 100, 52, 77, 67, 119, 113, 50, 51, 122, 49, 72, 50, 117, 122, 111, 75, 73, 88, 97, 113, 74, 110, 105, 80, 73, 47, 98, 82, 77, 102, 56, 113, 122, 118, 48, 90, 112, 43, 72, 69, 49, 82, 67, 66, 119, 53, 87, 81, 49, 106, 47, 74, 111, 118, 100, 77, 49, 70, 83, 53, 50, 43, 81, 99, 97, 65, 65, 65, 47, 118, 47, 43, 78, 120, 85, 52, 68, 112, 80, 107, 51, 43, 120, 81, 80, 87, 55, 116, 99, 109, 85, 82, 83, 111, 57, 118, 67, 52, 113, 99, 43, 88, 77, 120, 78, 86, 66, 122, 69, 77, 53, 69, 56, 97, 99, 116, 68, 122, 57, 56, 103, 109, 119, 84, 88, 103, 68, 54, 50, 101, 57, 69, 109, 71, 47, 101, 114, 118, 100, 100, 50, 111, 118, 70, 70, 83, 117, 120, 89, 112, 112, 87, 108, 47, 119, 116, 97, 88, 51, 114, 107, 110, 48, 120, 114, 116, 56, 113, 79, 113, 108, 47, 53, 73, 50, 106, 102, 76, 79, 110, 67, 85, 48, 107, 65, 76, 76, 99, 87, 52, 70, 47, 119, 84, 106, 85, 49, 48, 113, 115, 120, 90, 88, 87, 57, 102, 120, 97, 117, 67, 54, 79, 80, 86, 82, 70, 50, 56, 115, 99, 57, 52, 86, 57, 111, 99, 109, 111, 83, 87, 121, 43, 115, 102, 54, 106, 87, 51, 118, 89, 107, 86, 79, 104, 43, 103, 69, 47, 82, 69, 48, 76, 54, 98, 50, 100, 51, 111, 70, 121, 72, 109, 107, 82, 74, 110, 102, 89, 119, 71, 56, 111, 51, 112, 54, 102, 118, 57, 112, 105, 118, 78, 70, 53, 97, 111, 112, 73, 66, 122, 70, 110, 106, 122, 119, 98, 47, 86, 113, 83, 113, 51, 47, 98, 43, 77, 87, 75, 70, 109, 106, 114, 56, 84, 49, 113, 101, 52, 47, 102, 73, 84, 111, 50, 118, 66, 87, 69, 113, 68, 121, 111, 103, 86, 51, 90, 86, 71, 110, 68, 86, 105, 50, 68, 98, 105, 69, 70, 86, 83, 85, 114, 50, 101, 88, 84, 78, 90, 81, 57, 86, 47, 68, 57, 81, 67, 47, 43, 118, 67, 82, 53, 84, 71, 121, 88, 57, 81, 79, 86, 66, 103, 116, 65, 89, 116, 109, 47, 90, 84, 73, 119, 122, 80, 69, 89, 66, 57, 78, 114, 86, 49, 78, 101, 79, 49, 47, 115, 65, 122, 55, 56, 117, 48, 116, 87, 53, 57, 114, 48, 73, 43, 83, 79, 53, 74, 103, 109, 51, 66, 57, 105, 49, 116, 111, 82, 117, 114, 122, 72, 118, 57, 69, 90, 74, 57, 121, 90, 76, 56, 110, 97, 102, 98, 47, 84, 49, 70, 97, 111, 80, 68, 107, 117, 74, 102, 77, 43, 105, 80, 115, 48, 106, 56, 120, 110, 83, 55, 84, 97, 85, 47, 103, 69, 75, 48, 119, 67, 120, 101, 68, 89, 82, 89, 116, 74, 120, 57, 106, 52, 104, 85, 81, 113, 55, 112, 65, 117, 47, 84, 50, 121, 87, 121, 48, 118, 106, 99, 85, 72, 107, 105, 57, 53, 50, 90, 78, 98, 88, 110, 88, 120, 66, 56, 109, 56, 112, 86, 53, 120, 57, 69, 49, 115, 102, 76, 106, 53, 77, 90, 69, 103, 112, 85, 50, 88, 86, 56, 82, 72, 114, 86, 118, 87, 110, 105, 67, 106, 115, 102, 54, 118, 103, 120, 109, 82, 55, 43, 75, 116, 119, 73, 98, 77, 106, 97, 104, 105, 116, 85, 71, 116, 72, 101, 116, 49, 87, 100, 76, 43, 56, 77, 109, 100, 76, 50, 57, 105, 81, 74, 67, 51, 55, 112, 68, 88, 105, 114, 105, 114, 49, 78, 105, 98, 120, 75, 75, 104, 70, 89, 82, 117, 74, 51, 120, 87, 57, 79, 48, 114, 57, 43, 86, 110, 104, 56, 100, 105, 113, 98, 66, 117, 88, 113, 68, 98, 89, 82, 47, 77, 83, 111, 72, 118, 115, 99, 79, 67, 109, 50, 116, 57, 53, 100, 78, 53, 87, 66, 100, 82, 85, 111, 68, 55, 89, 67, 71, 47, 90, 72, 87, 99, 55, 89, 112, 118, 47, 120, 47, 97, 108, 52, 102, 107, 66, 50, 108, 90, 108, 89, 104, 86, 87, 72, 120, 106, 97, 111, 101, 70, 57, 106, 69, 80, 73, 48, 103, 65, 78, 53, 88, 115, 118, 85, 73, 54, 104, 98, 122, 69, 122, 87, 77, 115, 78, 87, 47, 49, 111, 114, 107, 78, 79, 110, 108, 115, 107, 97, 108, 103, 109, 112, 73, 52, 66, 50, 114, 109, 52, 71, 99, 55, 76, 78, 117, 105, 43, 77, 117, 77, 66, 114, 112, 110, 66, 118, 76, 107, 98, 89, 88, 57, 101, 120, 101, 57, 103, 56, 116, 117, 55, 119, 76, 116, 55, 83, 99, 79, 106, 68, 99, 76, 57, 57, 111, 79, 121, 82, 56, 57, 77, 104, 57, 76, 56, 114, 100, 52, 43, 52, 51, 43, 74, 81, 121, 82, 54, 116, 115, 73, 102, 99, 80, 74, 111, 54, 84, 54, 70, 120, 72, 102, 49, 49, 100, 47, 77, 71, 97, 121, 74, 105, 43, 83, 87, 99, 116, 47, 117, 104, 118, 118, 117, 97, 48, 111, 79, 104, 43, 122, 88, 78, 73, 97, 85, 122, 103, 111, 66, 109, 117, 49, 88, 85, 76, 106, 107, 112, 117, 65, 48, 71, 104, 122, 99, 116, 102, 51, 48, 106, 98, 89, 49, 65, 79, 77, 52, 57, 113, 98, 77, 90, 82, 89, 83, 57, 65, 43, 48, 83, 49, 72, 114, 72, 80, 110, 119, 82, 118, 112, 81, 89, 47, 83, 106, 52, 120, 75, 80, 110, 48, 103, 100, 112, 118, 47, 43, 105, 84, 98, 75, 74, 98, 56, 122, 107, 80, 67, 52, 47, 57, 97, 102, 48, 74, 118, 101, 115, 97, 43, 71, 68, 71, 48, 47, 105, 119, 51, 84, 115, 119, 101, 110, 77, 104, 113, 108, 104, 55, 66, 77, 57, 77, 87, 53, 116, 120, 112, 101, 98, 108, 115, 66, 121, 120, 52, 87, 110, 74, 47, 111, 72, 118, 54, 99, 99, 48, 100, 109, 77, 55, 116, 115, 86, 51, 54, 108, 89, 107, 67, 84, 85, 88, 69, 102, 47, 48, 101, 75, 108, 110, 102, 105, 118, 110, 78, 48, 103, 49, 103, 43, 106, 47, 76, 107, 57, 101, 116, 47, 117, 111, 97, 54, 84, 70, 67, 87, 48, 72, 103, 119, 70, 79, 73, 86, 70, 117, 109, 69, 89, 100, 84, 54, 55, 53, 80, 102, 117, 84, 114, 89, 79, 53, 111, 56, 90, 114, 87, 69, 73, 72, 116, 118, 50, 67, 116, 108, 114, 118, 57, 74, 51, 84, 114, 115, 108, 68, 47, 105, 75, 69, 119, 116, 105, 112, 71, 72, 116, 110, 48, 86, 97, 107, 56, 66, 57, 119, 76, 76, 43, 107, 122, 43, 67, 73, 81, 47, 86, 71, 52, 75, 74, 112, 88, 106, 120, 56, 56, 67, 101, 67, 67, 52, 88, 97, 71, 105, 116, 69, 100, 106, 65, 65, 65, 34 }, "F", "Brown", 58f }
- });
-
- migrationBuilder.InsertData(
- table: "DataSource",
- columns: new[] { "IdSource", "Model", "Precision", "Type" },
- values: new object[,]
- {
- { 1, "Garmin", 0.5f, "Smartwatch" },
- { 2, "Polar", 0.5f, "Smartwatch" },
- { 3, "Suunto", 0.5f, "Smartwatch" },
- { 4, "Fitbit", 0.5f, "Smartwatch" },
- { 5, "Apple Watch", 0.5f, "Smartwatch" }
- });
-
- migrationBuilder.InsertData(
- table: "Activity",
- columns: new[] { "IdActivity", "AthleteId", "Average", "AverageTemperature", "DataSourceId", "Date", "EffortFelt", "EndTime", "HasAutoPause", "Maximum", "Minimum", "StandardDeviation", "StartTime", "Type", "Variability", "Variance" },
- values: new object[,]
- {
- { 1, 1, 0.5f, 20f, 1, new DateOnly(2023, 1, 10), 5, new TimeOnly(14, 0, 22), false, 0, 0, 0.5f, new TimeOnly(13, 0, 34), "Running", 0.5f, 0.5f },
- { 3, 1, 0.5f, 20f, 1, new DateOnly(2023, 12, 10), 5, new TimeOnly(15, 2, 22), false, 0, 0, 0.5f, new TimeOnly(13, 30, 34), "Swimming", 0.5f, 0.5f },
- { 5, 4, 0.5f, 20f, 4, new DateOnly(2024, 1, 12), 5, new TimeOnly(9, 0, 22), false, 0, 0, 0.5f, new TimeOnly(7, 45, 34), "Hiking", 0.5f, 0.5f },
- { 6, 4, 0.5f, 20f, 4, new DateOnly(2024, 1, 27), 5, new TimeOnly(14, 0, 22), false, 0, 0, 0.5f, new TimeOnly(13, 30, 1), "Climbing", 0.5f, 0.5f },
- { 7, 3, 0.5f, 20f, 5, new DateOnly(2024, 2, 22), 5, new TimeOnly(23, 50, 58), false, 0, 0, 0.5f, new TimeOnly(22, 0, 34), "Yoga", 0.5f, 0.5f }
- });
-
- migrationBuilder.InsertData(
- table: "Athlete",
- columns: new[] { "IdAthlete", "DataSourceId", "DateOfBirth", "Email", "FirstName", "IsCoach", "LastName", "Length", "Password", "ProfilPicture", "Sexe", "Username", "Weight" },
- values: new object[,]
- {
- { 2, 1, new DateOnly(1995, 1, 1), "jane.smith@exemple.com", "Jane", false, "Smith", 1.6499999999999999, "secure456", new byte[] { 34, 85, 107, 108, 71, 82, 116, 119, 68, 65, 65, 66, 88, 82, 85, 74, 81, 86, 108, 65, 52, 73, 78, 65, 68, 65, 65, 65, 119, 69, 65, 67, 100, 65, 83, 111, 113, 65, 67, 111, 65, 65, 77, 65, 83, 74, 90, 103, 67, 100, 77, 111, 83, 67, 122, 54, 53, 53, 110, 100, 85, 52, 88, 88, 65, 80, 50, 121, 88, 73, 103, 101, 53, 110, 101, 77, 47, 81, 100, 54, 87, 67, 102, 79, 56, 101, 118, 111, 106, 50, 83, 48, 65, 47, 112, 55, 43, 102, 48, 65, 110, 56, 53, 99, 66, 120, 108, 76, 68, 103, 80, 67, 56, 106, 79, 47, 48, 110, 115, 108, 47, 49, 51, 47, 79, 56, 118, 118, 122, 106, 55, 65, 102, 56, 115, 47, 112, 51, 47, 72, 52, 70, 85, 54, 116, 100, 52, 77, 67, 119, 113, 50, 51, 122, 49, 72, 50, 117, 122, 111, 75, 73, 88, 97, 113, 74, 110, 105, 80, 73, 47, 98, 82, 77, 102, 56, 113, 122, 118, 48, 90, 112, 43, 72, 69, 49, 82, 67, 66, 119, 53, 87, 81, 49, 106, 47, 74, 111, 118, 100, 77, 49, 70, 83, 53, 50, 43, 81, 99, 97, 65, 65, 65, 47, 118, 47, 43, 78, 120, 85, 52, 68, 112, 80, 107, 51, 43, 120, 81, 80, 87, 55, 116, 99, 109, 85, 82, 83, 111, 57, 118, 67, 52, 113, 99, 43, 88, 77, 120, 78, 86, 66, 122, 69, 77, 53, 69, 56, 97, 99, 116, 68, 122, 57, 56, 103, 109, 119, 84, 88, 103, 68, 54, 50, 101, 57, 69, 109, 71, 47, 101, 114, 118, 100, 100, 50, 111, 118, 70, 70, 83, 117, 120, 89, 112, 112, 87, 108, 47, 119, 116, 97, 88, 51, 114, 107, 110, 48, 120, 114, 116, 56, 113, 79, 113, 108, 47, 53, 73, 50, 106, 102, 76, 79, 110, 67, 85, 48, 107, 65, 76, 76, 99, 87, 52, 70, 47, 119, 84, 106, 85, 49, 48, 113, 115, 120, 90, 88, 87, 57, 102, 120, 97, 117, 67, 54, 79, 80, 86, 82, 70, 50, 56, 115, 99, 57, 52, 86, 57, 111, 99, 109, 111, 83, 87, 121, 43, 115, 102, 54, 106, 87, 51, 118, 89, 107, 86, 79, 104, 43, 103, 69, 47, 82, 69, 48, 76, 54, 98, 50, 100, 51, 111, 70, 121, 72, 109, 107, 82, 74, 110, 102, 89, 119, 71, 56, 111, 51, 112, 54, 102, 118, 57, 112, 105, 118, 78, 70, 53, 97, 111, 112, 73, 66, 122, 70, 110, 106, 122, 119, 98, 47, 86, 113, 83, 113, 51, 47, 98, 43, 77, 87, 75, 70, 109, 106, 114, 56, 84, 49, 113, 101, 52, 47, 102, 73, 84, 111, 50, 118, 66, 87, 69, 113, 68, 121, 111, 103, 86, 51, 90, 86, 71, 110, 68, 86, 105, 50, 68, 98, 105, 69, 70, 86, 83, 85, 114, 50, 101, 88, 84, 78, 90, 81, 57, 86, 47, 68, 57, 81, 67, 47, 43, 118, 67, 82, 53, 84, 71, 121, 88, 57, 81, 79, 86, 66, 103, 116, 65, 89, 116, 109, 47, 90, 84, 73, 119, 122, 80, 69, 89, 66, 57, 78, 114, 86, 49, 78, 101, 79, 49, 47, 115, 65, 122, 55, 56, 117, 48, 116, 87, 53, 57, 114, 48, 73, 43, 83, 79, 53, 74, 103, 109, 51, 66, 57, 105, 49, 116, 111, 82, 117, 114, 122, 72, 118, 57, 69, 90, 74, 57, 121, 90, 76, 56, 110, 97, 102, 98, 47, 84, 49, 70, 97, 111, 80, 68, 107, 117, 74, 102, 77, 43, 105, 80, 115, 48, 106, 56, 120, 110, 83, 55, 84, 97, 85, 47, 103, 69, 75, 48, 119, 67, 120, 101, 68, 89, 82, 89, 116, 74, 120, 57, 106, 52, 104, 85, 81, 113, 55, 112, 65, 117, 47, 84, 50, 121, 87, 121, 48, 118, 106, 99, 85, 72, 107, 105, 57, 53, 50, 90, 78, 98, 88, 110, 88, 120, 66, 56, 109, 56, 112, 86, 53, 120, 57, 69, 49, 115, 102, 76, 106, 53, 77, 90, 69, 103, 112, 85, 50, 88, 86, 56, 82, 72, 114, 86, 118, 87, 110, 105, 67, 106, 115, 102, 54, 118, 103, 120, 109, 82, 55, 43, 75, 116, 119, 73, 98, 77, 106, 97, 104, 105, 116, 85, 71, 116, 72, 101, 116, 49, 87, 100, 76, 43, 56, 77, 109, 100, 76, 50, 57, 105, 81, 74, 67, 51, 55, 112, 68, 88, 105, 114, 105, 114, 49, 78, 105, 98, 120, 75, 75, 104, 70, 89, 82, 117, 74, 51, 120, 87, 57, 79, 48, 114, 57, 43, 86, 110, 104, 56, 100, 105, 113, 98, 66, 117, 88, 113, 68, 98, 89, 82, 47, 77, 83, 111, 72, 118, 115, 99, 79, 67, 109, 50, 116, 57, 53, 100, 78, 53, 87, 66, 100, 82, 85, 111, 68, 55, 89, 67, 71, 47, 90, 72, 87, 99, 55, 89, 112, 118, 47, 120, 47, 97, 108, 52, 102, 107, 66, 50, 108, 90, 108, 89, 104, 86, 87, 72, 120, 106, 97, 111, 101, 70, 57, 106, 69, 80, 73, 48, 103, 65, 78, 53, 88, 115, 118, 85, 73, 54, 104, 98, 122, 69, 122, 87, 77, 115, 78, 87, 47, 49, 111, 114, 107, 78, 79, 110, 108, 115, 107, 97, 108, 103, 109, 112, 73, 52, 66, 50, 114, 109, 52, 71, 99, 55, 76, 78, 117, 105, 43, 77, 117, 77, 66, 114, 112, 110, 66, 118, 76, 107, 98, 89, 88, 57, 101, 120, 101, 57, 103, 56, 116, 117, 55, 119, 76, 116, 55, 83, 99, 79, 106, 68, 99, 76, 57, 57, 111, 79, 121, 82, 56, 57, 77, 104, 57, 76, 56, 114, 100, 52, 43, 52, 51, 43, 74, 81, 121, 82, 54, 116, 115, 73, 102, 99, 80, 74, 111, 54, 84, 54, 70, 120, 72, 102, 49, 49, 100, 47, 77, 71, 97, 121, 74, 105, 43, 83, 87, 99, 116, 47, 117, 104, 118, 118, 117, 97, 48, 111, 79, 104, 43, 122, 88, 78, 73, 97, 85, 122, 103, 111, 66, 109, 117, 49, 88, 85, 76, 106, 107, 112, 117, 65, 48, 71, 104, 122, 99, 116, 102, 51, 48, 106, 98, 89, 49, 65, 79, 77, 52, 57, 113, 98, 77, 90, 82, 89, 83, 57, 65, 43, 48, 83, 49, 72, 114, 72, 80, 110, 119, 82, 118, 112, 81, 89, 47, 83, 106, 52, 120, 75, 80, 110, 48, 103, 100, 112, 118, 47, 43, 105, 84, 98, 75, 74, 98, 56, 122, 107, 80, 67, 52, 47, 57, 97, 102, 48, 74, 118, 101, 115, 97, 43, 71, 68, 71, 48, 47, 105, 119, 51, 84, 115, 119, 101, 110, 77, 104, 113, 108, 104, 55, 66, 77, 57, 77, 87, 53, 116, 120, 112, 101, 98, 108, 115, 66, 121, 120, 52, 87, 110, 74, 47, 111, 72, 118, 54, 99, 99, 48, 100, 109, 77, 55, 116, 115, 86, 51, 54, 108, 89, 107, 67, 84, 85, 88, 69, 102, 47, 48, 101, 75, 108, 110, 102, 105, 118, 110, 78, 48, 103, 49, 103, 43, 106, 47, 76, 107, 57, 101, 116, 47, 117, 111, 97, 54, 84, 70, 67, 87, 48, 72, 103, 119, 70, 79, 73, 86, 70, 117, 109, 69, 89, 100, 84, 54, 55, 53, 80, 102, 117, 84, 114, 89, 79, 53, 111, 56, 90, 114, 87, 69, 73, 72, 116, 118, 50, 67, 116, 108, 114, 118, 57, 74, 51, 84, 114, 115, 108, 68, 47, 105, 75, 69, 119, 116, 105, 112, 71, 72, 116, 110, 48, 86, 97, 107, 56, 66, 57, 119, 76, 76, 43, 107, 122, 43, 67, 73, 81, 47, 86, 71, 52, 75, 74, 112, 88, 106, 120, 56, 56, 67, 101, 67, 67, 52, 88, 97, 71, 105, 116, 69, 100, 106, 65, 65, 65, 34 }, "F", "Smith", 60f },
- { 5, 3, new DateOnly(1991, 1, 1), "bruce.lee@example.com", "Bruce", false, "Lee", 2.0, "hello321", new byte[] { 34, 85, 107, 108, 71, 82, 116, 119, 68, 65, 65, 66, 88, 82, 85, 74, 81, 86, 108, 65, 52, 73, 78, 65, 68, 65, 65, 65, 119, 69, 65, 67, 100, 65, 83, 111, 113, 65, 67, 111, 65, 65, 77, 65, 83, 74, 90, 103, 67, 100, 77, 111, 83, 67, 122, 54, 53, 53, 110, 100, 85, 52, 88, 88, 65, 80, 50, 121, 88, 73, 103, 101, 53, 110, 101, 77, 47, 81, 100, 54, 87, 67, 102, 79, 56, 101, 118, 111, 106, 50, 83, 48, 65, 47, 112, 55, 43, 102, 48, 65, 110, 56, 53, 99, 66, 120, 108, 76, 68, 103, 80, 67, 56, 106, 79, 47, 48, 110, 115, 108, 47, 49, 51, 47, 79, 56, 118, 118, 122, 106, 55, 65, 102, 56, 115, 47, 112, 51, 47, 72, 52, 70, 85, 54, 116, 100, 52, 77, 67, 119, 113, 50, 51, 122, 49, 72, 50, 117, 122, 111, 75, 73, 88, 97, 113, 74, 110, 105, 80, 73, 47, 98, 82, 77, 102, 56, 113, 122, 118, 48, 90, 112, 43, 72, 69, 49, 82, 67, 66, 119, 53, 87, 81, 49, 106, 47, 74, 111, 118, 100, 77, 49, 70, 83, 53, 50, 43, 81, 99, 97, 65, 65, 65, 47, 118, 47, 43, 78, 120, 85, 52, 68, 112, 80, 107, 51, 43, 120, 81, 80, 87, 55, 116, 99, 109, 85, 82, 83, 111, 57, 118, 67, 52, 113, 99, 43, 88, 77, 120, 78, 86, 66, 122, 69, 77, 53, 69, 56, 97, 99, 116, 68, 122, 57, 56, 103, 109, 119, 84, 88, 103, 68, 54, 50, 101, 57, 69, 109, 71, 47, 101, 114, 118, 100, 100, 50, 111, 118, 70, 70, 83, 117, 120, 89, 112, 112, 87, 108, 47, 119, 116, 97, 88, 51, 114, 107, 110, 48, 120, 114, 116, 56, 113, 79, 113, 108, 47, 53, 73, 50, 106, 102, 76, 79, 110, 67, 85, 48, 107, 65, 76, 76, 99, 87, 52, 70, 47, 119, 84, 106, 85, 49, 48, 113, 115, 120, 90, 88, 87, 57, 102, 120, 97, 117, 67, 54, 79, 80, 86, 82, 70, 50, 56, 115, 99, 57, 52, 86, 57, 111, 99, 109, 111, 83, 87, 121, 43, 115, 102, 54, 106, 87, 51, 118, 89, 107, 86, 79, 104, 43, 103, 69, 47, 82, 69, 48, 76, 54, 98, 50, 100, 51, 111, 70, 121, 72, 109, 107, 82, 74, 110, 102, 89, 119, 71, 56, 111, 51, 112, 54, 102, 118, 57, 112, 105, 118, 78, 70, 53, 97, 111, 112, 73, 66, 122, 70, 110, 106, 122, 119, 98, 47, 86, 113, 83, 113, 51, 47, 98, 43, 77, 87, 75, 70, 109, 106, 114, 56, 84, 49, 113, 101, 52, 47, 102, 73, 84, 111, 50, 118, 66, 87, 69, 113, 68, 121, 111, 103, 86, 51, 90, 86, 71, 110, 68, 86, 105, 50, 68, 98, 105, 69, 70, 86, 83, 85, 114, 50, 101, 88, 84, 78, 90, 81, 57, 86, 47, 68, 57, 81, 67, 47, 43, 118, 67, 82, 53, 84, 71, 121, 88, 57, 81, 79, 86, 66, 103, 116, 65, 89, 116, 109, 47, 90, 84, 73, 119, 122, 80, 69, 89, 66, 57, 78, 114, 86, 49, 78, 101, 79, 49, 47, 115, 65, 122, 55, 56, 117, 48, 116, 87, 53, 57, 114, 48, 73, 43, 83, 79, 53, 74, 103, 109, 51, 66, 57, 105, 49, 116, 111, 82, 117, 114, 122, 72, 118, 57, 69, 90, 74, 57, 121, 90, 76, 56, 110, 97, 102, 98, 47, 84, 49, 70, 97, 111, 80, 68, 107, 117, 74, 102, 77, 43, 105, 80, 115, 48, 106, 56, 120, 110, 83, 55, 84, 97, 85, 47, 103, 69, 75, 48, 119, 67, 120, 101, 68, 89, 82, 89, 116, 74, 120, 57, 106, 52, 104, 85, 81, 113, 55, 112, 65, 117, 47, 84, 50, 121, 87, 121, 48, 118, 106, 99, 85, 72, 107, 105, 57, 53, 50, 90, 78, 98, 88, 110, 88, 120, 66, 56, 109, 56, 112, 86, 53, 120, 57, 69, 49, 115, 102, 76, 106, 53, 77, 90, 69, 103, 112, 85, 50, 88, 86, 56, 82, 72, 114, 86, 118, 87, 110, 105, 67, 106, 115, 102, 54, 118, 103, 120, 109, 82, 55, 43, 75, 116, 119, 73, 98, 77, 106, 97, 104, 105, 116, 85, 71, 116, 72, 101, 116, 49, 87, 100, 76, 43, 56, 77, 109, 100, 76, 50, 57, 105, 81, 74, 67, 51, 55, 112, 68, 88, 105, 114, 105, 114, 49, 78, 105, 98, 120, 75, 75, 104, 70, 89, 82, 117, 74, 51, 120, 87, 57, 79, 48, 114, 57, 43, 86, 110, 104, 56, 100, 105, 113, 98, 66, 117, 88, 113, 68, 98, 89, 82, 47, 77, 83, 111, 72, 118, 115, 99, 79, 67, 109, 50, 116, 57, 53, 100, 78, 53, 87, 66, 100, 82, 85, 111, 68, 55, 89, 67, 71, 47, 90, 72, 87, 99, 55, 89, 112, 118, 47, 120, 47, 97, 108, 52, 102, 107, 66, 50, 108, 90, 108, 89, 104, 86, 87, 72, 120, 106, 97, 111, 101, 70, 57, 106, 69, 80, 73, 48, 103, 65, 78, 53, 88, 115, 118, 85, 73, 54, 104, 98, 122, 69, 122, 87, 77, 115, 78, 87, 47, 49, 111, 114, 107, 78, 79, 110, 108, 115, 107, 97, 108, 103, 109, 112, 73, 52, 66, 50, 114, 109, 52, 71, 99, 55, 76, 78, 117, 105, 43, 77, 117, 77, 66, 114, 112, 110, 66, 118, 76, 107, 98, 89, 88, 57, 101, 120, 101, 57, 103, 56, 116, 117, 55, 119, 76, 116, 55, 83, 99, 79, 106, 68, 99, 76, 57, 57, 111, 79, 121, 82, 56, 57, 77, 104, 57, 76, 56, 114, 100, 52, 43, 52, 51, 43, 74, 81, 121, 82, 54, 116, 115, 73, 102, 99, 80, 74, 111, 54, 84, 54, 70, 120, 72, 102, 49, 49, 100, 47, 77, 71, 97, 121, 74, 105, 43, 83, 87, 99, 116, 47, 117, 104, 118, 118, 117, 97, 48, 111, 79, 104, 43, 122, 88, 78, 73, 97, 85, 122, 103, 111, 66, 109, 117, 49, 88, 85, 76, 106, 107, 112, 117, 65, 48, 71, 104, 122, 99, 116, 102, 51, 48, 106, 98, 89, 49, 65, 79, 77, 52, 57, 113, 98, 77, 90, 82, 89, 83, 57, 65, 43, 48, 83, 49, 72, 114, 72, 80, 110, 119, 82, 118, 112, 81, 89, 47, 83, 106, 52, 120, 75, 80, 110, 48, 103, 100, 112, 118, 47, 43, 105, 84, 98, 75, 74, 98, 56, 122, 107, 80, 67, 52, 47, 57, 97, 102, 48, 74, 118, 101, 115, 97, 43, 71, 68, 71, 48, 47, 105, 119, 51, 84, 115, 119, 101, 110, 77, 104, 113, 108, 104, 55, 66, 77, 57, 77, 87, 53, 116, 120, 112, 101, 98, 108, 115, 66, 121, 120, 52, 87, 110, 74, 47, 111, 72, 118, 54, 99, 99, 48, 100, 109, 77, 55, 116, 115, 86, 51, 54, 108, 89, 107, 67, 84, 85, 88, 69, 102, 47, 48, 101, 75, 108, 110, 102, 105, 118, 110, 78, 48, 103, 49, 103, 43, 106, 47, 76, 107, 57, 101, 116, 47, 117, 111, 97, 54, 84, 70, 67, 87, 48, 72, 103, 119, 70, 79, 73, 86, 70, 117, 109, 69, 89, 100, 84, 54, 55, 53, 80, 102, 117, 84, 114, 89, 79, 53, 111, 56, 90, 114, 87, 69, 73, 72, 116, 118, 50, 67, 116, 108, 114, 118, 57, 74, 51, 84, 114, 115, 108, 68, 47, 105, 75, 69, 119, 116, 105, 112, 71, 72, 116, 110, 48, 86, 97, 107, 56, 66, 57, 119, 76, 76, 43, 107, 122, 43, 67, 73, 81, 47, 86, 71, 52, 75, 74, 112, 88, 106, 120, 56, 56, 67, 101, 67, 67, 52, 88, 97, 71, 105, 116, 69, 100, 106, 65, 65, 65, 34 }, "M", "Lee", 90f }
- });
-
- migrationBuilder.InsertData(
- table: "FriendshipEntity",
- columns: new[] { "FollowerId", "FollowingId", "StartDate" },
- values: new object[,]
- {
- { 1, 3, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified) },
- { 1, 4, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified) }
- });
-
- migrationBuilder.InsertData(
- table: "Notification",
- columns: new[] { "IdNotif", "Date", "Message", "SenderId", "Statut", "Urgence" },
- values: new object[,]
- {
- { 1, new DateTime(2023, 12, 25, 13, 0, 40, 0, DateTimeKind.Unspecified), "You have a new activity to check", 1, true, "A" },
- { 3, new DateTime(2023, 12, 26, 16, 10, 4, 0, DateTimeKind.Unspecified), "You have a new heart rate to check", 3, true, "2" },
- { 4, new DateTime(2024, 1, 12, 9, 30, 50, 0, DateTimeKind.Unspecified), "You have a new data source to check", 4, false, "1" }
- });
-
- migrationBuilder.InsertData(
- table: "Statistic",
- columns: new[] { "IdStatistic", "AthleteId", "AverageCaloriesBurned", "AverageHeartRate", "Date", "MaximumHeartRate", "Weight" },
- values: new object[,]
- {
- { 1, 1, 500.0, 120.0, new DateOnly(2021, 12, 12), 180.0, 75f },
- { 3, 1, 550.0, 125.0, new DateOnly(2022, 12, 30), 185.0, 68f },
- { 4, 3, 650.0, 135.0, new DateOnly(2023, 2, 20), 195.0, 58f },
- { 5, 4, 450.0, 110.0, new DateOnly(2024, 1, 10), 170.0, 90f }
- });
-
- migrationBuilder.InsertData(
- table: "Training",
- columns: new[] { "IdTraining", "CoachId", "Date", "Description", "FeedBack", "Latitude", "Longitude" },
- values: new object[,]
- {
- { 1, 1, new DateOnly(2024, 1, 19), "Running", "Good", 48.8566f, 2.3522f },
- { 3, 4, new DateOnly(2024, 2, 21), null, "Good", 48.8566f, 2.3522f },
- { 4, 3, new DateOnly(2024, 2, 22), "Running", "Good", 48.8566f, 2.3522f },
- { 5, 1, new DateOnly(2024, 2, 23), "Cycling", null, 48.8566f, 2.3522f }
- });
-
- migrationBuilder.InsertData(
- table: "Activity",
- columns: new[] { "IdActivity", "AthleteId", "Average", "AverageTemperature", "DataSourceId", "Date", "EffortFelt", "EndTime", "HasAutoPause", "Maximum", "Minimum", "StandardDeviation", "StartTime", "Type", "Variability", "Variance" },
- values: new object[,]
- {
- { 2, 2, 0.5f, 20f, 2, new DateOnly(2023, 1, 25), 5, new TimeOnly(14, 0, 22), false, 0, 0, 0.5f, new TimeOnly(13, 4, 34), "Cycling", 0.5f, 0.5f },
- { 4, 5, 0.5f, 20f, 3, new DateOnly(2024, 1, 2), 5, new TimeOnly(16, 1, 55), false, 0, 0, 0.5f, new TimeOnly(15, 0, 0), "Walking", 0.5f, 0.5f }
- });
-
- migrationBuilder.InsertData(
- table: "FriendshipEntity",
- columns: new[] { "FollowerId", "FollowingId", "StartDate" },
- values: new object[,]
- {
- { 2, 1, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified) },
- { 1, 2, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified) },
- { 2, 3, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified) },
- { 1, 5, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified) }
- });
-
- migrationBuilder.InsertData(
- table: "HeartRate",
- columns: new[] { "IdHeartRate", "ActivityId", "Altitude", "Bpm", "Latitude", "Longitude", "Temperature", "Time" },
- values: new object[,]
- {
- { 1, 1, 0.0, 60, 66f, 35f, 20f, new TimeOnly(13, 0, 30) },
- { 3, 1, 11.0, 71, 66f, 36f, 20f, new TimeOnly(13, 0, 32) }
- });
-
- migrationBuilder.InsertData(
- table: "Notification",
- columns: new[] { "IdNotif", "Date", "Message", "SenderId", "Statut", "Urgence" },
- values: new object[,]
- {
- { 2, new DateTime(2023, 12, 26, 13, 10, 40, 0, DateTimeKind.Unspecified), "You have a new athlete to check", 2, false, "3" },
- { 5, new DateTime(2024, 2, 22, 12, 10, 0, 0, DateTimeKind.Unspecified), "You have a new notification to check", 5, true, "3" }
- });
-
- migrationBuilder.InsertData(
- table: "Statistic",
- columns: new[] { "IdStatistic", "AthleteId", "AverageCaloriesBurned", "AverageHeartRate", "Date", "MaximumHeartRate", "Weight" },
- values: new object[] { 2, 2, 600.0, 130.0, new DateOnly(2021, 1, 11), 190.0, 60f });
-
- migrationBuilder.InsertData(
- table: "Training",
- columns: new[] { "IdTraining", "CoachId", "Date", "Description", "FeedBack", "Latitude", "Longitude" },
- values: new object[] { 2, 5, new DateOnly(2024, 2, 20), "Cycling", null, 48.8566f, 2.3522f });
-
- migrationBuilder.InsertData(
- table: "HeartRate",
- columns: new[] { "IdHeartRate", "ActivityId", "Altitude", "Bpm", "Latitude", "Longitude", "Temperature", "Time" },
- values: new object[,]
- {
- { 2, 2, 10.0, 65, 67f, 35f, 20.5f, new TimeOnly(13, 0, 31) },
- { 4, 2, 12.0, 75, 67f, 36f, 20.5f, new TimeOnly(13, 0, 33) },
- { 5, 4, 13.0, 80, 66f, 37f, 20f, new TimeOnly(13, 0, 34) }
- });
-
- migrationBuilder.CreateIndex(
- name: "IX_Activity_AthleteId",
- table: "Activity",
- column: "AthleteId");
-
- migrationBuilder.CreateIndex(
- name: "IX_Activity_DataSourceId",
- table: "Activity",
- column: "DataSourceId");
-
- migrationBuilder.CreateIndex(
- name: "IX_Athlete_DataSourceId",
- table: "Athlete",
- column: "DataSourceId");
-
- migrationBuilder.CreateIndex(
- name: "IX_AthleteEntityNotificationEntity_ReceiversIdAthlete",
- table: "AthleteEntityNotificationEntity",
- column: "ReceiversIdAthlete");
-
- migrationBuilder.CreateIndex(
- name: "IX_AthleteEntityTrainingEntity_TrainingsAthleteIdTraining",
- table: "AthleteEntityTrainingEntity",
- column: "TrainingsAthleteIdTraining");
-
- migrationBuilder.CreateIndex(
- name: "IX_FriendshipEntity_FollowerId",
- table: "FriendshipEntity",
- column: "FollowerId");
-
- migrationBuilder.CreateIndex(
- name: "IX_HeartRate_ActivityId",
- table: "HeartRate",
- column: "ActivityId");
-
- migrationBuilder.CreateIndex(
- name: "IX_Notification_SenderId",
- table: "Notification",
- column: "SenderId");
-
- migrationBuilder.CreateIndex(
- name: "IX_Statistic_AthleteId",
- table: "Statistic",
- column: "AthleteId");
-
- migrationBuilder.CreateIndex(
- name: "IX_Training_CoachId",
- table: "Training",
- column: "CoachId");
- }
-
- ///
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropTable(
- name: "AthleteEntityNotificationEntity");
-
- migrationBuilder.DropTable(
- name: "AthleteEntityTrainingEntity");
-
- migrationBuilder.DropTable(
- name: "FriendshipEntity");
-
- migrationBuilder.DropTable(
- name: "HeartRate");
-
- migrationBuilder.DropTable(
- name: "Statistic");
-
- migrationBuilder.DropTable(
- name: "Notification");
-
- migrationBuilder.DropTable(
- name: "Training");
-
- migrationBuilder.DropTable(
- name: "Activity");
-
- migrationBuilder.DropTable(
- name: "Athlete");
-
- migrationBuilder.DropTable(
- name: "DataSource");
- }
- }
-}
diff --git a/src/StubbedContextLib/Migrations/TrainingStubbedContextModelSnapshot.cs b/src/StubbedContextLib/Migrations/TrainingStubbedContextModelSnapshot.cs
deleted file mode 100644
index d8803de..0000000
--- a/src/StubbedContextLib/Migrations/TrainingStubbedContextModelSnapshot.cs
+++ /dev/null
@@ -1,983 +0,0 @@
-//
-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("AthleteEntityNotificationEntity", b =>
- {
- b.Property("NotificationsReceivedIdNotif")
- .HasColumnType("INTEGER");
-
- b.Property("ReceiversIdAthlete")
- .HasColumnType("INTEGER");
-
- b.HasKey("NotificationsReceivedIdNotif", "ReceiversIdAthlete");
-
- b.HasIndex("ReceiversIdAthlete");
-
- b.ToTable("AthleteEntityNotificationEntity");
- });
-
- modelBuilder.Entity("AthleteEntityTrainingEntity", b =>
- {
- b.Property("AthletesIdAthlete")
- .HasColumnType("INTEGER");
-
- b.Property("TrainingsAthleteIdTraining")
- .HasColumnType("INTEGER");
-
- b.HasKey("AthletesIdAthlete", "TrainingsAthleteIdTraining");
-
- b.HasIndex("TrainingsAthleteIdTraining");
-
- b.ToTable("AthleteEntityTrainingEntity");
- });
-
- modelBuilder.Entity("Entities.ActivityEntity", b =>
- {
- b.Property("IdActivity")
- .ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
-
- b.Property("AthleteId")
- .HasColumnType("INTEGER");
-
- b.Property("Average")
- .HasColumnType("REAL");
-
- b.Property("AverageTemperature")
- .HasColumnType("REAL");
-
- b.Property("DataSourceId")
- .HasColumnType("INTEGER");
-
- b.Property("Date")
- .HasColumnType("TEXT");
-
- b.Property("EffortFelt")
- .HasColumnType("INTEGER");
-
- b.Property("EndTime")
- .HasColumnType("TEXT");
-
- b.Property("HasAutoPause")
- .HasColumnType("INTEGER");
-
- b.Property("Maximum")
- .HasColumnType("INTEGER");
-
- b.Property("Minimum")
- .HasColumnType("INTEGER");
-
- b.Property("StandardDeviation")
- .HasColumnType("REAL");
-
- b.Property("StartTime")
- .HasColumnType("TEXT");
-
- b.Property("Type")
- .IsRequired()
- .HasMaxLength(100)
- .HasColumnType("TEXT");
-
- b.Property("Variability")
- .HasColumnType("REAL");
-
- b.Property("Variance")
- .HasColumnType("REAL");
-
- b.HasKey("IdActivity");
-
- b.HasIndex("AthleteId");
-
- b.HasIndex("DataSourceId");
-
- b.ToTable("Activity");
-
- b.HasData(
- new
- {
- IdActivity = 1,
- AthleteId = 1,
- Average = 0.5f,
- AverageTemperature = 20f,
- DataSourceId = 1,
- 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,
- AthleteId = 2,
- Average = 0.5f,
- AverageTemperature = 20f,
- DataSourceId = 2,
- 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,
- AthleteId = 1,
- Average = 0.5f,
- AverageTemperature = 20f,
- DataSourceId = 1,
- 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,
- AthleteId = 5,
- Average = 0.5f,
- AverageTemperature = 20f,
- DataSourceId = 3,
- 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,
- AthleteId = 4,
- Average = 0.5f,
- AverageTemperature = 20f,
- DataSourceId = 4,
- 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,
- AthleteId = 4,
- Average = 0.5f,
- AverageTemperature = 20f,
- DataSourceId = 4,
- 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,
- AthleteId = 3,
- Average = 0.5f,
- AverageTemperature = 20f,
- DataSourceId = 5,
- 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("IdAthlete")
- .ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
-
- b.Property("DataSourceId")
- .HasColumnType("INTEGER");
-
- b.Property("DateOfBirth")
- .HasColumnType("TEXT");
-
- b.Property("Email")
- .IsRequired()
- .HasMaxLength(100)
- .HasColumnType("TEXT");
-
- b.Property("FirstName")
- .IsRequired()
- .HasMaxLength(150)
- .HasColumnType("TEXT");
-
- b.Property("IsCoach")
- .HasColumnType("INTEGER");
-
- b.Property("LastName")
- .IsRequired()
- .HasMaxLength(100)
- .HasColumnType("TEXT");
-
- b.Property("Length")
- .HasColumnType("REAL");
-
- b.Property("Password")
- .IsRequired()
- .HasColumnType("TEXT");
-
- b.Property("ProfilPicture")
- .IsRequired()
- .HasColumnType("BLOB");
-
- b.Property("Sexe")
- .IsRequired()
- .HasMaxLength(1)
- .HasColumnType("TEXT");
-
- b.Property("Username")
- .IsRequired()
- .HasMaxLength(100)
- .HasColumnType("TEXT");
-
- b.Property("Weight")
- .HasColumnType("REAL");
-
- b.HasKey("IdAthlete");
-
- b.HasIndex("DataSourceId");
-
- 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",
- Length = 1.8,
- Password = "password123",
- ProfilPicture = new byte[] { 34, 85, 107, 108, 71, 82, 116, 119, 68, 65, 65, 66, 88, 82, 85, 74, 81, 86, 108, 65, 52, 73, 78, 65, 68, 65, 65, 65, 119, 69, 65, 67, 100, 65, 83, 111, 113, 65, 67, 111, 65, 65, 77, 65, 83, 74, 90, 103, 67, 100, 77, 111, 83, 67, 122, 54, 53, 53, 110, 100, 85, 52, 88, 88, 65, 80, 50, 121, 88, 73, 103, 101, 53, 110, 101, 77, 47, 81, 100, 54, 87, 67, 102, 79, 56, 101, 118, 111, 106, 50, 83, 48, 65, 47, 112, 55, 43, 102, 48, 65, 110, 56, 53, 99, 66, 120, 108, 76, 68, 103, 80, 67, 56, 106, 79, 47, 48, 110, 115, 108, 47, 49, 51, 47, 79, 56, 118, 118, 122, 106, 55, 65, 102, 56, 115, 47, 112, 51, 47, 72, 52, 70, 85, 54, 116, 100, 52, 77, 67, 119, 113, 50, 51, 122, 49, 72, 50, 117, 122, 111, 75, 73, 88, 97, 113, 74, 110, 105, 80, 73, 47, 98, 82, 77, 102, 56, 113, 122, 118, 48, 90, 112, 43, 72, 69, 49, 82, 67, 66, 119, 53, 87, 81, 49, 106, 47, 74, 111, 118, 100, 77, 49, 70, 83, 53, 50, 43, 81, 99, 97, 65, 65, 65, 47, 118, 47, 43, 78, 120, 85, 52, 68, 112, 80, 107, 51, 43, 120, 81, 80, 87, 55, 116, 99, 109, 85, 82, 83, 111, 57, 118, 67, 52, 113, 99, 43, 88, 77, 120, 78, 86, 66, 122, 69, 77, 53, 69, 56, 97, 99, 116, 68, 122, 57, 56, 103, 109, 119, 84, 88, 103, 68, 54, 50, 101, 57, 69, 109, 71, 47, 101, 114, 118, 100, 100, 50, 111, 118, 70, 70, 83, 117, 120, 89, 112, 112, 87, 108, 47, 119, 116, 97, 88, 51, 114, 107, 110, 48, 120, 114, 116, 56, 113, 79, 113, 108, 47, 53, 73, 50, 106, 102, 76, 79, 110, 67, 85, 48, 107, 65, 76, 76, 99, 87, 52, 70, 47, 119, 84, 106, 85, 49, 48, 113, 115, 120, 90, 88, 87, 57, 102, 120, 97, 117, 67, 54, 79, 80, 86, 82, 70, 50, 56, 115, 99, 57, 52, 86, 57, 111, 99, 109, 111, 83, 87, 121, 43, 115, 102, 54, 106, 87, 51, 118, 89, 107, 86, 79, 104, 43, 103, 69, 47, 82, 69, 48, 76, 54, 98, 50, 100, 51, 111, 70, 121, 72, 109, 107, 82, 74, 110, 102, 89, 119, 71, 56, 111, 51, 112, 54, 102, 118, 57, 112, 105, 118, 78, 70, 53, 97, 111, 112, 73, 66, 122, 70, 110, 106, 122, 119, 98, 47, 86, 113, 83, 113, 51, 47, 98, 43, 77, 87, 75, 70, 109, 106, 114, 56, 84, 49, 113, 101, 52, 47, 102, 73, 84, 111, 50, 118, 66, 87, 69, 113, 68, 121, 111, 103, 86, 51, 90, 86, 71, 110, 68, 86, 105, 50, 68, 98, 105, 69, 70, 86, 83, 85, 114, 50, 101, 88, 84, 78, 90, 81, 57, 86, 47, 68, 57, 81, 67, 47, 43, 118, 67, 82, 53, 84, 71, 121, 88, 57, 81, 79, 86, 66, 103, 116, 65, 89, 116, 109, 47, 90, 84, 73, 119, 122, 80, 69, 89, 66, 57, 78, 114, 86, 49, 78, 101, 79, 49, 47, 115, 65, 122, 55, 56, 117, 48, 116, 87, 53, 57, 114, 48, 73, 43, 83, 79, 53, 74, 103, 109, 51, 66, 57, 105, 49, 116, 111, 82, 117, 114, 122, 72, 118, 57, 69, 90, 74, 57, 121, 90, 76, 56, 110, 97, 102, 98, 47, 84, 49, 70, 97, 111, 80, 68, 107, 117, 74, 102, 77, 43, 105, 80, 115, 48, 106, 56, 120, 110, 83, 55, 84, 97, 85, 47, 103, 69, 75, 48, 119, 67, 120, 101, 68, 89, 82, 89, 116, 74, 120, 57, 106, 52, 104, 85, 81, 113, 55, 112, 65, 117, 47, 84, 50, 121, 87, 121, 48, 118, 106, 99, 85, 72, 107, 105, 57, 53, 50, 90, 78, 98, 88, 110, 88, 120, 66, 56, 109, 56, 112, 86, 53, 120, 57, 69, 49, 115, 102, 76, 106, 53, 77, 90, 69, 103, 112, 85, 50, 88, 86, 56, 82, 72, 114, 86, 118, 87, 110, 105, 67, 106, 115, 102, 54, 118, 103, 120, 109, 82, 55, 43, 75, 116, 119, 73, 98, 77, 106, 97, 104, 105, 116, 85, 71, 116, 72, 101, 116, 49, 87, 100, 76, 43, 56, 77, 109, 100, 76, 50, 57, 105, 81, 74, 67, 51, 55, 112, 68, 88, 105, 114, 105, 114, 49, 78, 105, 98, 120, 75, 75, 104, 70, 89, 82, 117, 74, 51, 120, 87, 57, 79, 48, 114, 57, 43, 86, 110, 104, 56, 100, 105, 113, 98, 66, 117, 88, 113, 68, 98, 89, 82, 47, 77, 83, 111, 72, 118, 115, 99, 79, 67, 109, 50, 116, 57, 53, 100, 78, 53, 87, 66, 100, 82, 85, 111, 68, 55, 89, 67, 71, 47, 90, 72, 87, 99, 55, 89, 112, 118, 47, 120, 47, 97, 108, 52, 102, 107, 66, 50, 108, 90, 108, 89, 104, 86, 87, 72, 120, 106, 97, 111, 101, 70, 57, 106, 69, 80, 73, 48, 103, 65, 78, 53, 88, 115, 118, 85, 73, 54, 104, 98, 122, 69, 122, 87, 77, 115, 78, 87, 47, 49, 111, 114, 107, 78, 79, 110, 108, 115, 107, 97, 108, 103, 109, 112, 73, 52, 66, 50, 114, 109, 52, 71, 99, 55, 76, 78, 117, 105, 43, 77, 117, 77, 66, 114, 112, 110, 66, 118, 76, 107, 98, 89, 88, 57, 101, 120, 101, 57, 103, 56, 116, 117, 55, 119, 76, 116, 55, 83, 99, 79, 106, 68, 99, 76, 57, 57, 111, 79, 121, 82, 56, 57, 77, 104, 57, 76, 56, 114, 100, 52, 43, 52, 51, 43, 74, 81, 121, 82, 54, 116, 115, 73, 102, 99, 80, 74, 111, 54, 84, 54, 70, 120, 72, 102, 49, 49, 100, 47, 77, 71, 97, 121, 74, 105, 43, 83, 87, 99, 116, 47, 117, 104, 118, 118, 117, 97, 48, 111, 79, 104, 43, 122, 88, 78, 73, 97, 85, 122, 103, 111, 66, 109, 117, 49, 88, 85, 76, 106, 107, 112, 117, 65, 48, 71, 104, 122, 99, 116, 102, 51, 48, 106, 98, 89, 49, 65, 79, 77, 52, 57, 113, 98, 77, 90, 82, 89, 83, 57, 65, 43, 48, 83, 49, 72, 114, 72, 80, 110, 119, 82, 118, 112, 81, 89, 47, 83, 106, 52, 120, 75, 80, 110, 48, 103, 100, 112, 118, 47, 43, 105, 84, 98, 75, 74, 98, 56, 122, 107, 80, 67, 52, 47, 57, 97, 102, 48, 74, 118, 101, 115, 97, 43, 71, 68, 71, 48, 47, 105, 119, 51, 84, 115, 119, 101, 110, 77, 104, 113, 108, 104, 55, 66, 77, 57, 77, 87, 53, 116, 120, 112, 101, 98, 108, 115, 66, 121, 120, 52, 87, 110, 74, 47, 111, 72, 118, 54, 99, 99, 48, 100, 109, 77, 55, 116, 115, 86, 51, 54, 108, 89, 107, 67, 84, 85, 88, 69, 102, 47, 48, 101, 75, 108, 110, 102, 105, 118, 110, 78, 48, 103, 49, 103, 43, 106, 47, 76, 107, 57, 101, 116, 47, 117, 111, 97, 54, 84, 70, 67, 87, 48, 72, 103, 119, 70, 79, 73, 86, 70, 117, 109, 69, 89, 100, 84, 54, 55, 53, 80, 102, 117, 84, 114, 89, 79, 53, 111, 56, 90, 114, 87, 69, 73, 72, 116, 118, 50, 67, 116, 108, 114, 118, 57, 74, 51, 84, 114, 115, 108, 68, 47, 105, 75, 69, 119, 116, 105, 112, 71, 72, 116, 110, 48, 86, 97, 107, 56, 66, 57, 119, 76, 76, 43, 107, 122, 43, 67, 73, 81, 47, 86, 71, 52, 75, 74, 112, 88, 106, 120, 56, 56, 67, 101, 67, 67, 52, 88, 97, 71, 105, 116, 69, 100, 106, 65, 65, 65, 34 },
- Sexe = "M",
- Username = "Doe",
- Weight = 75f
- },
- new
- {
- IdAthlete = 2,
- DataSourceId = 1,
- DateOfBirth = new DateOnly(1995, 1, 1),
- Email = "jane.smith@exemple.com",
- FirstName = "Jane",
- IsCoach = false,
- LastName = "Smith",
- Length = 1.6499999999999999,
- Password = "secure456",
- ProfilPicture = new byte[] { 34, 85, 107, 108, 71, 82, 116, 119, 68, 65, 65, 66, 88, 82, 85, 74, 81, 86, 108, 65, 52, 73, 78, 65, 68, 65, 65, 65, 119, 69, 65, 67, 100, 65, 83, 111, 113, 65, 67, 111, 65, 65, 77, 65, 83, 74, 90, 103, 67, 100, 77, 111, 83, 67, 122, 54, 53, 53, 110, 100, 85, 52, 88, 88, 65, 80, 50, 121, 88, 73, 103, 101, 53, 110, 101, 77, 47, 81, 100, 54, 87, 67, 102, 79, 56, 101, 118, 111, 106, 50, 83, 48, 65, 47, 112, 55, 43, 102, 48, 65, 110, 56, 53, 99, 66, 120, 108, 76, 68, 103, 80, 67, 56, 106, 79, 47, 48, 110, 115, 108, 47, 49, 51, 47, 79, 56, 118, 118, 122, 106, 55, 65, 102, 56, 115, 47, 112, 51, 47, 72, 52, 70, 85, 54, 116, 100, 52, 77, 67, 119, 113, 50, 51, 122, 49, 72, 50, 117, 122, 111, 75, 73, 88, 97, 113, 74, 110, 105, 80, 73, 47, 98, 82, 77, 102, 56, 113, 122, 118, 48, 90, 112, 43, 72, 69, 49, 82, 67, 66, 119, 53, 87, 81, 49, 106, 47, 74, 111, 118, 100, 77, 49, 70, 83, 53, 50, 43, 81, 99, 97, 65, 65, 65, 47, 118, 47, 43, 78, 120, 85, 52, 68, 112, 80, 107, 51, 43, 120, 81, 80, 87, 55, 116, 99, 109, 85, 82, 83, 111, 57, 118, 67, 52, 113, 99, 43, 88, 77, 120, 78, 86, 66, 122, 69, 77, 53, 69, 56, 97, 99, 116, 68, 122, 57, 56, 103, 109, 119, 84, 88, 103, 68, 54, 50, 101, 57, 69, 109, 71, 47, 101, 114, 118, 100, 100, 50, 111, 118, 70, 70, 83, 117, 120, 89, 112, 112, 87, 108, 47, 119, 116, 97, 88, 51, 114, 107, 110, 48, 120, 114, 116, 56, 113, 79, 113, 108, 47, 53, 73, 50, 106, 102, 76, 79, 110, 67, 85, 48, 107, 65, 76, 76, 99, 87, 52, 70, 47, 119, 84, 106, 85, 49, 48, 113, 115, 120, 90, 88, 87, 57, 102, 120, 97, 117, 67, 54, 79, 80, 86, 82, 70, 50, 56, 115, 99, 57, 52, 86, 57, 111, 99, 109, 111, 83, 87, 121, 43, 115, 102, 54, 106, 87, 51, 118, 89, 107, 86, 79, 104, 43, 103, 69, 47, 82, 69, 48, 76, 54, 98, 50, 100, 51, 111, 70, 121, 72, 109, 107, 82, 74, 110, 102, 89, 119, 71, 56, 111, 51, 112, 54, 102, 118, 57, 112, 105, 118, 78, 70, 53, 97, 111, 112, 73, 66, 122, 70, 110, 106, 122, 119, 98, 47, 86, 113, 83, 113, 51, 47, 98, 43, 77, 87, 75, 70, 109, 106, 114, 56, 84, 49, 113, 101, 52, 47, 102, 73, 84, 111, 50, 118, 66, 87, 69, 113, 68, 121, 111, 103, 86, 51, 90, 86, 71, 110, 68, 86, 105, 50, 68, 98, 105, 69, 70, 86, 83, 85, 114, 50, 101, 88, 84, 78, 90, 81, 57, 86, 47, 68, 57, 81, 67, 47, 43, 118, 67, 82, 53, 84, 71, 121, 88, 57, 81, 79, 86, 66, 103, 116, 65, 89, 116, 109, 47, 90, 84, 73, 119, 122, 80, 69, 89, 66, 57, 78, 114, 86, 49, 78, 101, 79, 49, 47, 115, 65, 122, 55, 56, 117, 48, 116, 87, 53, 57, 114, 48, 73, 43, 83, 79, 53, 74, 103, 109, 51, 66, 57, 105, 49, 116, 111, 82, 117, 114, 122, 72, 118, 57, 69, 90, 74, 57, 121, 90, 76, 56, 110, 97, 102, 98, 47, 84, 49, 70, 97, 111, 80, 68, 107, 117, 74, 102, 77, 43, 105, 80, 115, 48, 106, 56, 120, 110, 83, 55, 84, 97, 85, 47, 103, 69, 75, 48, 119, 67, 120, 101, 68, 89, 82, 89, 116, 74, 120, 57, 106, 52, 104, 85, 81, 113, 55, 112, 65, 117, 47, 84, 50, 121, 87, 121, 48, 118, 106, 99, 85, 72, 107, 105, 57, 53, 50, 90, 78, 98, 88, 110, 88, 120, 66, 56, 109, 56, 112, 86, 53, 120, 57, 69, 49, 115, 102, 76, 106, 53, 77, 90, 69, 103, 112, 85, 50, 88, 86, 56, 82, 72, 114, 86, 118, 87, 110, 105, 67, 106, 115, 102, 54, 118, 103, 120, 109, 82, 55, 43, 75, 116, 119, 73, 98, 77, 106, 97, 104, 105, 116, 85, 71, 116, 72, 101, 116, 49, 87, 100, 76, 43, 56, 77, 109, 100, 76, 50, 57, 105, 81, 74, 67, 51, 55, 112, 68, 88, 105, 114, 105, 114, 49, 78, 105, 98, 120, 75, 75, 104, 70, 89, 82, 117, 74, 51, 120, 87, 57, 79, 48, 114, 57, 43, 86, 110, 104, 56, 100, 105, 113, 98, 66, 117, 88, 113, 68, 98, 89, 82, 47, 77, 83, 111, 72, 118, 115, 99, 79, 67, 109, 50, 116, 57, 53, 100, 78, 53, 87, 66, 100, 82, 85, 111, 68, 55, 89, 67, 71, 47, 90, 72, 87, 99, 55, 89, 112, 118, 47, 120, 47, 97, 108, 52, 102, 107, 66, 50, 108, 90, 108, 89, 104, 86, 87, 72, 120, 106, 97, 111, 101, 70, 57, 106, 69, 80, 73, 48, 103, 65, 78, 53, 88, 115, 118, 85, 73, 54, 104, 98, 122, 69, 122, 87, 77, 115, 78, 87, 47, 49, 111, 114, 107, 78, 79, 110, 108, 115, 107, 97, 108, 103, 109, 112, 73, 52, 66, 50, 114, 109, 52, 71, 99, 55, 76, 78, 117, 105, 43, 77, 117, 77, 66, 114, 112, 110, 66, 118, 76, 107, 98, 89, 88, 57, 101, 120, 101, 57, 103, 56, 116, 117, 55, 119, 76, 116, 55, 83, 99, 79, 106, 68, 99, 76, 57, 57, 111, 79, 121, 82, 56, 57, 77, 104, 57, 76, 56, 114, 100, 52, 43, 52, 51, 43, 74, 81, 121, 82, 54, 116, 115, 73, 102, 99, 80, 74, 111, 54, 84, 54, 70, 120, 72, 102, 49, 49, 100, 47, 77, 71, 97, 121, 74, 105, 43, 83, 87, 99, 116, 47, 117, 104, 118, 118, 117, 97, 48, 111, 79, 104, 43, 122, 88, 78, 73, 97, 85, 122, 103, 111, 66, 109, 117, 49, 88, 85, 76, 106, 107, 112, 117, 65, 48, 71, 104, 122, 99, 116, 102, 51, 48, 106, 98, 89, 49, 65, 79, 77, 52, 57, 113, 98, 77, 90, 82, 89, 83, 57, 65, 43, 48, 83, 49, 72, 114, 72, 80, 110, 119, 82, 118, 112, 81, 89, 47, 83, 106, 52, 120, 75, 80, 110, 48, 103, 100, 112, 118, 47, 43, 105, 84, 98, 75, 74, 98, 56, 122, 107, 80, 67, 52, 47, 57, 97, 102, 48, 74, 118, 101, 115, 97, 43, 71, 68, 71, 48, 47, 105, 119, 51, 84, 115, 119, 101, 110, 77, 104, 113, 108, 104, 55, 66, 77, 57, 77, 87, 53, 116, 120, 112, 101, 98, 108, 115, 66, 121, 120, 52, 87, 110, 74, 47, 111, 72, 118, 54, 99, 99, 48, 100, 109, 77, 55, 116, 115, 86, 51, 54, 108, 89, 107, 67, 84, 85, 88, 69, 102, 47, 48, 101, 75, 108, 110, 102, 105, 118, 110, 78, 48, 103, 49, 103, 43, 106, 47, 76, 107, 57, 101, 116, 47, 117, 111, 97, 54, 84, 70, 67, 87, 48, 72, 103, 119, 70, 79, 73, 86, 70, 117, 109, 69, 89, 100, 84, 54, 55, 53, 80, 102, 117, 84, 114, 89, 79, 53, 111, 56, 90, 114, 87, 69, 73, 72, 116, 118, 50, 67, 116, 108, 114, 118, 57, 74, 51, 84, 114, 115, 108, 68, 47, 105, 75, 69, 119, 116, 105, 112, 71, 72, 116, 110, 48, 86, 97, 107, 56, 66, 57, 119, 76, 76, 43, 107, 122, 43, 67, 73, 81, 47, 86, 71, 52, 75, 74, 112, 88, 106, 120, 56, 56, 67, 101, 67, 67, 52, 88, 97, 71, 105, 116, 69, 100, 106, 65, 65, 65, 34 },
- 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",
- Length = 1.75,
- Password = "super789",
- ProfilPicture = new byte[] { 34, 85, 107, 108, 71, 82, 116, 119, 68, 65, 65, 66, 88, 82, 85, 74, 81, 86, 108, 65, 52, 73, 78, 65, 68, 65, 65, 65, 119, 69, 65, 67, 100, 65, 83, 111, 113, 65, 67, 111, 65, 65, 77, 65, 83, 74, 90, 103, 67, 100, 77, 111, 83, 67, 122, 54, 53, 53, 110, 100, 85, 52, 88, 88, 65, 80, 50, 121, 88, 73, 103, 101, 53, 110, 101, 77, 47, 81, 100, 54, 87, 67, 102, 79, 56, 101, 118, 111, 106, 50, 83, 48, 65, 47, 112, 55, 43, 102, 48, 65, 110, 56, 53, 99, 66, 120, 108, 76, 68, 103, 80, 67, 56, 106, 79, 47, 48, 110, 115, 108, 47, 49, 51, 47, 79, 56, 118, 118, 122, 106, 55, 65, 102, 56, 115, 47, 112, 51, 47, 72, 52, 70, 85, 54, 116, 100, 52, 77, 67, 119, 113, 50, 51, 122, 49, 72, 50, 117, 122, 111, 75, 73, 88, 97, 113, 74, 110, 105, 80, 73, 47, 98, 82, 77, 102, 56, 113, 122, 118, 48, 90, 112, 43, 72, 69, 49, 82, 67, 66, 119, 53, 87, 81, 49, 106, 47, 74, 111, 118, 100, 77, 49, 70, 83, 53, 50, 43, 81, 99, 97, 65, 65, 65, 47, 118, 47, 43, 78, 120, 85, 52, 68, 112, 80, 107, 51, 43, 120, 81, 80, 87, 55, 116, 99, 109, 85, 82, 83, 111, 57, 118, 67, 52, 113, 99, 43, 88, 77, 120, 78, 86, 66, 122, 69, 77, 53, 69, 56, 97, 99, 116, 68, 122, 57, 56, 103, 109, 119, 84, 88, 103, 68, 54, 50, 101, 57, 69, 109, 71, 47, 101, 114, 118, 100, 100, 50, 111, 118, 70, 70, 83, 117, 120, 89, 112, 112, 87, 108, 47, 119, 116, 97, 88, 51, 114, 107, 110, 48, 120, 114, 116, 56, 113, 79, 113, 108, 47, 53, 73, 50, 106, 102, 76, 79, 110, 67, 85, 48, 107, 65, 76, 76, 99, 87, 52, 70, 47, 119, 84, 106, 85, 49, 48, 113, 115, 120, 90, 88, 87, 57, 102, 120, 97, 117, 67, 54, 79, 80, 86, 82, 70, 50, 56, 115, 99, 57, 52, 86, 57, 111, 99, 109, 111, 83, 87, 121, 43, 115, 102, 54, 106, 87, 51, 118, 89, 107, 86, 79, 104, 43, 103, 69, 47, 82, 69, 48, 76, 54, 98, 50, 100, 51, 111, 70, 121, 72, 109, 107, 82, 74, 110, 102, 89, 119, 71, 56, 111, 51, 112, 54, 102, 118, 57, 112, 105, 118, 78, 70, 53, 97, 111, 112, 73, 66, 122, 70, 110, 106, 122, 119, 98, 47, 86, 113, 83, 113, 51, 47, 98, 43, 77, 87, 75, 70, 109, 106, 114, 56, 84, 49, 113, 101, 52, 47, 102, 73, 84, 111, 50, 118, 66, 87, 69, 113, 68, 121, 111, 103, 86, 51, 90, 86, 71, 110, 68, 86, 105, 50, 68, 98, 105, 69, 70, 86, 83, 85, 114, 50, 101, 88, 84, 78, 90, 81, 57, 86, 47, 68, 57, 81, 67, 47, 43, 118, 67, 82, 53, 84, 71, 121, 88, 57, 81, 79, 86, 66, 103, 116, 65, 89, 116, 109, 47, 90, 84, 73, 119, 122, 80, 69, 89, 66, 57, 78, 114, 86, 49, 78, 101, 79, 49, 47, 115, 65, 122, 55, 56, 117, 48, 116, 87, 53, 57, 114, 48, 73, 43, 83, 79, 53, 74, 103, 109, 51, 66, 57, 105, 49, 116, 111, 82, 117, 114, 122, 72, 118, 57, 69, 90, 74, 57, 121, 90, 76, 56, 110, 97, 102, 98, 47, 84, 49, 70, 97, 111, 80, 68, 107, 117, 74, 102, 77, 43, 105, 80, 115, 48, 106, 56, 120, 110, 83, 55, 84, 97, 85, 47, 103, 69, 75, 48, 119, 67, 120, 101, 68, 89, 82, 89, 116, 74, 120, 57, 106, 52, 104, 85, 81, 113, 55, 112, 65, 117, 47, 84, 50, 121, 87, 121, 48, 118, 106, 99, 85, 72, 107, 105, 57, 53, 50, 90, 78, 98, 88, 110, 88, 120, 66, 56, 109, 56, 112, 86, 53, 120, 57, 69, 49, 115, 102, 76, 106, 53, 77, 90, 69, 103, 112, 85, 50, 88, 86, 56, 82, 72, 114, 86, 118, 87, 110, 105, 67, 106, 115, 102, 54, 118, 103, 120, 109, 82, 55, 43, 75, 116, 119, 73, 98, 77, 106, 97, 104, 105, 116, 85, 71, 116, 72, 101, 116, 49, 87, 100, 76, 43, 56, 77, 109, 100, 76, 50, 57, 105, 81, 74, 67, 51, 55, 112, 68, 88, 105, 114, 105, 114, 49, 78, 105, 98, 120, 75, 75, 104, 70, 89, 82, 117, 74, 51, 120, 87, 57, 79, 48, 114, 57, 43, 86, 110, 104, 56, 100, 105, 113, 98, 66, 117, 88, 113, 68, 98, 89, 82, 47, 77, 83, 111, 72, 118, 115, 99, 79, 67, 109, 50, 116, 57, 53, 100, 78, 53, 87, 66, 100, 82, 85, 111, 68, 55, 89, 67, 71, 47, 90, 72, 87, 99, 55, 89, 112, 118, 47, 120, 47, 97, 108, 52, 102, 107, 66, 50, 108, 90, 108, 89, 104, 86, 87, 72, 120, 106, 97, 111, 101, 70, 57, 106, 69, 80, 73, 48, 103, 65, 78, 53, 88, 115, 118, 85, 73, 54, 104, 98, 122, 69, 122, 87, 77, 115, 78, 87, 47, 49, 111, 114, 107, 78, 79, 110, 108, 115, 107, 97, 108, 103, 109, 112, 73, 52, 66, 50, 114, 109, 52, 71, 99, 55, 76, 78, 117, 105, 43, 77, 117, 77, 66, 114, 112, 110, 66, 118, 76, 107, 98, 89, 88, 57, 101, 120, 101, 57, 103, 56, 116, 117, 55, 119, 76, 116, 55, 83, 99, 79, 106, 68, 99, 76, 57, 57, 111, 79, 121, 82, 56, 57, 77, 104, 57, 76, 56, 114, 100, 52, 43, 52, 51, 43, 74, 81, 121, 82, 54, 116, 115, 73, 102, 99, 80, 74, 111, 54, 84, 54, 70, 120, 72, 102, 49, 49, 100, 47, 77, 71, 97, 121, 74, 105, 43, 83, 87, 99, 116, 47, 117, 104, 118, 118, 117, 97, 48, 111, 79, 104, 43, 122, 88, 78, 73, 97, 85, 122, 103, 111, 66, 109, 117, 49, 88, 85, 76, 106, 107, 112, 117, 65, 48, 71, 104, 122, 99, 116, 102, 51, 48, 106, 98, 89, 49, 65, 79, 77, 52, 57, 113, 98, 77, 90, 82, 89, 83, 57, 65, 43, 48, 83, 49, 72, 114, 72, 80, 110, 119, 82, 118, 112, 81, 89, 47, 83, 106, 52, 120, 75, 80, 110, 48, 103, 100, 112, 118, 47, 43, 105, 84, 98, 75, 74, 98, 56, 122, 107, 80, 67, 52, 47, 57, 97, 102, 48, 74, 118, 101, 115, 97, 43, 71, 68, 71, 48, 47, 105, 119, 51, 84, 115, 119, 101, 110, 77, 104, 113, 108, 104, 55, 66, 77, 57, 77, 87, 53, 116, 120, 112, 101, 98, 108, 115, 66, 121, 120, 52, 87, 110, 74, 47, 111, 72, 118, 54, 99, 99, 48, 100, 109, 77, 55, 116, 115, 86, 51, 54, 108, 89, 107, 67, 84, 85, 88, 69, 102, 47, 48, 101, 75, 108, 110, 102, 105, 118, 110, 78, 48, 103, 49, 103, 43, 106, 47, 76, 107, 57, 101, 116, 47, 117, 111, 97, 54, 84, 70, 67, 87, 48, 72, 103, 119, 70, 79, 73, 86, 70, 117, 109, 69, 89, 100, 84, 54, 55, 53, 80, 102, 117, 84, 114, 89, 79, 53, 111, 56, 90, 114, 87, 69, 73, 72, 116, 118, 50, 67, 116, 108, 114, 118, 57, 74, 51, 84, 114, 115, 108, 68, 47, 105, 75, 69, 119, 116, 105, 112, 71, 72, 116, 110, 48, 86, 97, 107, 56, 66, 57, 119, 76, 76, 43, 107, 122, 43, 67, 73, 81, 47, 86, 71, 52, 75, 74, 112, 88, 106, 120, 56, 56, 67, 101, 67, 67, 52, 88, 97, 71, 105, 116, 69, 100, 106, 65, 65, 65, 34 },
- 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",
- Length = 1.7,
- Password = "test000",
- ProfilPicture = new byte[] { 34, 85, 107, 108, 71, 82, 116, 119, 68, 65, 65, 66, 88, 82, 85, 74, 81, 86, 108, 65, 52, 73, 78, 65, 68, 65, 65, 65, 119, 69, 65, 67, 100, 65, 83, 111, 113, 65, 67, 111, 65, 65, 77, 65, 83, 74, 90, 103, 67, 100, 77, 111, 83, 67, 122, 54, 53, 53, 110, 100, 85, 52, 88, 88, 65, 80, 50, 121, 88, 73, 103, 101, 53, 110, 101, 77, 47, 81, 100, 54, 87, 67, 102, 79, 56, 101, 118, 111, 106, 50, 83, 48, 65, 47, 112, 55, 43, 102, 48, 65, 110, 56, 53, 99, 66, 120, 108, 76, 68, 103, 80, 67, 56, 106, 79, 47, 48, 110, 115, 108, 47, 49, 51, 47, 79, 56, 118, 118, 122, 106, 55, 65, 102, 56, 115, 47, 112, 51, 47, 72, 52, 70, 85, 54, 116, 100, 52, 77, 67, 119, 113, 50, 51, 122, 49, 72, 50, 117, 122, 111, 75, 73, 88, 97, 113, 74, 110, 105, 80, 73, 47, 98, 82, 77, 102, 56, 113, 122, 118, 48, 90, 112, 43, 72, 69, 49, 82, 67, 66, 119, 53, 87, 81, 49, 106, 47, 74, 111, 118, 100, 77, 49, 70, 83, 53, 50, 43, 81, 99, 97, 65, 65, 65, 47, 118, 47, 43, 78, 120, 85, 52, 68, 112, 80, 107, 51, 43, 120, 81, 80, 87, 55, 116, 99, 109, 85, 82, 83, 111, 57, 118, 67, 52, 113, 99, 43, 88, 77, 120, 78, 86, 66, 122, 69, 77, 53, 69, 56, 97, 99, 116, 68, 122, 57, 56, 103, 109, 119, 84, 88, 103, 68, 54, 50, 101, 57, 69, 109, 71, 47, 101, 114, 118, 100, 100, 50, 111, 118, 70, 70, 83, 117, 120, 89, 112, 112, 87, 108, 47, 119, 116, 97, 88, 51, 114, 107, 110, 48, 120, 114, 116, 56, 113, 79, 113, 108, 47, 53, 73, 50, 106, 102, 76, 79, 110, 67, 85, 48, 107, 65, 76, 76, 99, 87, 52, 70, 47, 119, 84, 106, 85, 49, 48, 113, 115, 120, 90, 88, 87, 57, 102, 120, 97, 117, 67, 54, 79, 80, 86, 82, 70, 50, 56, 115, 99, 57, 52, 86, 57, 111, 99, 109, 111, 83, 87, 121, 43, 115, 102, 54, 106, 87, 51, 118, 89, 107, 86, 79, 104, 43, 103, 69, 47, 82, 69, 48, 76, 54, 98, 50, 100, 51, 111, 70, 121, 72, 109, 107, 82, 74, 110, 102, 89, 119, 71, 56, 111, 51, 112, 54, 102, 118, 57, 112, 105, 118, 78, 70, 53, 97, 111, 112, 73, 66, 122, 70, 110, 106, 122, 119, 98, 47, 86, 113, 83, 113, 51, 47, 98, 43, 77, 87, 75, 70, 109, 106, 114, 56, 84, 49, 113, 101, 52, 47, 102, 73, 84, 111, 50, 118, 66, 87, 69, 113, 68, 121, 111, 103, 86, 51, 90, 86, 71, 110, 68, 86, 105, 50, 68, 98, 105, 69, 70, 86, 83, 85, 114, 50, 101, 88, 84, 78, 90, 81, 57, 86, 47, 68, 57, 81, 67, 47, 43, 118, 67, 82, 53, 84, 71, 121, 88, 57, 81, 79, 86, 66, 103, 116, 65, 89, 116, 109, 47, 90, 84, 73, 119, 122, 80, 69, 89, 66, 57, 78, 114, 86, 49, 78, 101, 79, 49, 47, 115, 65, 122, 55, 56, 117, 48, 116, 87, 53, 57, 114, 48, 73, 43, 83, 79, 53, 74, 103, 109, 51, 66, 57, 105, 49, 116, 111, 82, 117, 114, 122, 72, 118, 57, 69, 90, 74, 57, 121, 90, 76, 56, 110, 97, 102, 98, 47, 84, 49, 70, 97, 111, 80, 68, 107, 117, 74, 102, 77, 43, 105, 80, 115, 48, 106, 56, 120, 110, 83, 55, 84, 97, 85, 47, 103, 69, 75, 48, 119, 67, 120, 101, 68, 89, 82, 89, 116, 74, 120, 57, 106, 52, 104, 85, 81, 113, 55, 112, 65, 117, 47, 84, 50, 121, 87, 121, 48, 118, 106, 99, 85, 72, 107, 105, 57, 53, 50, 90, 78, 98, 88, 110, 88, 120, 66, 56, 109, 56, 112, 86, 53, 120, 57, 69, 49, 115, 102, 76, 106, 53, 77, 90, 69, 103, 112, 85, 50, 88, 86, 56, 82, 72, 114, 86, 118, 87, 110, 105, 67, 106, 115, 102, 54, 118, 103, 120, 109, 82, 55, 43, 75, 116, 119, 73, 98, 77, 106, 97, 104, 105, 116, 85, 71, 116, 72, 101, 116, 49, 87, 100, 76, 43, 56, 77, 109, 100, 76, 50, 57, 105, 81, 74, 67, 51, 55, 112, 68, 88, 105, 114, 105, 114, 49, 78, 105, 98, 120, 75, 75, 104, 70, 89, 82, 117, 74, 51, 120, 87, 57, 79, 48, 114, 57, 43, 86, 110, 104, 56, 100, 105, 113, 98, 66, 117, 88, 113, 68, 98, 89, 82, 47, 77, 83, 111, 72, 118, 115, 99, 79, 67, 109, 50, 116, 57, 53, 100, 78, 53, 87, 66, 100, 82, 85, 111, 68, 55, 89, 67, 71, 47, 90, 72, 87, 99, 55, 89, 112, 118, 47, 120, 47, 97, 108, 52, 102, 107, 66, 50, 108, 90, 108, 89, 104, 86, 87, 72, 120, 106, 97, 111, 101, 70, 57, 106, 69, 80, 73, 48, 103, 65, 78, 53, 88, 115, 118, 85, 73, 54, 104, 98, 122, 69, 122, 87, 77, 115, 78, 87, 47, 49, 111, 114, 107, 78, 79, 110, 108, 115, 107, 97, 108, 103, 109, 112, 73, 52, 66, 50, 114, 109, 52, 71, 99, 55, 76, 78, 117, 105, 43, 77, 117, 77, 66, 114, 112, 110, 66, 118, 76, 107, 98, 89, 88, 57, 101, 120, 101, 57, 103, 56, 116, 117, 55, 119, 76, 116, 55, 83, 99, 79, 106, 68, 99, 76, 57, 57, 111, 79, 121, 82, 56, 57, 77, 104, 57, 76, 56, 114, 100, 52, 43, 52, 51, 43, 74, 81, 121, 82, 54, 116, 115, 73, 102, 99, 80, 74, 111, 54, 84, 54, 70, 120, 72, 102, 49, 49, 100, 47, 77, 71, 97, 121, 74, 105, 43, 83, 87, 99, 116, 47, 117, 104, 118, 118, 117, 97, 48, 111, 79, 104, 43, 122, 88, 78, 73, 97, 85, 122, 103, 111, 66, 109, 117, 49, 88, 85, 76, 106, 107, 112, 117, 65, 48, 71, 104, 122, 99, 116, 102, 51, 48, 106, 98, 89, 49, 65, 79, 77, 52, 57, 113, 98, 77, 90, 82, 89, 83, 57, 65, 43, 48, 83, 49, 72, 114, 72, 80, 110, 119, 82, 118, 112, 81, 89, 47, 83, 106, 52, 120, 75, 80, 110, 48, 103, 100, 112, 118, 47, 43, 105, 84, 98, 75, 74, 98, 56, 122, 107, 80, 67, 52, 47, 57, 97, 102, 48, 74, 118, 101, 115, 97, 43, 71, 68, 71, 48, 47, 105, 119, 51, 84, 115, 119, 101, 110, 77, 104, 113, 108, 104, 55, 66, 77, 57, 77, 87, 53, 116, 120, 112, 101, 98, 108, 115, 66, 121, 120, 52, 87, 110, 74, 47, 111, 72, 118, 54, 99, 99, 48, 100, 109, 77, 55, 116, 115, 86, 51, 54, 108, 89, 107, 67, 84, 85, 88, 69, 102, 47, 48, 101, 75, 108, 110, 102, 105, 118, 110, 78, 48, 103, 49, 103, 43, 106, 47, 76, 107, 57, 101, 116, 47, 117, 111, 97, 54, 84, 70, 67, 87, 48, 72, 103, 119, 70, 79, 73, 86, 70, 117, 109, 69, 89, 100, 84, 54, 55, 53, 80, 102, 117, 84, 114, 89, 79, 53, 111, 56, 90, 114, 87, 69, 73, 72, 116, 118, 50, 67, 116, 108, 114, 118, 57, 74, 51, 84, 114, 115, 108, 68, 47, 105, 75, 69, 119, 116, 105, 112, 71, 72, 116, 110, 48, 86, 97, 107, 56, 66, 57, 119, 76, 76, 43, 107, 122, 43, 67, 73, 81, 47, 86, 71, 52, 75, 74, 112, 88, 106, 120, 56, 56, 67, 101, 67, 67, 52, 88, 97, 71, 105, 116, 69, 100, 106, 65, 65, 65, 34 },
- Sexe = "F",
- Username = "Brown",
- Weight = 58f
- },
- new
- {
- IdAthlete = 5,
- DataSourceId = 3,
- DateOfBirth = new DateOnly(1991, 1, 1),
- Email = "bruce.lee@example.com",
- FirstName = "Bruce",
- IsCoach = false,
- LastName = "Lee",
- Length = 2.0,
- Password = "hello321",
- ProfilPicture = new byte[] { 34, 85, 107, 108, 71, 82, 116, 119, 68, 65, 65, 66, 88, 82, 85, 74, 81, 86, 108, 65, 52, 73, 78, 65, 68, 65, 65, 65, 119, 69, 65, 67, 100, 65, 83, 111, 113, 65, 67, 111, 65, 65, 77, 65, 83, 74, 90, 103, 67, 100, 77, 111, 83, 67, 122, 54, 53, 53, 110, 100, 85, 52, 88, 88, 65, 80, 50, 121, 88, 73, 103, 101, 53, 110, 101, 77, 47, 81, 100, 54, 87, 67, 102, 79, 56, 101, 118, 111, 106, 50, 83, 48, 65, 47, 112, 55, 43, 102, 48, 65, 110, 56, 53, 99, 66, 120, 108, 76, 68, 103, 80, 67, 56, 106, 79, 47, 48, 110, 115, 108, 47, 49, 51, 47, 79, 56, 118, 118, 122, 106, 55, 65, 102, 56, 115, 47, 112, 51, 47, 72, 52, 70, 85, 54, 116, 100, 52, 77, 67, 119, 113, 50, 51, 122, 49, 72, 50, 117, 122, 111, 75, 73, 88, 97, 113, 74, 110, 105, 80, 73, 47, 98, 82, 77, 102, 56, 113, 122, 118, 48, 90, 112, 43, 72, 69, 49, 82, 67, 66, 119, 53, 87, 81, 49, 106, 47, 74, 111, 118, 100, 77, 49, 70, 83, 53, 50, 43, 81, 99, 97, 65, 65, 65, 47, 118, 47, 43, 78, 120, 85, 52, 68, 112, 80, 107, 51, 43, 120, 81, 80, 87, 55, 116, 99, 109, 85, 82, 83, 111, 57, 118, 67, 52, 113, 99, 43, 88, 77, 120, 78, 86, 66, 122, 69, 77, 53, 69, 56, 97, 99, 116, 68, 122, 57, 56, 103, 109, 119, 84, 88, 103, 68, 54, 50, 101, 57, 69, 109, 71, 47, 101, 114, 118, 100, 100, 50, 111, 118, 70, 70, 83, 117, 120, 89, 112, 112, 87, 108, 47, 119, 116, 97, 88, 51, 114, 107, 110, 48, 120, 114, 116, 56, 113, 79, 113, 108, 47, 53, 73, 50, 106, 102, 76, 79, 110, 67, 85, 48, 107, 65, 76, 76, 99, 87, 52, 70, 47, 119, 84, 106, 85, 49, 48, 113, 115, 120, 90, 88, 87, 57, 102, 120, 97, 117, 67, 54, 79, 80, 86, 82, 70, 50, 56, 115, 99, 57, 52, 86, 57, 111, 99, 109, 111, 83, 87, 121, 43, 115, 102, 54, 106, 87, 51, 118, 89, 107, 86, 79, 104, 43, 103, 69, 47, 82, 69, 48, 76, 54, 98, 50, 100, 51, 111, 70, 121, 72, 109, 107, 82, 74, 110, 102, 89, 119, 71, 56, 111, 51, 112, 54, 102, 118, 57, 112, 105, 118, 78, 70, 53, 97, 111, 112, 73, 66, 122, 70, 110, 106, 122, 119, 98, 47, 86, 113, 83, 113, 51, 47, 98, 43, 77, 87, 75, 70, 109, 106, 114, 56, 84, 49, 113, 101, 52, 47, 102, 73, 84, 111, 50, 118, 66, 87, 69, 113, 68, 121, 111, 103, 86, 51, 90, 86, 71, 110, 68, 86, 105, 50, 68, 98, 105, 69, 70, 86, 83, 85, 114, 50, 101, 88, 84, 78, 90, 81, 57, 86, 47, 68, 57, 81, 67, 47, 43, 118, 67, 82, 53, 84, 71, 121, 88, 57, 81, 79, 86, 66, 103, 116, 65, 89, 116, 109, 47, 90, 84, 73, 119, 122, 80, 69, 89, 66, 57, 78, 114, 86, 49, 78, 101, 79, 49, 47, 115, 65, 122, 55, 56, 117, 48, 116, 87, 53, 57, 114, 48, 73, 43, 83, 79, 53, 74, 103, 109, 51, 66, 57, 105, 49, 116, 111, 82, 117, 114, 122, 72, 118, 57, 69, 90, 74, 57, 121, 90, 76, 56, 110, 97, 102, 98, 47, 84, 49, 70, 97, 111, 80, 68, 107, 117, 74, 102, 77, 43, 105, 80, 115, 48, 106, 56, 120, 110, 83, 55, 84, 97, 85, 47, 103, 69, 75, 48, 119, 67, 120, 101, 68, 89, 82, 89, 116, 74, 120, 57, 106, 52, 104, 85, 81, 113, 55, 112, 65, 117, 47, 84, 50, 121, 87, 121, 48, 118, 106, 99, 85, 72, 107, 105, 57, 53, 50, 90, 78, 98, 88, 110, 88, 120, 66, 56, 109, 56, 112, 86, 53, 120, 57, 69, 49, 115, 102, 76, 106, 53, 77, 90, 69, 103, 112, 85, 50, 88, 86, 56, 82, 72, 114, 86, 118, 87, 110, 105, 67, 106, 115, 102, 54, 118, 103, 120, 109, 82, 55, 43, 75, 116, 119, 73, 98, 77, 106, 97, 104, 105, 116, 85, 71, 116, 72, 101, 116, 49, 87, 100, 76, 43, 56, 77, 109, 100, 76, 50, 57, 105, 81, 74, 67, 51, 55, 112, 68, 88, 105, 114, 105, 114, 49, 78, 105, 98, 120, 75, 75, 104, 70, 89, 82, 117, 74, 51, 120, 87, 57, 79, 48, 114, 57, 43, 86, 110, 104, 56, 100, 105, 113, 98, 66, 117, 88, 113, 68, 98, 89, 82, 47, 77, 83, 111, 72, 118, 115, 99, 79, 67, 109, 50, 116, 57, 53, 100, 78, 53, 87, 66, 100, 82, 85, 111, 68, 55, 89, 67, 71, 47, 90, 72, 87, 99, 55, 89, 112, 118, 47, 120, 47, 97, 108, 52, 102, 107, 66, 50, 108, 90, 108, 89, 104, 86, 87, 72, 120, 106, 97, 111, 101, 70, 57, 106, 69, 80, 73, 48, 103, 65, 78, 53, 88, 115, 118, 85, 73, 54, 104, 98, 122, 69, 122, 87, 77, 115, 78, 87, 47, 49, 111, 114, 107, 78, 79, 110, 108, 115, 107, 97, 108, 103, 109, 112, 73, 52, 66, 50, 114, 109, 52, 71, 99, 55, 76, 78, 117, 105, 43, 77, 117, 77, 66, 114, 112, 110, 66, 118, 76, 107, 98, 89, 88, 57, 101, 120, 101, 57, 103, 56, 116, 117, 55, 119, 76, 116, 55, 83, 99, 79, 106, 68, 99, 76, 57, 57, 111, 79, 121, 82, 56, 57, 77, 104, 57, 76, 56, 114, 100, 52, 43, 52, 51, 43, 74, 81, 121, 82, 54, 116, 115, 73, 102, 99, 80, 74, 111, 54, 84, 54, 70, 120, 72, 102, 49, 49, 100, 47, 77, 71, 97, 121, 74, 105, 43, 83, 87, 99, 116, 47, 117, 104, 118, 118, 117, 97, 48, 111, 79, 104, 43, 122, 88, 78, 73, 97, 85, 122, 103, 111, 66, 109, 117, 49, 88, 85, 76, 106, 107, 112, 117, 65, 48, 71, 104, 122, 99, 116, 102, 51, 48, 106, 98, 89, 49, 65, 79, 77, 52, 57, 113, 98, 77, 90, 82, 89, 83, 57, 65, 43, 48, 83, 49, 72, 114, 72, 80, 110, 119, 82, 118, 112, 81, 89, 47, 83, 106, 52, 120, 75, 80, 110, 48, 103, 100, 112, 118, 47, 43, 105, 84, 98, 75, 74, 98, 56, 122, 107, 80, 67, 52, 47, 57, 97, 102, 48, 74, 118, 101, 115, 97, 43, 71, 68, 71, 48, 47, 105, 119, 51, 84, 115, 119, 101, 110, 77, 104, 113, 108, 104, 55, 66, 77, 57, 77, 87, 53, 116, 120, 112, 101, 98, 108, 115, 66, 121, 120, 52, 87, 110, 74, 47, 111, 72, 118, 54, 99, 99, 48, 100, 109, 77, 55, 116, 115, 86, 51, 54, 108, 89, 107, 67, 84, 85, 88, 69, 102, 47, 48, 101, 75, 108, 110, 102, 105, 118, 110, 78, 48, 103, 49, 103, 43, 106, 47, 76, 107, 57, 101, 116, 47, 117, 111, 97, 54, 84, 70, 67, 87, 48, 72, 103, 119, 70, 79, 73, 86, 70, 117, 109, 69, 89, 100, 84, 54, 55, 53, 80, 102, 117, 84, 114, 89, 79, 53, 111, 56, 90, 114, 87, 69, 73, 72, 116, 118, 50, 67, 116, 108, 114, 118, 57, 74, 51, 84, 114, 115, 108, 68, 47, 105, 75, 69, 119, 116, 105, 112, 71, 72, 116, 110, 48, 86, 97, 107, 56, 66, 57, 119, 76, 76, 43, 107, 122, 43, 67, 73, 81, 47, 86, 71, 52, 75, 74, 112, 88, 106, 120, 56, 56, 67, 101, 67, 67, 52, 88, 97, 71, 105, 116, 69, 100, 106, 65, 65, 65, 34 },
- Sexe = "M",
- Username = "Lee",
- Weight = 90f
- });
- });
-
- modelBuilder.Entity("Entities.DataSourceEntity", b =>
- {
- b.Property("IdSource")
- .ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
-
- b.Property("Model")
- .IsRequired()
- .HasMaxLength(100)
- .HasColumnType("TEXT");
-
- b.Property("Precision")
- .HasColumnType("REAL");
-
- b.Property("Type")
- .IsRequired()
- .HasMaxLength(100)
- .HasColumnType("TEXT");
-
- b.HasKey("IdSource");
-
- b.ToTable("DataSource");
-
- b.HasData(
- new
- {
- IdSource = 1,
- Model = "Garmin",
- Precision = 0.5f,
- Type = "Smartwatch"
- },
- new
- {
- IdSource = 2,
- Model = "Polar",
- Precision = 0.5f,
- Type = "Smartwatch"
- },
- new
- {
- IdSource = 3,
- Model = "Suunto",
- Precision = 0.5f,
- Type = "Smartwatch"
- },
- new
- {
- IdSource = 4,
- Model = "Fitbit",
- Precision = 0.5f,
- Type = "Smartwatch"
- },
- new
- {
- IdSource = 5,
- Model = "Apple Watch",
- Precision = 0.5f,
- Type = "Smartwatch"
- });
- });
-
- modelBuilder.Entity("Entities.FriendshipEntity", b =>
- {
- b.Property("FollowingId")
- .HasColumnType("INTEGER");
-
- b.Property("FollowerId")
- .HasColumnType("INTEGER");
-
- b.Property("StartDate")
- .HasColumnType("TEXT");
-
- b.HasKey("FollowingId", "FollowerId");
-
- b.HasIndex("FollowerId");
-
- b.ToTable("FriendshipEntity");
-
- b.HasData(
- new
- {
- FollowingId = 2,
- FollowerId = 1,
- StartDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)
- },
- new
- {
- FollowingId = 3,
- FollowerId = 1,
- StartDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)
- },
- new
- {
- FollowingId = 4,
- FollowerId = 1,
- StartDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)
- },
- new
- {
- FollowingId = 5,
- FollowerId = 1,
- StartDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)
- },
- new
- {
- FollowingId = 1,
- FollowerId = 2,
- StartDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)
- },
- new
- {
- FollowingId = 3,
- FollowerId = 2,
- StartDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)
- });
- });
-
- modelBuilder.Entity("Entities.HeartRateEntity", b =>
- {
- b.Property("IdHeartRate")
- .ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
-
- b.Property("ActivityId")
- .HasColumnType("INTEGER");
-
- b.Property("Altitude")
- .HasColumnType("REAL");
-
- b.Property("Bpm")
- .HasColumnType("INTEGER");
-
- b.Property("Latitude")
- .HasColumnType("REAL");
-
- b.Property("Longitude")
- .HasColumnType("REAL");
-
- b.Property("Temperature")
- .HasColumnType("REAL");
-
- b.Property("Time")
- .HasColumnType("TEXT");
-
- b.HasKey("IdHeartRate");
-
- b.HasIndex("ActivityId");
-
- b.ToTable("HeartRate");
-
- b.HasData(
- new
- {
- IdHeartRate = 1,
- ActivityId = 1,
- Altitude = 0.0,
- Bpm = 60,
- Latitude = 66f,
- Longitude = 35f,
- Temperature = 20f,
- Time = new TimeOnly(13, 0, 30)
- },
- new
- {
- IdHeartRate = 2,
- ActivityId = 2,
- Altitude = 10.0,
- Bpm = 65,
- Latitude = 67f,
- Longitude = 35f,
- Temperature = 20.5f,
- Time = new TimeOnly(13, 0, 31)
- },
- new
- {
- IdHeartRate = 3,
- ActivityId = 1,
- Altitude = 11.0,
- Bpm = 71,
- Latitude = 66f,
- Longitude = 36f,
- Temperature = 20f,
- Time = new TimeOnly(13, 0, 32)
- },
- new
- {
- IdHeartRate = 4,
- ActivityId = 2,
- Altitude = 12.0,
- Bpm = 75,
- Latitude = 67f,
- Longitude = 36f,
- Temperature = 20.5f,
- Time = new TimeOnly(13, 0, 33)
- },
- new
- {
- IdHeartRate = 5,
- ActivityId = 4,
- Altitude = 13.0,
- Bpm = 80,
- Latitude = 66f,
- Longitude = 37f,
- Temperature = 20f,
- Time = new TimeOnly(13, 0, 34)
- });
- });
-
- modelBuilder.Entity("Entities.NotificationEntity", b =>
- {
- b.Property("IdNotif")
- .ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
-
- b.Property("Date")
- .HasColumnType("TEXT");
-
- b.Property("Message")
- .IsRequired()
- .HasMaxLength(100)
- .HasColumnType("TEXT");
-
- b.Property("SenderId")
- .HasColumnType("INTEGER");
-
- b.Property("Statut")
- .HasColumnType("INTEGER");
-
- b.Property("Urgence")
- .IsRequired()
- .HasMaxLength(100)
- .HasColumnType("TEXT");
-
- b.HasKey("IdNotif");
-
- b.HasIndex("SenderId");
-
- 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",
- SenderId = 1,
- 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",
- SenderId = 2,
- 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",
- SenderId = 3,
- 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",
- SenderId = 4,
- 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",
- SenderId = 5,
- Statut = true,
- Urgence = "3"
- });
- });
-
- modelBuilder.Entity("Entities.StatisticEntity", b =>
- {
- b.Property("IdStatistic")
- .ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
-
- b.Property("AthleteId")
- .HasColumnType("INTEGER");
-
- b.Property("AverageCaloriesBurned")
- .HasColumnType("REAL");
-
- b.Property("AverageHeartRate")
- .HasColumnType("REAL");
-
- b.Property("Date")
- .HasColumnType("TEXT");
-
- b.Property("MaximumHeartRate")
- .HasColumnType("REAL");
-
- b.Property("Weight")
- .HasColumnType("REAL");
-
- b.HasKey("IdStatistic");
-
- b.HasIndex("AthleteId");
-
- b.ToTable("Statistic");
-
- b.HasData(
- new
- {
- IdStatistic = 1,
- AthleteId = 1,
- AverageCaloriesBurned = 500.0,
- AverageHeartRate = 120.0,
- Date = new DateOnly(2021, 12, 12),
- MaximumHeartRate = 180.0,
- Weight = 75f
- },
- new
- {
- IdStatistic = 2,
- AthleteId = 2,
- AverageCaloriesBurned = 600.0,
- AverageHeartRate = 130.0,
- Date = new DateOnly(2021, 1, 11),
- MaximumHeartRate = 190.0,
- Weight = 60f
- },
- new
- {
- IdStatistic = 3,
- AthleteId = 1,
- AverageCaloriesBurned = 550.0,
- AverageHeartRate = 125.0,
- Date = new DateOnly(2022, 12, 30),
- MaximumHeartRate = 185.0,
- Weight = 68f
- },
- new
- {
- IdStatistic = 4,
- AthleteId = 3,
- AverageCaloriesBurned = 650.0,
- AverageHeartRate = 135.0,
- Date = new DateOnly(2023, 2, 20),
- MaximumHeartRate = 195.0,
- Weight = 58f
- },
- new
- {
- IdStatistic = 5,
- AthleteId = 4,
- AverageCaloriesBurned = 450.0,
- AverageHeartRate = 110.0,
- Date = new DateOnly(2024, 1, 10),
- MaximumHeartRate = 170.0,
- Weight = 90f
- });
- });
-
- modelBuilder.Entity("Entities.TrainingEntity", b =>
- {
- b.Property("IdTraining")
- .ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
-
- b.Property("CoachId")
- .HasColumnType("INTEGER");
-
- b.Property("Date")
- .HasColumnType("TEXT");
-
- b.Property("Description")
- .HasMaxLength(300)
- .HasColumnType("TEXT");
-
- b.Property("FeedBack")
- .HasMaxLength(300)
- .HasColumnType("TEXT");
-
- b.Property("Latitude")
- .HasColumnType("REAL");
-
- b.Property("Longitude")
- .HasColumnType("REAL");
-
- b.HasKey("IdTraining");
-
- b.HasIndex("CoachId");
-
- b.ToTable("Training");
-
- b.HasData(
- new
- {
- IdTraining = 1,
- CoachId = 1,
- Date = new DateOnly(2024, 1, 19),
- Description = "Running",
- FeedBack = "Good",
- Latitude = 48.8566f,
- Longitude = 2.3522f
- },
- new
- {
- IdTraining = 2,
- CoachId = 5,
- Date = new DateOnly(2024, 2, 20),
- Description = "Cycling",
- Latitude = 48.8566f,
- Longitude = 2.3522f
- },
- new
- {
- IdTraining = 3,
- CoachId = 4,
- Date = new DateOnly(2024, 2, 21),
- FeedBack = "Good",
- Latitude = 48.8566f,
- Longitude = 2.3522f
- },
- new
- {
- IdTraining = 4,
- CoachId = 3,
- Date = new DateOnly(2024, 2, 22),
- Description = "Running",
- FeedBack = "Good",
- Latitude = 48.8566f,
- Longitude = 2.3522f
- },
- new
- {
- IdTraining = 5,
- CoachId = 1,
- Date = new DateOnly(2024, 2, 23),
- Description = "Cycling",
- Latitude = 48.8566f,
- Longitude = 2.3522f
- });
- });
-
- modelBuilder.Entity("AthleteEntityNotificationEntity", b =>
- {
- b.HasOne("Entities.NotificationEntity", null)
- .WithMany()
- .HasForeignKey("NotificationsReceivedIdNotif")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("Entities.AthleteEntity", null)
- .WithMany()
- .HasForeignKey("ReceiversIdAthlete")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
-
- modelBuilder.Entity("AthleteEntityTrainingEntity", b =>
- {
- b.HasOne("Entities.AthleteEntity", null)
- .WithMany()
- .HasForeignKey("AthletesIdAthlete")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("Entities.TrainingEntity", null)
- .WithMany()
- .HasForeignKey("TrainingsAthleteIdTraining")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
-
- modelBuilder.Entity("Entities.ActivityEntity", b =>
- {
- b.HasOne("Entities.AthleteEntity", "Athlete")
- .WithMany("Activities")
- .HasForeignKey("AthleteId");
-
- b.HasOne("Entities.DataSourceEntity", "DataSource")
- .WithMany("Activities")
- .HasForeignKey("DataSourceId");
-
- b.Navigation("Athlete");
-
- b.Navigation("DataSource");
- });
-
- modelBuilder.Entity("Entities.AthleteEntity", b =>
- {
- b.HasOne("Entities.DataSourceEntity", "DataSource")
- .WithMany("Athletes")
- .HasForeignKey("DataSourceId");
-
- b.Navigation("DataSource");
- });
-
- modelBuilder.Entity("Entities.FriendshipEntity", b =>
- {
- b.HasOne("Entities.AthleteEntity", "Follower")
- .WithMany("Followers")
- .HasForeignKey("FollowerId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("Entities.AthleteEntity", "Following")
- .WithMany("Followings")
- .HasForeignKey("FollowingId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("Follower");
-
- b.Navigation("Following");
- });
-
- modelBuilder.Entity("Entities.HeartRateEntity", b =>
- {
- b.HasOne("Entities.ActivityEntity", "Activity")
- .WithMany("HeartRates")
- .HasForeignKey("ActivityId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("Activity");
- });
-
- modelBuilder.Entity("Entities.NotificationEntity", b =>
- {
- b.HasOne("Entities.AthleteEntity", "Sender")
- .WithMany("NotificationsSent")
- .HasForeignKey("SenderId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("Sender");
- });
-
- modelBuilder.Entity("Entities.StatisticEntity", b =>
- {
- b.HasOne("Entities.AthleteEntity", "Athlete")
- .WithMany("Statistics")
- .HasForeignKey("AthleteId");
-
- b.Navigation("Athlete");
- });
-
- modelBuilder.Entity("Entities.TrainingEntity", b =>
- {
- b.HasOne("Entities.AthleteEntity", "Coach")
- .WithMany("TrainingsCoach")
- .HasForeignKey("CoachId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("Coach");
- });
-
- modelBuilder.Entity("Entities.ActivityEntity", b =>
- {
- b.Navigation("HeartRates");
- });
-
- modelBuilder.Entity("Entities.AthleteEntity", b =>
- {
- b.Navigation("Activities");
-
- b.Navigation("Followers");
-
- b.Navigation("Followings");
-
- b.Navigation("NotificationsSent");
-
- b.Navigation("Statistics");
-
- b.Navigation("TrainingsCoach");
- });
-
- modelBuilder.Entity("Entities.DataSourceEntity", b =>
- {
- b.Navigation("Activities");
-
- b.Navigation("Athletes");
- });
-#pragma warning restore 612, 618
- }
- }
-}
diff --git a/src/StubbedContextLib/StubbedContextLib.csproj b/src/StubbedContextLib/StubbedContextLib.csproj
index ecea2c4..bdd147f 100644
--- a/src/StubbedContextLib/StubbedContextLib.csproj
+++ b/src/StubbedContextLib/StubbedContextLib.csproj
@@ -1,16 +1,16 @@
-
-
-
+
+