Adapt Enums for the frontend

main
Leo TUAILLON 1 day ago
parent 548f0d8b98
commit 78b40d71d4

@ -10,7 +10,7 @@ public class CreateExerciceTemplateDto
public string? Description { get; set; } = default;
public ETarget? Target { get; set; } = ETarget.None;
public ETarget? Target { get; set; } = ETarget.NONE;
public string? ImageUrl { get; set; } = "images/default.jpg";

@ -29,7 +29,7 @@ public class DbInitializer
Id = Guid.NewGuid().ToString(),
Name = "Squat",
Description = "Squat is a compound exercise that targets the lower body, primarily the quadriceps, hamstrings, and glutes.",
Target = ETarget.Legs,
Target = ETarget.LEGS,
ImageUrl = "images/squat.jpg",
VideoUrl = "https://www.youtube.com/watch?v=dQw4w9WgXcQ&ab_channel=RickAstley",
},
@ -38,7 +38,7 @@ public class DbInitializer
Id = Guid.NewGuid().ToString(),
Name = "Bench Press",
Description = "Bench Press is a compound exercise that primarily targets the chest, shoulders, and triceps.",
Target = ETarget.Chest,
Target = ETarget.CHEST,
ImageUrl = "images/bench_press.jpg",
VideoUrl = "https://www.youtube.com/watch?v=dQw4w9WgXcQ&ab_channel=RickAstley",
},
@ -47,7 +47,7 @@ public class DbInitializer
Id = Guid.NewGuid().ToString(),
Name = "Deadlift",
Description = "Deadlift is a compound exercise that primarily targets the back, glutes, and hamstrings.",
Target = ETarget.Back,
Target = ETarget.BACK,
ImageUrl = "images/deadlift.jpg",
VideoUrl = "https://www.youtube.com/watch?v=dQw4w9WgXcQ&ab_channel=RickAstley",
},
@ -56,7 +56,7 @@ public class DbInitializer
Id = Guid.NewGuid().ToString(),
Name = "Shoulder Press",
Description = "Shoulder Press is a compound exercise that primarily targets the shoulders and triceps.",
Target = ETarget.Arms,
Target = ETarget.ARMS,
ImageUrl = "images/shoulder_press.jpg",
VideoUrl = "https://www.youtube.com/watch?v=dQw4w9WgXcQ&ab_channel=RickAstley",
},
@ -65,7 +65,7 @@ public class DbInitializer
Id = Guid.NewGuid().ToString(),
Name = "Running on Treadmill",
Description = "Running on Treadmill is a cardiovascular exercise that primarily targets the legs and improves overall fitness.",
Target = ETarget.Cardio,
Target = ETarget.CARDIO,
ImageUrl = "images/running_treadmill.jpg",
VideoUrl = "https://www.youtube.com/watch?v=dQw4w9WgXcQ&ab_channel=RickAstley",
},

@ -2,13 +2,10 @@ namespace Shared.Enum;
public enum EGoal
{
None,
MuscleGain,
WeightLoss,
MassGain,
Fitness,
ImproveStamina,
KeepFit,
Endurance,
Strength,
NONE,
MUSCLE_GAIN,
WEIGHT_LOSS,
MASS_GAIN,
IMPROVE_STAMINA,
KEEP_FIT,
}

@ -2,9 +2,10 @@
public enum EHealthProblem
{
None,
Arthrosis,
Migraine,
BackPain,
Arthritis,
NONE,
ARTHROSIS,
MIGRAINE,
BACK_PAIN,
ASTHMA,
DIABETES
}

@ -2,10 +2,10 @@
public enum ESleepLevel
{
None,
Excellent,
Good,
Bad,
VeryBad,
Terrible,
NONE,
EXCELLENT,
GOOD,
BAD,
VERY_BAD,
TERRIBLE,
}

@ -2,14 +2,15 @@
public enum ESport
{
None,
Football,
Basketball,
Handball,
Tennis,
Walking,
Running,
Biking,
Yoga,
Else,
NONE,
FOOTBALL,
BASKETBALL,
HANDBALL,
TENNIS,
WALKING,
RUNNING,
SKATING,
BIKING,
YOGA,
ELSE,
}

@ -2,9 +2,9 @@
public enum ESportLevel
{
None,
VerySporty,
Sporty,
Beginner,
NotSporty,
NONE,
VERY_SPORTY,
SPORTY,
BEGINNER,
NOT_SPORTY,
}

@ -2,10 +2,10 @@ namespace Shared.Enum;
public enum ETarget
{
None,
Legs,
Arms,
Back,
Cardio,
Chest,
NONE,
LEGS,
ARMS,
BACK,
CARDIO,
CHEST,
}

