Adapt Enums for the frontend

main
Leo TUAILLON 2 days ago
parent 548f0d8b98
commit 78b40d71d4

@ -10,7 +10,7 @@ public class CreateExerciceTemplateDto
public string? Description { get; set; } = default; 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"; public string? ImageUrl { get; set; } = "images/default.jpg";

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

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

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

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

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

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

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

@ -26,7 +26,7 @@ public class TrainingDbInitializer
Id = Guid.NewGuid().ToString(), Id = Guid.NewGuid().ToString(),
Name = "Squat", Name = "Squat",
Description = "Squat is a compound exercise that targets the lower body, primarily the quadriceps, hamstrings, and glutes.", 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", ImageUrl = "images/squat.jpg",
VideoUrl = "https://www.youtube.com/watch?v=dQw4w9WgXcQ&ab_channel=RickAstley", VideoUrl = "https://www.youtube.com/watch?v=dQw4w9WgXcQ&ab_channel=RickAstley",
}, },
@ -35,7 +35,7 @@ public class TrainingDbInitializer
Id = Guid.NewGuid().ToString(), Id = Guid.NewGuid().ToString(),
Name = "Bench Press", Name = "Bench Press",
Description = "Bench Press is a compound exercise that primarily targets the chest, shoulders, and triceps.", 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", ImageUrl = "images/bench_press.jpg",
VideoUrl = "https://www.youtube.com/watch?v=dQw4w9WgXcQ&ab_channel=RickAstley", VideoUrl = "https://www.youtube.com/watch?v=dQw4w9WgXcQ&ab_channel=RickAstley",
}, },
@ -44,7 +44,7 @@ public class TrainingDbInitializer
Id = Guid.NewGuid().ToString(), Id = Guid.NewGuid().ToString(),
Name = "Deadlift", Name = "Deadlift",
Description = "Deadlift is a compound exercise that primarily targets the back, glutes, and hamstrings.", 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", ImageUrl = "images/deadlift.jpg",
VideoUrl = "https://www.youtube.com/watch?v=dQw4w9WgXcQ&ab_channel=RickAstley", VideoUrl = "https://www.youtube.com/watch?v=dQw4w9WgXcQ&ab_channel=RickAstley",
}, },
@ -53,7 +53,7 @@ public class TrainingDbInitializer
Id = Guid.NewGuid().ToString(), Id = Guid.NewGuid().ToString(),
Name = "Shoulder Press", Name = "Shoulder Press",
Description = "Shoulder Press is a compound exercise that primarily targets the shoulders and triceps.", 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", ImageUrl = "images/shoulder_press.jpg",
VideoUrl = "https://www.youtube.com/watch?v=dQw4w9WgXcQ&ab_channel=RickAstley", VideoUrl = "https://www.youtube.com/watch?v=dQw4w9WgXcQ&ab_channel=RickAstley",
}, },
@ -62,7 +62,7 @@ public class TrainingDbInitializer
Id = Guid.NewGuid().ToString(), Id = Guid.NewGuid().ToString(),
Name = "Running on Treadmill", Name = "Running on Treadmill",
Description = "Running on Treadmill is a cardiovascular exercise that primarily targets the legs and improves overall fitness.", 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", ImageUrl = "images/running_treadmill.jpg",
VideoUrl = "https://www.youtube.com/watch?v=dQw4w9WgXcQ&ab_channel=RickAstley", 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 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; public EDifficulty Difficulty { get; set; } = EDifficulty.Beginner;

@ -15,10 +15,10 @@ public class UserDto
public bool Sexe { get; set; } = true; 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 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 int NbSessionWeek { get; set; } = 1;
public EGoal Goal { get; set; } = EGoal.None; public EGoal Goal { get; set; } = EGoal.NONE;
public ESleepLevel SleepLevel { get; set; } = ESleepLevel.None; public ESleepLevel SleepLevel { get; set; } = ESleepLevel.NONE;
public ESportLevel SportLevel { get; set; } = ESportLevel.None; public ESportLevel SportLevel { get; set; } = ESportLevel.NONE;
public List<ESport> Sports { get; set; } = [ ESport.None ]; public List<ESport> Sports { get; set; } = [ ESport.NONE ];
public List<EHealthProblem> HealthProblems { get; set; } = [ EHealthProblem.None ]; public List<EHealthProblem> HealthProblems { get; set; } = [ EHealthProblem.NONE ];
public string? Program { get; set; } = null; 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 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 int NbSessionWeek { get; set; } = 1;
public EGoal Goal { get; set; } = EGoal.None; public EGoal Goal { get; set; } = EGoal.NONE;
public ESleepLevel SleepLevel { get; set; } = ESleepLevel.None; public ESleepLevel SleepLevel { get; set; } = ESleepLevel.NONE;
public ESportLevel SportLevel { get; set; } = ESportLevel.None; public ESportLevel SportLevel { get; set; } = ESportLevel.NONE;
public List<ESport> Sports { get; set; } = []; public List<ESport> Sports { get; set; } = [];
public List<EHealthProblem> HealthProblems { get; set; } = []; public List<EHealthProblem> HealthProblems { get; set; } = [];

Loading…
Cancel
Save