test
continuous-integration/drone/push Build is passing Details

CI_DB_WORK
David D'ALMEIDA 1 year ago
parent b9e2ef9925
commit ce65d3927b

@ -25,11 +25,8 @@ public static class UserMappeur
DateOfBirth = user.DateOfBirth,
IsCoach = user.Role is Coach
});
// ), (activity, entity) => activity.Id = entity.IdActivity);
}
// ochestrateur => api gateway
// corégraphie => microservice TCP
public static User ToModel(this UserDto userDto)

@ -3,7 +3,7 @@ namespace Dto;
public class ActivityDto
{
public int Id { get; set; }
public string Type { get; set; }
public string? Type { get; set; }
public DateTime Date { get; set; }
public DateTime StartTime { get; set; }
public DateTime EndTime { get; set; }

@ -2,6 +2,13 @@ namespace Dto;
public class ActivityFitFileDto
{
public ActivityFitFileDto(string activityName, string activityType, int effortFeel)
{
ActivityName = activityName;
ActivityType = activityType;
EffortFeel = effortFeel;
}
public string ActivityName { get; set; }
public string ActivityType { get; set; }
public int EffortFeel { get; set; }

@ -29,7 +29,7 @@ namespace Entities
/// </summary>
[Required]
[MaxLength(100)]
public string Type { get; set; } = null!;
public string? Type { get; set; } = null!;
/// <summary>
/// Gets or sets the date of the activity.

@ -67,6 +67,12 @@ public class AppBootstrap(IConfiguration configuration)
if (string.IsNullOrWhiteSpace(connectionString))
{
services.AddDbContext<AuthDbContext>(options => options.UseInMemoryDatabase("AuthDb"));
Console.WriteLine("InMemoryDatabase");
Console.WriteLine("InMemoryDatabase");
Console.WriteLine("InMemoryDatabase");
Console.WriteLine("InMemoryDatabase");
Console.WriteLine("InMemoryDatabase");
//options => options.UseSqlite(connectionString)
//services.AddDbContext<HeartTrackContext>();
services.AddDbContext<HeartTrackContext>(options =>

@ -4,7 +4,7 @@ namespace Model;
public class Activity
{
public int Id { get; set; }
public string Type { get; set; }
public string? Type { get; set; }
public DateTime Date { get; set; }
public DateTime StartTime { get; set; }
public DateTime EndTime { get; set; }
@ -33,7 +33,7 @@ public class Activity
public bool HasAutoPause { get; set; }
public HashSet<User> Users { get; private set; } = new HashSet<User>();
public Activity(int idActivity ,string type, DateTime date, DateTime startTime, DateTime endTime,
public Activity(int idActivity ,string? type, DateTime date, DateTime startTime, DateTime endTime,
int effort, float variability, float variance, float standardDeviation,
float average, int maximum, int minimum, float averageTemperature, bool hasAutoPause)
{

Loading…
Cancel
Save