@ -26,7 +26,7 @@ public class TrainingDbInitializer
Id = Guid.NewGuid().ToString(),
Name = "Squat",
Description = "Squat is a compound exercise that targets the lower body, primarily the quadriceps, hamstrings, and glutes.",
Target = Shared.Enum.ETarget.Legs,
Target = Shared.Enum.ETarget.LEGS,
ImageUrl = "images/squat.jpg",
VideoUrl = "https://www.youtube.com/watch?v=dQw4w9WgXcQ&ab_channel=RickAstley",
},
@ -35,7 +35,7 @@ public class TrainingDbInitializer
Id = Guid.NewGuid().ToString(),
Name = "Bench Press",
Description = "Bench Press is a compound exercise that primarily targets the chest, shoulders, and triceps.",
Target = Shared.Enum.ETarget.Chest,
Target = Shared.Enum.ETarget.CHEST,
ImageUrl = "images/bench_press.jpg",
VideoUrl = "https://www.youtube.com/watch?v=dQw4w9WgXcQ&ab_channel=RickAstley",
},
@ -44,7 +44,7 @@ public class TrainingDbInitializer
Id = Guid.NewGuid().ToString(),
Name = "Deadlift",
Description = "Deadlift is a compound exercise that primarily targets the back, glutes, and hamstrings.",
Target = Shared.Enum.ETarget.Back,
Target = Shared.Enum.ETarget.BACK,
ImageUrl = "images/deadlift.jpg",
VideoUrl = "https://www.youtube.com/watch?v=dQw4w9WgXcQ&ab_channel=RickAstley",
},
@ -53,7 +53,7 @@ public class TrainingDbInitializer
Id = Guid.NewGuid().ToString(),
Name = "Shoulder Press",
Description = "Shoulder Press is a compound exercise that primarily targets the shoulders and triceps.",
Target = Shared.Enum.ETarget.Arms,
Target = Shared.Enum.ETarget.ARMS,
ImageUrl = "images/shoulder_press.jpg",
VideoUrl = "https://www.youtube.com/watch?v=dQw4w9WgXcQ&ab_channel=RickAstley",
},
@ -62,7 +62,7 @@ public class TrainingDbInitializer
Id = Guid.NewGuid().ToString(),
Name = "Running on Treadmill",
Description = "Running on Treadmill is a cardiovascular exercise that primarily targets the legs and improves overall fitness.",
Target = Shared.Enum.ETarget.Cardio,
Target = Shared.Enum.ETarget.CARDIO,
ImageUrl = "images/running_treadmill.jpg",
VideoUrl = "https://www.youtube.com/watch?v=dQw4w9WgXcQ&ab_channel=RickAstley",
},

@ -18,7 +18,7 @@ public class TrainingProgram : EntityBase
public string OwnerId { get; set; } = "";
public EGoal Goal { get; set; } = EGoal.MuscleGain;
public EGoal Goal { get; set; } = EGoal.NONE;
public EDifficulty Difficulty { get; set; } = EDifficulty.Beginner;

@ -15,10 +15,10 @@ public class UserDto
public bool Sexe { get; set; } = true;
public string? ProfilePict { get; set; } = "https://cdn.pixabay.com/photo/2015/10/05/22/37/blank-profile-picture-973460_960_720.png";
public int NbSessionWeek { get; set; } = 1;
public EGoal Goal { get; set; } = EGoal.None;
public ESleepLevel SleepLevel { get; set; } = ESleepLevel.None;
public ESportLevel SportLevel { get; set; } = ESportLevel.None;
public List<ESport> Sports { get; set; } = [ ESport.None ];
public List<EHealthProblem> HealthProblems { get; set; } = [ EHealthProblem.None ];
public EGoal Goal { get; set; } = EGoal.NONE;
public ESleepLevel SleepLevel { get; set; } = ESleepLevel.NONE;
public ESportLevel SportLevel { get; set; } = ESportLevel.NONE;
public List<ESport> Sports { get; set; } = [ ESport.NONE ];
public List<EHealthProblem> HealthProblems { get; set; } = [ EHealthProblem.NONE ];
public string? Program { get; set; } = null;
}

@ -16,9 +16,9 @@ public class User : EntityBase
public string ProfilePict { get; set; } = "https://cdn.pixabay.com/photo/2015/10/05/22/37/blank-profile-picture-973460_960_720.png";
public int NbSessionWeek { get; set; } = 1;
public EGoal Goal { get; set; } = EGoal.None;
public ESleepLevel SleepLevel { get; set; } = ESleepLevel.None;
public ESportLevel SportLevel { get; set; } = ESportLevel.None;
public EGoal Goal { get; set; } = EGoal.NONE;
public ESleepLevel SleepLevel { get; set; } = ESleepLevel.NONE;
public ESportLevel SportLevel { get; set; } = ESportLevel.NONE;
public List<ESport> Sports { get; set; } = [];
public List<EHealthProblem> HealthProblems { get; set; } = [];

Loading…
Cancel
Save