diff --git a/src/ApiMappeur/ActivityMappeur.cs b/src/ApiMappeur/ActivityMappeur.cs deleted file mode 100644 index f8ce103..0000000 --- a/src/ApiMappeur/ActivityMappeur.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Dto; -using Model; - -namespace ApiMappeur; - -public static class ActivityMappeur -{ - public static ActivityDto ToDto(this Activity activity) - { - throw new NotImplementedException(); - } - -} \ No newline at end of file diff --git a/src/EFMappers/ActivityMapper.cs b/src/EFMappers/ActivityMapper.cs new file mode 100644 index 0000000..c95a048 --- /dev/null +++ b/src/EFMappers/ActivityMapper.cs @@ -0,0 +1,80 @@ +using Entities; +using Model; +using Shared; + +namespace EFMappers; + +public static class ActivityMapper +{ + private static GenericMapper _mapper = new GenericMapper(); + public static Activity? GetModel(ActivityEntity entity) => + _mapper.GetT(entity); + public static ActivityEntity? GetEntity(Activity model) => + _mapper.GetU(model); + public static void Add(Activity model, ActivityEntity entity) + { + var tuple = new Tuple(model, entity); + _mapper.Add(model, entity); + } + // ! RESET + // ? Quand on fait appel au reset ? + // * Apres des saves changing ou rollback. + public static void Reset() + { + _mapper.Reset(); + } + public static Activity? ToModel(this ActivityEntity entity) + { + // return entity.ToModel(); + return entity.ToT(_mapper, activity => new Activity ( + entity.IdActivity, + entity.Type, + new DateTime(entity.Date.Year, entity.Date.Month, entity.Date.Day), + new DateTime().Add(entity.StartTime.ToTimeSpan()), + new DateTime().Add(entity.EndTime.ToTimeSpan()), + entity.EffortFelt, + entity.Variability, + entity.Variance, + entity.StandardDeviation, + entity.Average, + entity.Maximum, + entity.Minimum, + entity.AverageTemperature, + entity.HasAutoPause)); + // ! regarder a ce que le model est bien les relation comme l'EF + // ), (activity, entity) => activity.Id = entity.IdActivity); + + } + // dictionnaire; + + + public static ActivityEntity? ToEntity(this Activity model) + { + // return model.ToEntity(); + return model.ToU(_mapper, activityEntity => new ActivityEntity + { + IdActivity = model.Id, + Type = model.Type, + Date = DateOnly.FromDateTime(model.Date), + StartTime = TimeOnly.FromDateTime(model.StartTime), + EndTime = TimeOnly.FromDateTime(model.EndTime), + EffortFelt = model.Effort, + Variability = model.Variability, + Variance = model.Variance, + StandardDeviation = model.StandardDeviation, + Average = model.Average, + Maximum = model.Maximum, + Minimum = model.Minimum, + AverageTemperature = model.AverageTemperature, + HasAutoPause = model.HasAutoPause + } + // ! regarder a ce que le model est bien les relation comme l'EF + ); + } + + public static IEnumerable ToModels(this IEnumerable entities) + => entities.Select(a => a.ToModel()); + + public static IEnumerable ToEntities(this IEnumerable models) + => models.Select(a => a.ToEntity()); +} \ No newline at end of file diff --git a/src/ApiMappeur/AthleteMappeur.cs b/src/EFMappers/AthleteMappeur.cs similarity index 99% rename from src/ApiMappeur/AthleteMappeur.cs rename to src/EFMappers/AthleteMappeur.cs index 6737e3b..219305d 100644 --- a/src/ApiMappeur/AthleteMappeur.cs +++ b/src/EFMappers/AthleteMappeur.cs @@ -22,7 +22,6 @@ public static class UserMappeur DateOfBirth = user.DateOfBirth, IsCoach = user.Role is Coach }; - } public static User ToModel(this UserDto userDto) diff --git a/src/ApiMappeur/ApiMappeur.csproj b/src/EFMappers/EFMappers.csproj similarity index 83% rename from src/ApiMappeur/ApiMappeur.csproj rename to src/EFMappers/EFMappers.csproj index 7ba11f5..916706d 100644 --- a/src/ApiMappeur/ApiMappeur.csproj +++ b/src/EFMappers/EFMappers.csproj @@ -7,8 +7,8 @@ - + diff --git a/src/HeartTrack.sln b/src/HeartTrack.sln index 2c7a9fa..57167ac 100644 --- a/src/HeartTrack.sln +++ b/src/HeartTrack.sln @@ -29,8 +29,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestsXUnit", "Tests\TestsAP EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Model", "Model\Model.csproj", "{30AB7FAA-6072-40B6-A15E-9188B59144F9}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ApiMappeur", "ApiMappeur\ApiMappeur.csproj", "{CB142F6B-0FF1-45B3-AB46-6F8DCD096C20}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTestApi", "Tests\TestsAPI\UnitTestApi\UnitTestApi.csproj", "{E515C8B6-6282-4D8B-8523-7B3A13E4AF58}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTestsEntities", "Tests\UnitTestsEntities\UnitTestsEntities.csproj", "{31FA8E5E-D642-4C43-A2B2-02B9832B2CEC}" @@ -39,6 +37,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Model2Entities", "Model2Ent EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StubAPI", "StubAPI\StubAPI.csproj", "{C9BD0310-DC18-4356-B8A7-2B6959AF7813}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleTestEFMapper", "Tests\ConsoleTestEFMapper\ConsoleTestEFMapper.csproj", "{73EA27F2-9F0C-443F-A5EE-2960C983A422}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EFMappers", "EFMappers\EFMappers.csproj", "{9397795D-F482-44C4-8443-A20AC26671AA}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -116,6 +118,22 @@ Global {C9BD0310-DC18-4356-B8A7-2B6959AF7813}.Debug|Any CPU.Build.0 = Debug|Any CPU {C9BD0310-DC18-4356-B8A7-2B6959AF7813}.Release|Any CPU.ActiveCfg = Release|Any CPU {C9BD0310-DC18-4356-B8A7-2B6959AF7813}.Release|Any CPU.Build.0 = Release|Any CPU + {06DBE9E4-6AA5-4D09-8544-D3ED91E2D980}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {06DBE9E4-6AA5-4D09-8544-D3ED91E2D980}.Debug|Any CPU.Build.0 = Debug|Any CPU + {06DBE9E4-6AA5-4D09-8544-D3ED91E2D980}.Release|Any CPU.ActiveCfg = Release|Any CPU + {06DBE9E4-6AA5-4D09-8544-D3ED91E2D980}.Release|Any CPU.Build.0 = Release|Any CPU + {73EA27F2-9F0C-443F-A5EE-2960C983A422}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {73EA27F2-9F0C-443F-A5EE-2960C983A422}.Debug|Any CPU.Build.0 = Debug|Any CPU + {73EA27F2-9F0C-443F-A5EE-2960C983A422}.Release|Any CPU.ActiveCfg = Release|Any CPU + {73EA27F2-9F0C-443F-A5EE-2960C983A422}.Release|Any CPU.Build.0 = Release|Any CPU + {C9C9F2A5-9132-4067-B240-B299D2FCF4E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C9C9F2A5-9132-4067-B240-B299D2FCF4E9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C9C9F2A5-9132-4067-B240-B299D2FCF4E9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C9C9F2A5-9132-4067-B240-B299D2FCF4E9}.Release|Any CPU.Build.0 = Release|Any CPU + {9397795D-F482-44C4-8443-A20AC26671AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {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 EndGlobalSection GlobalSection(NestedProjects) = preSolution {477D2129-A6C9-4FF8-8BE9-5E9E8E5282F8} = {2B227C67-3BEC-4A83-BDA0-F3918FBC0D18} @@ -125,5 +143,6 @@ Global {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} EndGlobalSection EndGlobal diff --git a/src/HeartTrackAPI/Controllers/ActivityController.cs b/src/HeartTrackAPI/Controllers/ActivityController.cs index 0319803..5aaf722 100644 --- a/src/HeartTrackAPI/Controllers/ActivityController.cs +++ b/src/HeartTrackAPI/Controllers/ActivityController.cs @@ -1,4 +1,3 @@ -using ApiMappeur; using Dto; using HeartTrackAPI.Request; using HeartTrackAPI.Responce; @@ -37,8 +36,9 @@ 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); + // var pageResponse = new PageResponse(pageRequest.Index, pageRequest.Count, totalCount, activities.Select(a => a.ToDto())); + // return Ok(pageResponse); + return Ok(); } catch (Exception e) { diff --git a/src/HeartTrackAPI/Controllers/UsersController.cs b/src/HeartTrackAPI/Controllers/UsersController.cs index ea98a15..a8d0a09 100644 --- a/src/HeartTrackAPI/Controllers/UsersController.cs +++ b/src/HeartTrackAPI/Controllers/UsersController.cs @@ -1,4 +1,3 @@ -using ApiMappeur; using Dto; using HeartTrackAPI.Request; using HeartTrackAPI.Responce; @@ -40,8 +39,9 @@ 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); + // var pageResponse = new PageResponse(request.Index, request.Count, totalCount, athletes.Select(a => a.ToDto())); + // return Ok(pageResponse); + return Ok(); } catch (Exception e) { @@ -65,7 +65,8 @@ 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(athlete.ToDto()); + return Ok(); } catch (Exception e) { @@ -108,13 +109,14 @@ 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()); + // 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(); } catch (Exception e) diff --git a/src/HeartTrackAPI/HeartTrackAPI.csproj b/src/HeartTrackAPI/HeartTrackAPI.csproj index c572e11..2c5e31d 100644 --- a/src/HeartTrackAPI/HeartTrackAPI.csproj +++ b/src/HeartTrackAPI/HeartTrackAPI.csproj @@ -13,7 +13,6 @@ - @@ -21,7 +20,7 @@ - + ..\..\..\..\..\.nuget\packages\newtonsoft.json\13.0.1\lib\netstandard2.0\Newtonsoft.Json.dll diff --git a/src/Model2Entities/ActivityRepository.cs b/src/Model2Entities/ActivityRepository.cs index f94e7e4..facb34c 100644 --- a/src/Model2Entities/ActivityRepository.cs +++ b/src/Model2Entities/ActivityRepository.cs @@ -1,49 +1,125 @@ using Model; using Model.Repository; using Shared; +using Model.Manager; +using Microsoft.Extensions.Logging; +using Entities; +using EFMappers; +using Microsoft.EntityFrameworkCore; namespace Model2Entities; -public partial class DbDataManager +public partial class DbDataManager : IDataManager { public class ActivityRepository : IActivityRepository { private readonly DbDataManager _dataManager; + private readonly ILogger _logger = new Logger(new LoggerFactory()); + // logger et tests sur tout et mapper public ActivityRepository(DbDataManager dataManager) { _dataManager = dataManager; + // _logger = logger; } - public async Task> GetActivities(int index, int count, ActivityOrderCriteria criteria, bool descending = false) { - throw new NotImplementedException(); + _logger.LogInformation($"GetActivities with index {index} and count {count}", index, count); + _logger.LogInformation($"GetActivities with criteria {criteria} and descending {descending}", criteria, descending); + + var activities = _dataManager.DbContext.ActivitiesSet.GetItemsWithFilterAndOrdering(b => true, index, count, criteria, descending).ToModels(); + + _logger.LogInformation($"Retrieved {activities.Count()} activities"); + return await Task.FromResult(activities); } public async Task GetActivityByIdAsync(int id) { - throw new NotImplementedException(); + _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(); + + if (activity != null) + _logger.LogInformation($"Retrieved activity with ID {id}"); + else + _logger.LogWarning($"No activity found with ID {id}"); + + return await Task.FromResult(activity); } public async Task AddActivity(Activity activity) { - throw new NotImplementedException(); + try + { + _logger.LogInformation("Adding new activity"); + var addedActivity = (await _dataManager.DbContext.AddItem(activity.ToEntity())).ToModel(); + if (addedActivity != null) + _logger.LogInformation($"Added activity with ID {addedActivity.Id}"); + else + _logger.LogError("Failed to add activity"); + return await Task.FromResult(addedActivity); + } + catch (Exception ex) + { + _logger.LogError(ex, "Error occurred while adding activity"); + throw; + } } public async Task UpdateActivity(int id, Activity activity) { - throw new NotImplementedException(); + try + { + return activity; + // _logger.LogInformation($"Updating activity with ID {id}"); + // var updatedActivity = await _dataManager.DbContext.ActivitiesSet.UpdateItem(_dataManager.DbContext,(await GetActivityByIdAsync(id)).ToEntity(), activity.ToEntity()); + // if (updatedActivity != null) + // _logger.LogInformation($"Updated activity with ID {id}"); + // else + // _logger.LogError($"Failed to update activity with ID {id}"); + // return await Task.FromResult(updatedActivity.ToModel()); + } + catch (Exception ex) + { + _logger.LogError(ex, $"Error occurred while updating activity with ID {id}"); + throw; + } } public async Task DeleteActivity(int id) { - throw new NotImplementedException(); + try + { + _logger.LogInformation($"Deleting activity with ID {id}"); + var isDeleted = await _dataManager.DbContext.DeleteItem(id); + if (isDeleted) + _logger.LogInformation($"Deleted activity with ID {id}"); + else + _logger.LogWarning($"No activity found with ID {id}"); + return await Task.FromResult(isDeleted); + } + catch (Exception ex) + { + _logger.LogError(ex, $"Error occurred while deleting activity with ID {id}"); + throw; + } } public async Task GetNbItems() { - throw new NotImplementedException(); + try + { + _logger.LogInformation("Getting the total number of activities"); + var count = await _dataManager.DbContext.ActivitiesSet.CountAsync(); + _logger.LogInformation($"Total number of activities: {count}"); + return await Task.FromResult(count); + } + catch (Exception ex) + { + _logger.LogError(ex, "Error occurred while getting the total number of activities"); + throw; + } } } } \ No newline at end of file diff --git a/src/Model2Entities/DbDataManager.cs b/src/Model2Entities/DbDataManager.cs index ec2a3fe..52f441f 100644 --- a/src/Model2Entities/DbDataManager.cs +++ b/src/Model2Entities/DbDataManager.cs @@ -1,4 +1,6 @@ using DbContextLib; +using EFMappers; +using Microsoft.EntityFrameworkCore; using Model.Manager; using Model.Repository; @@ -11,12 +13,14 @@ public partial class DbDataManager: IDataManager protected HeartTrackContext DbContext { get; } - -public DbDataManager(HeartTrackContext dbContext) + // mettre si pb lors d'une requete si rollback ou pas + public DbDataManager(HeartTrackContext dbContext) { DbContext = dbContext; ActivityRepo = new ActivityRepository(this); UserRepo = new UserRepository(this); + ActivityMapper.Reset(); + // Faire pour les autres reset() des autres mappers } public DbDataManager() diff --git a/src/Model2Entities/Extension.cs b/src/Model2Entities/Extension.cs index d404f58..24c1e2b 100644 --- a/src/Model2Entities/Extension.cs +++ b/src/Model2Entities/Extension.cs @@ -1,13 +1,169 @@ +using DbContextLib; +using Entities; +using Model; + +namespace Model2Entities; + + +public static class Extensions +{ + internal static Task AddItem(this HeartTrackContext context, T? item) where T :class + { + if(item == null || context.Set().Contains(item)) + { + return Task.FromResult(default(T)); + } + context.Set().Add(item); + context.SaveChangesAsync(); + + return Task.FromResult(item); + } + + internal static Task DeleteItem(this HeartTrackContext context, int? id) where T:class + { + var item = context.Set().Find(id); + if(item == null) + { + return Task.FromResult(false); + } + context.Set().Remove(item); + context.SaveChangesAsync(); + return Task.FromResult(true); + } + + internal static async Task UpdateItem(this IList collection, T? oldItem, T? newItem) where T : class + { + // if(oldItem == null || newItem == null) return default(T); + + // if(!collection.Contains(oldItem)) + // { + // return default(T); + // } + + // collection.Remove(oldItem!); + // await collection.AddItem(newItem!); + // return newItem; + return await Task.FromResult(default(T)); + } + + 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); + + if(orderCriterium != null) + { + filteredList = filteredList.OrderByCriteria(orderCriterium, descending); + } + return filteredList + .Skip(index * count) + .Take(count); + } + + public static IOrderedEnumerable OrderByCriteria(this IEnumerable list, Enum orderCriterium, bool descending = false ) where T : class + { + var orderCriteriumString = orderCriterium.ToString(); + if (orderCriteriumString.StartsWith("By")) + { + orderCriteriumString = orderCriteriumString.Substring(2); + } + var propertyInfo = typeof(T).GetProperty(orderCriteriumString); + if (propertyInfo == null) + { + throw new ArgumentException($"No property {orderCriterium} in type {typeof(T)}"); + } + + return descending ? list.OrderByDescending(x => propertyInfo.GetValue(x)) : list.OrderBy(x => propertyInfo.GetValue(x)); + } + + // public static Activity ToModel(this ActivityEntity entity) + // { + // return new Activity ( + // entity.IdActivity, + // entity.Type, + // new DateTime(entity.Date.Year, entity.Date.Month, entity.Date.Day), + // new DateTime().Add(entity.StartTime.ToTimeSpan()), // Utilisation de ToTimeSpan() pour obtenir la composante temps sans la date + // new DateTime().Add(entity.EndTime.ToTimeSpan()), + // entity.EffortFelt, + // entity.Variability, + // entity.Variance, + // entity.StandardDeviation, + // entity.Average, + // entity.Maximum, + // entity.Minimum, + // entity.AverageTemperature, + // entity.HasAutoPause + // ); + // } + + // public static ActivityEntity ToEntity(this Activity model) + // { + // return new ActivityEntity + // { + // IdActivity = model.Id, + // Type = model.Type, + // Date = DateOnly.FromDateTime(model.Date), + // StartTime = TimeOnly.FromDateTime(model.StartTime), + // EndTime = TimeOnly.FromDateTime(model.EndTime), + // EffortFelt = model.Effort, + // Variability = model.Variability, + // Variance = model.Variance, + // StandardDeviation = model.StandardDeviation, + // Average = model.Average, + // Maximum = model.Maximum, + // Minimum = model.Minimum, + // AverageTemperature = model.AverageTemperature, + // HasAutoPause = model.HasAutoPause + // }; + // } + + // public static IEnumerable ToModels(this IEnumerable entities) + // => entities.Select(a => a.ToModel()); + + // public static IEnumerable ToEntities(this IEnumerable models) + // => models.Select(a => a.ToEntity()); +} + // using System; // using Entities; // using Models; +// using System.Collections.Generic; // Add missing namespace // namespace Model2Entities // { -// public static class Extension +// public static class Extension +// { + + +// public static TEntity ToEntity(this T model) +// where TEntity : new() +// { +// return new TEntity +// { +// Id = model.Id, +// Title = model.Title, +// Author = model.Author, +// Isbn = model.Isbn +// }; +// } + +// public static IEnumerable ToEntities(this IEnumerable models) // Add missing type parameter +// where TEntity : new() // Add constraint for TEntity +// { +// return models.Select(m => m.ToEntity()); +// } + +// public static T ToModel(this TEntity myTEntity) // Add missing type parameter +// where T : new() // Add constraint for T +// { +// return new T(myTEntity.Id, myTEntity.Title, myTEntity.Author, myTEntity.Isbn); +// } + +// public static IEnumerable ToModels(this IEnumerable TsEntities) +// => TsEntities.Select(e => e.ToModel()); +// } // { -// public static TEntity ToEntity(this Book model) -// => new BookEntity +// public static T ToEntity(this T model) +// => new TEntity // { // Id = model.Id, // Title = model.Title, @@ -15,13 +171,13 @@ // Isbn = model.Isbn // }; -// public static IEnumerable ToEntities(this IEnumerable models) +// public static IEnumerable ToEntities(this IEnumerable models) // => models.Select(m => m.ToEntity()); -// public static Book ToModel(this TEntity myBookEntity) -// => new Book(myBookEntity.Id, myBookEntity.Title, myBookEntity.Author, myBookEntity.Isbn); +// public static T ToModel(this T myTEntity) +// => new T(myTEntity.Id, myTEntity.Title, myTEntity.Author, myTEntity.Isbn); -// public static IEnumerable ToModels(this IEnumerable booksEntities) -// => booksEntities.Select(e => e.ToModel()); +// public static IEnumerable ToModels(this IEnumerable TsEntities) +// => TsEntities.Select(e => e.ToModel()); // } // } \ No newline at end of file diff --git a/src/Model2Entities/Model2Entities.csproj b/src/Model2Entities/Model2Entities.csproj index b250a0c..bb068f4 100644 --- a/src/Model2Entities/Model2Entities.csproj +++ b/src/Model2Entities/Model2Entities.csproj @@ -9,6 +9,7 @@ + diff --git a/src/Shared/ActivityOrderCriteria.cs b/src/Shared/ActivityOrderCriteria.cs index f1e30ed..5c7b64a 100644 --- a/src/Shared/ActivityOrderCriteria.cs +++ b/src/Shared/ActivityOrderCriteria.cs @@ -3,7 +3,6 @@ namespace Shared; public enum ActivityOrderCriteria { None, - ByName, ByType, ByDate, ByDuration, diff --git a/src/Shared/DataSourceOrderCriteria.cs b/src/Shared/DataSourceOrderCriteria.cs new file mode 100644 index 0000000..9e78721 --- /dev/null +++ b/src/Shared/DataSourceOrderCriteria.cs @@ -0,0 +1,10 @@ +namespace Shared; + +public enum DataSourceOrderCriteria +{ + None, + ByName, + ByDate, + ByType, + ByContent +} \ No newline at end of file diff --git a/src/Shared/Extension.cs b/src/Shared/Extension.cs new file mode 100644 index 0000000..121352c --- /dev/null +++ b/src/Shared/Extension.cs @@ -0,0 +1,28 @@ +namespace Shared; + +public static class Extensions +{ + 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) { + return u; + } + u = func(t); + mapper.Add(t, u); + // action(t, u); + return u; + } +// , Action action + 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) { + return t; + } + t = func(u); + mapper.Add(t, u); + // action(t, u); + return t; + } +} \ No newline at end of file diff --git a/src/Shared/GenericMappers.cs b/src/Shared/GenericMappers.cs new file mode 100644 index 0000000..bf326ad --- /dev/null +++ b/src/Shared/GenericMappers.cs @@ -0,0 +1,34 @@ +namespace Shared; + +public class GenericMapper where T : class where U : class +{ + private HashSet> mapper = new HashSet>(); + public T? GetT(U u) + { + var found = mapper.Where(t => ReferenceEquals(t.Item2, u)); + if (found.Count() != 1) + { + return null; + } + return found.First().Item1; + } + public U? GetU(T t) + { + var found = mapper.Where(t => ReferenceEquals(t.Item1, t)); + if (found.Count() != 1) + { + return null; + } + return found.First().Item2; + } + public void Add(T model, U entity) + { + var tuple = new Tuple(model, entity); + mapper.Add(tuple); + } + + public void Reset() + { + mapper.Clear(); + } +} \ No newline at end of file diff --git a/src/Shared/HeartRateOrderCriteria.cs b/src/Shared/HeartRateOrderCriteria.cs new file mode 100644 index 0000000..0f21f04 --- /dev/null +++ b/src/Shared/HeartRateOrderCriteria.cs @@ -0,0 +1,10 @@ +namespace Shared; + +public enum HeartRateOrderCriteria +{ + None, + ByDate, + ByValue, + ByActivity, + ByUser +} \ No newline at end of file diff --git a/src/Shared/NotificationOrderCriteria.cs b/src/Shared/NotificationOrderCriteria.cs new file mode 100644 index 0000000..3315691 --- /dev/null +++ b/src/Shared/NotificationOrderCriteria.cs @@ -0,0 +1,11 @@ +namespace Shared; + +public enum NotificationOrderCriteria +{ + None, + ByDate, + ByType, + BySender, + ByReceiver, + ByContent +} \ No newline at end of file diff --git a/src/Shared/Shared.csproj b/src/Shared/Shared.csproj index 7d742ab..34786a9 100644 --- a/src/Shared/Shared.csproj +++ b/src/Shared/Shared.csproj @@ -1,7 +1,7 @@  - - + + diff --git a/src/Shared/StatisticOrderCriteria.cs b/src/Shared/StatisticOrderCriteria.cs new file mode 100644 index 0000000..3968c7e --- /dev/null +++ b/src/Shared/StatisticOrderCriteria.cs @@ -0,0 +1,10 @@ +namespace Shared; + +public enum StatisticOrderCriteria +{ + None, + ByDate, + ByType, + ByValue, + ByUser +} \ No newline at end of file diff --git a/src/Shared/TrainingOrderCriteria.cs b/src/Shared/TrainingOrderCriteria.cs new file mode 100644 index 0000000..4f17bca --- /dev/null +++ b/src/Shared/TrainingOrderCriteria.cs @@ -0,0 +1,12 @@ +namespace Shared; + +public enum TrainingOrderCriteria +{ + None, + ByDate, + ByType, + ByDuration, + ByDistance, + ByCalories, + ByUser +} \ No newline at end of file diff --git a/src/SharedEF/Activity.cs b/src/SharedEF/Activity.cs deleted file mode 100644 index 14357fb..0000000 --- a/src/SharedEF/Activity.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace SharedEF; - -public class Activity -{ - -} \ No newline at end of file diff --git a/src/SharedEF/IActivityRepository.cs b/src/SharedEF/IActivityRepository.cs deleted file mode 100644 index 0842f1b..0000000 --- a/src/SharedEF/IActivityRepository.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace SharedEF; - -public interface IActivityRepository : IGenericRepository -{ - -} \ No newline at end of file diff --git a/src/SharedEF/IDataManager.cs b/src/SharedEF/IDataManager.cs deleted file mode 100644 index a1d0e35..0000000 --- a/src/SharedEF/IDataManager.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace SharedEF; - -public interface IDataManager -{ - IUserRepository UserRepo { get; } - IActivityRepository ActivityRepo { get; } -} diff --git a/src/SharedEF/IGenericRepository.cs b/src/SharedEF/IGenericRepository.cs deleted file mode 100644 index 6e20d13..0000000 --- a/src/SharedEF/IGenericRepository.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace SharedEF; - -public interface IGenericRepository -{ - Task> GetItems(int index, int count, string? orderingProperty = null, bool descending = false); - Task GetItemById(int id); - Task UpdateItem(int oldItem, T newItem); - Task AddItem(T item); - Task DeleteItem(int item); - Task GetNbItems(); - -} \ No newline at end of file diff --git a/src/SharedEF/IUserRepository.cs b/src/SharedEF/IUserRepository.cs deleted file mode 100644 index 7a82ae1..0000000 --- a/src/SharedEF/IUserRepository.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace SharedEF; - -public interface IUserRepository: IGenericRepository -{ - public Task> GetUsers(int index, int count, AthleteOrderCriteria? criteria , bool descending = false); -} \ No newline at end of file diff --git a/src/SharedEF/SharedEF.csproj b/src/SharedEF/SharedEF.csproj deleted file mode 100644 index 3a63532..0000000 --- a/src/SharedEF/SharedEF.csproj +++ /dev/null @@ -1,9 +0,0 @@ - - - - net8.0 - enable - enable - - - diff --git a/src/SharedEF/User.cs b/src/SharedEF/User.cs deleted file mode 100644 index 5e92f92..0000000 --- a/src/SharedEF/User.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace SharedEF; - -public class User -{ - -} \ No newline at end of file diff --git a/src/StubApi/AthleteStubDto.cs b/src/StubApi/AthleteStubDto.cs index 48952e4..5725d31 100644 --- a/src/StubApi/AthleteStubDto.cs +++ b/src/StubApi/AthleteStubDto.cs @@ -1,4 +1,4 @@ -using Shared; +// using Shared; -namespace +// namespace diff --git a/src/StubbedContextLib/Migrations/20240312203935_MyMigrations.Designer.cs b/src/StubbedContextLib/Migrations/20240312203935_MyMigrations.Designer.cs new file mode 100644 index 0000000..9e2f6ad --- /dev/null +++ b/src/StubbedContextLib/Migrations/20240312203935_MyMigrations.Designer.cs @@ -0,0 +1,986 @@ +// +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 new file mode 100644 index 0000000..ee2a463 --- /dev/null +++ b/src/StubbedContextLib/Migrations/20240312203935_MyMigrations.cs @@ -0,0 +1,492 @@ +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 new file mode 100644 index 0000000..d8803de --- /dev/null +++ b/src/StubbedContextLib/Migrations/TrainingStubbedContextModelSnapshot.cs @@ -0,0 +1,983 @@ +// +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/Tests/ConsoleTestEFMapper/ConsoleTestEFMapper.csproj b/src/Tests/ConsoleTestEFMapper/ConsoleTestEFMapper.csproj new file mode 100644 index 0000000..1832a20 --- /dev/null +++ b/src/Tests/ConsoleTestEFMapper/ConsoleTestEFMapper.csproj @@ -0,0 +1,23 @@ + + + + + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + + Exe + net8.0 + enable + enable + + + diff --git a/src/Tests/ConsoleTestEFMapper/Program.cs b/src/Tests/ConsoleTestEFMapper/Program.cs new file mode 100644 index 0000000..fcf59ac --- /dev/null +++ b/src/Tests/ConsoleTestEFMapper/Program.cs @@ -0,0 +1,88 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Model; +using Shared; +using StubbedContextLib; +using static Model2Entities.DbDataManager; + +namespace Model2Entities +{ + class Program + { + static async Task Main(string[] args) + { + // Instanciation de DbDataManager et ActivityRepository + var dataManager = new DbDataManager(new TrainingStubbedContext()); + var logger = new Logger(new LoggerFactory()); + var activityRepository = new ActivityRepository(dataManager); + + // Test de la méthode GetActivities + Console.WriteLine("Testing GetActivities method..."); + var activities = await activityRepository.GetActivities(0, 10, ActivityOrderCriteria.ByType, true); + foreach (var activity in activities) + { + Console.WriteLine($"Activity ID: {activity.Id}, Name: {activity.Type}, Date: {activity.Date}, Start Time: {activity.StartTime}, End Time: {activity.EndTime}"); + } + Console.WriteLine(); + + // Test de la méthode GetActivityByIdAsync + Console.WriteLine("Testing GetActivityByIdAsync method..."); + var activityById = await activityRepository.GetActivityByIdAsync(2); + if (activityById != null) + { + Console.WriteLine($"Activity found: ID: {activityById.Id}, Name: {activityById.Type}, Date: {activityById.Date}, Start Time: {activityById.StartTime}, End Time: {activityById.EndTime}"); + } + else + { + Console.WriteLine("No activity found with the specified ID."); + } + Console.WriteLine(); + + // // Test de la méthode AddActivity + Console.WriteLine("Testing AddActivity method..."); + var newActivity = new Activity(10, "New Activity", new DateTime(2021, 10, 10), new DateTime(10, 10, 10, 10, 10, 10), new DateTime(10, 10, 10, 12, 12, 12), 5, 5, 5, 5, 5, 5, 5, 5, false); + var addedActivity = await activityRepository.AddActivity(newActivity); + if (addedActivity != null) + { + Console.WriteLine($"New activity added successfully: ID: {addedActivity.Id}, Name: {addedActivity.Type}, Date: {addedActivity.Date}, Start Time: {addedActivity.StartTime}, End Time: {addedActivity.EndTime}"); + } + else + { + Console.WriteLine("Failed to add new activity."); + } + Console.WriteLine(); + + // // Test de la méthode UpdateActivity + // Console.WriteLine("Testing UpdateActivity method..."); + // var updatedActivity = await activityRepository.UpdateActivity(6, new Activity { Id = 6, Name = "Updated Activity" }); + // if (updatedActivity != null) + // { + // Console.WriteLine($"Activity updated successfully: ID: {updatedActivity.Id}, Name: {updatedActivity.Name}"); + // } + // else + // { + // Console.WriteLine("Failed to update activity."); + // } + // Console.WriteLine(); + + // Test de la méthode DeleteActivity + Console.WriteLine("Testing DeleteActivity method..."); + var isDeleted = await activityRepository.DeleteActivity(1); + if (isDeleted) + { + Console.WriteLine("Activity deleted successfully."); + } else + { + Console.WriteLine("Failed to delete activity."); + } + + // Test de la méthode GetNbItems + Console.WriteLine("Testing GetNbItems method..."); + var itemCount = await activityRepository.GetNbItems(); + Console.WriteLine($"Total number of activities: {itemCount}"); + } + } +} \ No newline at end of file diff --git a/src/Tests/ConsoleTestEntities/Program.cs b/src/Tests/ConsoleTestEntities/Program.cs index 258c7bb..e5a8286 100644 --- a/src/Tests/ConsoleTestEntities/Program.cs +++ b/src/Tests/ConsoleTestEntities/Program.cs @@ -21,23 +21,23 @@ class Program NotificationTests(db); - // StatisticTests(db); + StatisticTests(db); - // TrainingTests(db); + TrainingTests(db); - // AddUpdateDeleteAthlete(db); + AddUpdateDeleteAthlete(db); - // AddUpdateDeleteActivity(db); + AddUpdateDeleteActivity(db); - // AddUpdateDeleteDataSource(db); + AddUpdateDeleteDataSource(db); - // AddUpdateDeleteHeartRate(db); + AddUpdateDeleteHeartRate(db); - // AddUpdateDeleteNotification(db); + AddUpdateDeleteNotification(db); - // AddUpdateDeleteStatistic(db); + AddUpdateDeleteStatistic(db); - // AddUpdateDeleteTraining(db); + AddUpdateDeleteTraining(db); } } catch (Exception ex)