-- https://www.phpmyadmin.net/
--

START TRANSACTION;



--
-- Database: `fitness_app`
--

-- --------------------------------------------------------

--
-- Table structure for table `bmi_ranges`
--

CREATE TABLE `bmi_ranges` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `bmi_from` double(8,2) NOT NULL,
  `bmi_to` double(8,2) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `bmi_ranges`
--

INSERT INTO `bmi_ranges` (`id`, `bmi_from`, `bmi_to`, `created_at`, `updated_at`) VALUES
(1, 0.00, 18.50, NULL, NULL),
(2, 18.50, 25.00, NULL, NULL),
(3, 25.00, 29.50, NULL, NULL),
(4, 30.00, 99.00, NULL, NULL);

-- --------------------------------------------------------

--
-- Table structure for table `bmi_range_exercises`
--

CREATE TABLE `bmi_range_exercises` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `bmi_range_id` bigint(20) UNSIGNED NOT NULL,
  `program_exercise_id` bigint(20) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `bmi_range_exercises`
--

INSERT INTO `bmi_range_exercises` (`id`, `bmi_range_id`, `program_exercise_id`, `created_at`, `updated_at`) VALUES
(1, 1, 37, NULL, NULL),
(2, 1, 38, NULL, NULL),
(3, 1, 39, NULL, NULL),
(4, 1, 40, NULL, NULL),
(5, 1, 41, NULL, NULL),
(6, 1, 42, NULL, NULL),
(7, 1, 43, NULL, NULL),
(8, 1, 44, NULL, NULL),
(9, 1, 45, NULL, NULL),
(10, 1, 46, NULL, NULL),
(11, 1, 47, NULL, NULL),
(12, 2, 1, NULL, NULL),
(13, 2, 2, NULL, NULL),
(14, 2, 3, NULL, NULL),
(15, 2, 4, NULL, NULL),
(16, 2, 5, NULL, NULL),
(17, 2, 6, NULL, NULL),
(18, 2, 7, NULL, NULL),
(19, 2, 8, NULL, NULL),
(20, 2, 9, NULL, NULL),
(21, 2, 10, NULL, NULL),
(22, 2, 11, NULL, NULL),
(23, 2, 12, NULL, NULL),
(24, 3, 13, NULL, NULL),
(25, 3, 14, NULL, NULL),
(26, 3, 15, NULL, NULL),
(27, 3, 16, NULL, NULL),
(28, 3, 17, NULL, NULL),
(29, 3, 18, NULL, NULL),
(30, 3, 19, NULL, NULL),
(31, 3, 20, NULL, NULL),
(32, 3, 21, NULL, NULL),
(33, 3, 22, NULL, NULL),
(34, 3, 23, NULL, NULL),
(35, 3, 24, NULL, NULL),
(36, 4, 25, NULL, NULL),
(37, 4, 26, NULL, NULL),
(38, 4, 27, NULL, NULL),
(39, 4, 28, NULL, NULL),
(40, 4, 29, NULL, NULL),
(41, 4, 30, NULL, NULL),
(42, 4, 31, NULL, NULL),
(43, 4, 32, NULL, NULL),
(44, 4, 33, NULL, NULL),
(45, 4, 34, NULL, NULL),
(46, 4, 35, NULL, NULL),
(47, 4, 36, NULL, NULL);

-- --------------------------------------------------------

--
-- Table structure for table `bmi_range_meals`
--

CREATE TABLE `bmi_range_meals` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `bmi_range_id` bigint(20) UNSIGNED NOT NULL,
  `program_meal_id` bigint(20) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `bmi_range_meals`
--

INSERT INTO `bmi_range_meals` (`id`, `bmi_range_id`, `program_meal_id`, `created_at`, `updated_at`) VALUES
(1, 1, 1, NULL, NULL),
(2, 1, 2, NULL, NULL),
(3, 1, 3, NULL, NULL),
(4, 1, 4, NULL, NULL),
(5, 1, 5, NULL, NULL),
(6, 1, 6, NULL, NULL),
(7, 1, 7, NULL, NULL),
(8, 2, 8, NULL, NULL),
(9, 2, 9, NULL, NULL),
(10, 2, 10, NULL, NULL),
(11, 2, 11, NULL, NULL),
(12, 2, 12, NULL, NULL),
(13, 2, 13, NULL, NULL),
(14, 2, 14, NULL, NULL),
(15, 3, 15, NULL, NULL),
(16, 3, 16, NULL, NULL),
(17, 3, 17, NULL, NULL),
(18, 3, 18, NULL, NULL),
(19, 3, 19, NULL, NULL),
(20, 3, 20, NULL, NULL),
(21, 3, 21, NULL, NULL),
(22, 4, 22, NULL, NULL),
(23, 4, 23, NULL, NULL),
(24, 4, 24, NULL, NULL),
(25, 4, 25, NULL, NULL);

-- --------------------------------------------------------

--
-- Table structure for table `customer_answers`
--

CREATE TABLE `customer_answers` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `question_id` bigint(20) UNSIGNED NOT NULL,
  `customer_id` bigint(20) UNSIGNED NOT NULL,
  `answer` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `customer_answers`
--

INSERT INTO `customer_answers` (`id`, `question_id`, `customer_id`, `answer`, `created_at`, `updated_at`) VALUES
(16, 1, 5, 'Male', '2023-06-21 07:12:21', '2023-06-21 07:12:21'),
(17, 2, 5, '19', '2023-06-21 07:12:21', '2023-06-21 07:12:21'),
(18, 3, 5, '6.0', '2023-06-21 07:12:21', '2023-06-21 07:12:21'),
(19, 4, 5, '85', '2023-06-21 07:12:21', '2023-06-21 07:12:21'),
(20, 5, 5, 'No', '2023-06-21 07:12:21', '2023-06-21 07:12:21'),
(21, 6, 5, 'Monday,Tuesday,Wednesday,Thursday,Friday,Saturday', '2023-06-21 07:12:21', '2023-06-21 07:12:21'),
(22, 7, 5, '', '2023-06-21 07:12:21', '2023-06-21 07:12:21');

-- --------------------------------------------------------

--
-- Table structure for table `customer_plans`
--

CREATE TABLE `customer_plans` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `customer_id` bigint(20) UNSIGNED NOT NULL,
  `plan_id` bigint(20) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `customer_plans`
--

INSERT INTO `customer_plans` (`id`, `customer_id`, `plan_id`, `created_at`, `updated_at`) VALUES
(4, 5, 5, '2023-06-21 07:12:21', '2023-06-21 07:12:21');

-- --------------------------------------------------------

--
-- Table structure for table `failed_jobs`
--

CREATE TABLE `failed_jobs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `uuid` varchar(255) NOT NULL,
  `connection` text NOT NULL,
  `queue` text NOT NULL,
  `payload` longtext NOT NULL,
  `exception` longtext NOT NULL,
  `failed_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `fitness_categories`
--

CREATE TABLE `fitness_categories` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `fitness_categories`
--

INSERT INTO `fitness_categories` (`id`, `name`, `created_at`, `updated_at`) VALUES
(1, 'Weight gain', NULL, NULL),
(2, 'Muscle building', NULL, NULL),
(3, 'Strength training', NULL, NULL),
(4, 'Core training', NULL, NULL),
(5, 'Weight loss', NULL, NULL);

-- --------------------------------------------------------

--
-- Table structure for table `fitness_category_questions`
--

CREATE TABLE `fitness_category_questions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `fitness_category_id` bigint(20) UNSIGNED NOT NULL,
  `question_id` bigint(20) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `fitness_category_questions`
--

INSERT INTO `fitness_category_questions` (`id`, `fitness_category_id`, `question_id`, `created_at`, `updated_at`) VALUES
(1, 1, 1, NULL, NULL),
(2, 2, 1, NULL, NULL),
(3, 3, 1, NULL, NULL),
(4, 4, 1, NULL, NULL),
(5, 5, 1, NULL, NULL),
(6, 1, 2, NULL, NULL),
(7, 2, 2, NULL, NULL),
(8, 3, 2, NULL, NULL),
(9, 4, 2, NULL, NULL),
(10, 5, 2, NULL, NULL),
(11, 1, 3, NULL, NULL),
(12, 2, 3, NULL, NULL),
(13, 3, 3, NULL, NULL),
(14, 4, 3, NULL, NULL),
(15, 5, 3, NULL, NULL),
(16, 1, 4, NULL, NULL),
(17, 2, 4, NULL, NULL),
(18, 3, 4, NULL, NULL),
(19, 4, 4, NULL, NULL),
(20, 5, 4, NULL, NULL),
(21, 1, 5, NULL, NULL),
(22, 2, 5, NULL, NULL),
(23, 3, 5, NULL, NULL),
(24, 4, 5, NULL, NULL),
(25, 5, 5, NULL, NULL),
(26, 1, 6, NULL, NULL),
(27, 2, 6, NULL, NULL),
(28, 3, 6, NULL, NULL),
(29, 4, 6, NULL, NULL),
(30, 5, 6, NULL, NULL),
(31, 1, 7, NULL, NULL),
(32, 2, 7, NULL, NULL),
(33, 3, 7, NULL, NULL),
(34, 4, 7, NULL, NULL),
(35, 5, 7, NULL, NULL);

-- --------------------------------------------------------

--
-- Table structure for table `migrations`
--

CREATE TABLE `migrations` (
  `id` int(10) UNSIGNED NOT NULL,
  `migration` varchar(255) NOT NULL,
  `batch` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `migrations`
--

INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
(1, '2014_10_12_000000_create_users_table', 1),
(2, '2014_10_12_100000_create_password_reset_tokens_table', 1),
(3, '2014_10_12_100000_create_password_resets_table', 1),
(4, '2019_08_19_000000_create_failed_jobs_table', 1),
(5, '2019_12_14_000001_create_personal_access_tokens_table', 1),
(6, '2023_05_23_053250_create_fitness_categories_table', 1),
(7, '2023_05_23_053458_create_bmi_ranges_table', 1),
(8, '2023_05_23_055659_create_question_types_table', 1),
(9, '2023_05_23_054836_create_program_exercises_table', 2),
(10, '2023_05_23_055347_create_program_meals_table', 2),
(11, '2023_05_23_053554_create_bmi_range_exercises_table', 3),
(12, '2023_05_23_053740_create_bmi_range_meals_table', 3),
(13, '2023_05_23_055550_create_questions_table', 4),
(15, '2023_05_23_054339_create_customer_answers_table', 5),
(16, '2023_05_23_054721_create_fitness_category_questions_table', 5),
(17, '2023_05_23_071857_create_customer_plans_table', 5);

-- --------------------------------------------------------

--
-- Table structure for table `program_exercises`
--

CREATE TABLE `program_exercises` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `fitness_category_id` bigint(20) UNSIGNED NOT NULL,
  `gender` enum('male','female','other') NOT NULL,
  `exercise_type` enum('at home','at gym') NOT NULL,
  `exercise_name` varchar(255) NOT NULL,
  `sets` int(11) NOT NULL,
  `reps` int(11) NOT NULL,
  `rest` int(11) NOT NULL,
  `description` text NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `program_exercises`
--

INSERT INTO `program_exercises` (`id`, `fitness_category_id`, `gender`, `exercise_type`, `exercise_name`, `sets`, `reps`, `rest`, `description`, `created_at`, `updated_at`) VALUES
(1, 2, 'male', 'at gym', 'Bench Press', 3, 8, 60, 'Lie flat on a bench, unrack the bar and bring it down to your chest, then push it back up.', NULL, NULL),
(2, 2, 'male', 'at gym', 'Deadlifts', 3, 8, 90, 'Stand with feet hip-width apart, bend over and grasp the bar, then lift it up while keeping your back straight.', NULL, NULL),
(3, 2, 'male', 'at gym', 'Squats', 3, 10, 60, 'Stand with feet hip-width apart, lower your body until your thighs are parallel to the ground, then stand back up.', NULL, NULL),
(4, 2, 'male', 'at gym', 'Barbell Curls', 3, 12, 45, 'Stand with feet shoulder-width apart, hold a barbell with an underhand grip, curl it up to your chest, then lower it back down.', NULL, NULL),
(5, 2, 'male', 'at gym', 'Plank', 3, 0, 60, 'Start in a push-up position, then lower your forearms to the ground. Keep your body in a straight line from head to heels, engage your core, and hold the position for as long as you can without breaking form.', NULL, NULL),
(6, 2, 'male', 'at home', 'Push-ups', 3, 10, 60, 'Start in a plank position, lower your body towards the ground, then push back up.', NULL, NULL),
(7, 2, 'male', 'at home', 'Bodyweight Squats', 3, 10, 60, 'Bodyweight squats are a great exercise for building leg muscles. Stand with your feet shoulder-width apart, bend your knees and lower your body until your thighs are parallel to the ground, and then push yourself back up', NULL, NULL),
(8, 2, 'male', 'at home', 'Pull-ups', 3, 10, 60, 'Pull-ups are a great exercise for building back and biceps muscles. Grab a pull-up bar with an overhand grip, hang from the bar, and pull your body up until your chin is above the bar. Lower your body back down and repeat.', NULL, NULL),
(9, 2, 'male', 'at home', 'Plank', 4, 30, 30, 'Begin in a push-up position with your arms straight and your feet hip-width apart. Tighten your core and hold this position for 30 seconds, or as long as you can. Rest for 30 seconds and repeat', NULL, NULL),
(10, 2, 'male', 'at home', 'Lunges', 4, 10, 60, 'Begin with your feet hip-width apart. Take a step forward with one leg and lower your body until both knees are bent at a 90-degree angle. Push back up to the starting position and repeat with the other leg.', NULL, NULL),
(11, 2, 'male', 'at home', 'Sit-ups', 4, 10, 60, 'Sit-ups are an abdominal muscle-strengthening exercise that involves lifting the upper body from a lying position to a sitting position.', NULL, NULL),
(12, 5, 'male', 'at home', 'Jumping jacks', 3, 15, 60, 'Stand straight with feet together and jump, spreading your arms and legs. Land on your feet, shoulder-width apart, and repeat.', NULL, NULL),
(13, 5, 'male', 'at home', 'Bodyweight Squats', 3, 12, 60, 'Stand with feet shoulder-width apart, squat down, keeping your knees in line with your toes, and stand back up.', NULL, NULL),
(14, 5, 'male', 'at home', 'Push-ups', 3, 12, 60, 'Start in a plank position with hands shoulder-width apart. Lower your body until your chest almost touches the ground, then push back up.', NULL, NULL),
(15, 5, 'male', 'at home', 'Running', 3, 15, 60, 'Jog for 15 minutes at a moderate pace.', NULL, NULL),
(16, 5, 'male', 'at home', 'Burpees', 3, 12, 60, 'Stand straight, squat down, kick your feet back, do a push-up, jump back to a squat, and jump up.', NULL, NULL),
(17, 5, 'male', 'at home', 'Mountain climbers', 3, 20, 60, 'Start in a plank position and alternate bringing your knees to your chest as if running.', NULL, NULL),
(18, 5, 'male', 'at gym', 'Dumbbell bench press', 3, 10, 60, 'Lie down on a bench with dumbbells in your hands. Lower the dumbbells until your elbows are at a 90-degree angle, then push them back up.', NULL, NULL),
(19, 5, 'male', 'at gym', 'Barbell squats', 3, 10, 60, 'With a barbell on your back, squat down, keeping your knees in line with your toes, and stand back up.', NULL, NULL),
(20, 5, 'male', 'at gym', 'Treadmill running', 3, 15, 60, 'Jog on the treadmill for 15 minutes at a moderate pace.', NULL, NULL),
(21, 5, 'male', 'at gym', 'Stationary Bike', 3, 10, 60, 'Stationary Bike is a low-impact cardio exercise that simulates outdoor cycling, providing a great workout for your heart, lungs, and lower body muscles.', NULL, NULL),
(22, 5, 'male', 'at gym', 'Jump Training', 3, 10, 60, 'Jump training, also known as plyometric training, is a form of exercise that involves explosive movements such as jumping, bounding, and hopping to improve athletic performance and develop strength, power, and agility.', NULL, NULL),
(23, 5, 'male', 'at gym', 'Resistance Training with Weights', 3, 15, 60, 'Resistance training with weights involves lifting weights or using weight machines to increase muscle strength and endurance, improve bone density, and promote overall physical fitness.', NULL, NULL),
(24, 5, 'male', 'at home', 'Push-ups', 3, 12, 30, 'This exercise targets your chest, shoulders, and triceps, and can be modified to make it easier or harder depending on your fitness level.', NULL, NULL),
(25, 5, 'male', 'at home', 'Squats', 3, 12, 30, 'This exercise targets your legs and glutes, and can be modified to make it easier or harder depending on your fitness level.', NULL, NULL),
(26, 5, 'male', 'at home', 'Lunges', 3, 12, 30, 'This exercise targets your legs and glutes, and can be modified to make it easier or harder depending on your fitness level.', NULL, NULL),
(27, 5, 'male', 'at home', 'Dips', 3, 12, 30, 'This exercise targets your triceps, chest, and shoulders, and can be modified to make it easier or harder depending on your fitness level.', NULL, NULL),
(28, 5, 'male', 'at home', 'Plank', 3, 30, 30, 'This exercise targets your core and helps to build stability and strength.', NULL, NULL),
(29, 5, 'male', 'at home', 'Mountain climbers', 3, 12, 30, 'This exercise targets your core, arms, and legs, and can be modified to make it easier or harder depending on your fitness level.', NULL, NULL),
(30, 5, 'male', 'at gym', 'Bench Press', 3, 10, 30, 'This exercise targets your chest, shoulders, and triceps, and can be modified to make it easier or harder depending on your fitness level.', NULL, NULL),
(31, 5, 'male', 'at gym', 'Incline dumbbell press', 3, 10, 60, 'This exercise targets your upper chest, and can be modified to make it easier or harder depending on your fitness level.', NULL, NULL),
(32, 5, 'male', 'at gym', 'Dumbbell flyes', 3, 10, 60, 'This exercise targets your chest, and can be modified to make it easier or harder depending on your fitness level.', NULL, NULL),
(33, 5, 'male', 'at gym', 'Treadmill running', 3, 10, 60, 'Jog on the treadmill for 15 minutes at a moderate pace.', NULL, NULL),
(34, 5, 'male', 'at gym', 'Barbell squats', 3, 12, 60, 'With a barbell on your back, squat down, keeping your knees in line with your toes, and stand back up.', NULL, NULL),
(35, 5, 'male', 'at gym', 'Push-ups', 3, 15, 60, 'Start in a plank position with hands shoulder-width apart. Lower your body until your chest almost touches the ground, then push back up.', NULL, NULL),
(36, 1, 'male', 'at home', 'Push-ups', 3, 12, 60, 'Push-ups are a great bodyweight exercise for building strength and mass in your chest, shoulders, and triceps.', NULL, NULL),
(37, 1, 'male', 'at home', 'Bodyweight Squats', 3, 12, 60, 'Bodyweight squats are an effective way to build lower body strength and muscle without equipment.', NULL, NULL),
(38, 1, 'male', 'at home', 'Lunges', 3, 15, 60, 'Lunges are a great lower body exercise that target your glutes, quads, and hamstrings.', NULL, NULL),
(39, 1, 'male', 'at home', 'Crunches', 3, 10, 60, 'Crunches help in increasing your core strength and gain weight.', NULL, NULL),
(40, 1, 'male', 'at home', 'Pull-ups', 3, 20, 60, 'Pull-up is a high resistance exercise that builds more muscles. More muscles mean more bodyweight.', NULL, NULL),
(41, 1, 'male', 'at home', 'Burpees', 3, 10, 60, 'Burpees target the whole body. While doing this exercise you’ll target the chest, arms, glutes, abs,  quads, and hamstrings.', NULL, NULL),
(42, 1, 'male', 'at gym', 'Push-ups', 3, 12, 60, 'Targets abdominals, shoulders, chest muscles, triceps and wing muscles.', NULL, NULL),
(43, 1, 'male', 'at gym', 'Pull-ups', 3, 12, 60, 'Primarily focus on biceps and latissimus dorsi.', NULL, NULL),
(44, 1, 'male', 'at gym', 'Squats', 3, 10, 30, 'Help build muscles around the leg and hip region.', NULL, NULL),
(45, 1, 'male', 'at gym', 'Glute Kickback', 3, 10, 60, 'Strengthens the buttocks and the hamstrings.', NULL, NULL),
(46, 1, 'male', 'at gym', 'Deadlift', 3, 10, 60, 'Increases overall muscle mass. Strengthens upper and lower back.', NULL, NULL),
(47, 1, 'male', 'at gym', 'Bench Press', 3, 12, 60, 'Builds shoulders, triceps and chest muscles.', NULL, NULL);

-- --------------------------------------------------------

--
-- Table structure for table `program_meals`
--

CREATE TABLE `program_meals` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `fitness_category_id` bigint(20) UNSIGNED NOT NULL,
  `gender` enum('male','female','other') NOT NULL,
  `meal_name` varchar(255) NOT NULL,
  `calories` int(11) NOT NULL,
  `protein` int(11) NOT NULL,
  `carbs` int(11) NOT NULL,
  `fats` int(11) NOT NULL,
  `description` text NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `program_meals`
--

INSERT INTO `program_meals` (`id`, `fitness_category_id`, `gender`, `meal_name`, `calories`, `protein`, `carbs`, `fats`, `description`, `created_at`, `updated_at`) VALUES
(1, 1, 'male', 'Oatmeal with banana and almond milk', 400, 10, 70, 8, 'Quick and easy oatmeal with sliced banana and almond milk', NULL, NULL),
(2, 1, 'male', 'Brown rice with stir-fried veggies and tofu', 500, 20, 85, 10, 'Brown rice with stir-fried veggies and tofu', NULL, NULL),
(3, 1, 'male', 'Grilled chicken salad with vinaigrette', 450, 30, 20, 28, 'Grilled chicken breast served over mixed greens with a vinaigrette dressing', NULL, NULL),
(4, 1, 'male', 'Greek yogurt with berries and granola', 350, 25, 40, 10, 'Greek yogurt topped with mixed berries and granola', NULL, NULL),
(5, 1, 'male', 'Grilled salmon with sweet potato and steamed broccoli', 550, 35, 35, 28, 'Grilled salmon fillet with roasted sweet potato and steamed broccoli', NULL, NULL),
(6, 1, 'male', 'Whole wheat pasta with marinara sauce and meatballs', 300, 25, 90, 15, 'Whole wheat pasta with marinara sauce and meatballs', NULL, NULL),
(7, 1, 'male', 'Scrambled eggs with spinach and whole wheat toast', 400, 25, 35, 20, 'Scrambled eggs with spinach and whole wheat toast', NULL, NULL),
(8, 3, 'male', 'Eggs with Avocado Toast', 400, 25, 35, 20, 'Eggs with Avocado Toast', NULL, NULL),
(9, 3, 'male', 'Turkey and Swiss Sandwich', 450, 30, 45, 15, 'Turkey and Swiss Sandwich', NULL, NULL),
(10, 3, 'male', 'Grilled Chicken Breast with Brown Rice', 500, 40, 45, 15, 'Grilled Chicken Breast with Brown Rice', NULL, NULL),
(11, 3, 'male', 'Greek Yogurt with Berries and Granola', 350, 25, 40, 10, 'Greek Yogurt with Berries and Granola', NULL, NULL),
(12, 3, 'male', 'Hummus and Veggie Wrap', 350, 20, 45, 15, 'Hummus and Veggie Wrap', NULL, NULL),
(13, 3, 'male', 'Beef Stir Fry with Quinoa', 550, 40, 50, 20, 'Beef Stir Fry with Quinoa', NULL, NULL),
(14, 3, 'male', 'Peanut Butter Banana Smoothie', 350, 20, 45, 15, 'Peanut Butter Banana Smoothie', NULL, NULL),
(15, 5, 'male', 'Oatmeal and Berries', 350, 14, 62, 6, 'Oatmeal and Berries', NULL, NULL),
(16, 5, 'male', 'Grilled Chicken Salad', 400, 30, 25, 25, 'Grilled Chicken Salad', NULL, NULL),
(17, 5, 'male', 'Turkey and Cheese Wrap', 350, 22, 20, 16, 'Turkey and Cheese Wrap', NULL, NULL),
(18, 5, 'male', 'Tuna and Avocado Sandwich', 450, 28, 40, 20, 'Tuna and Avocado Sandwich', NULL, NULL),
(19, 5, 'male', 'Stir-Fry with Brown Rice', 500, 35, 60, 15, 'Stir-Fry with Brown Rice', NULL, NULL),
(20, 5, 'male', 'Spaghetti Bolognese', 550, 30, 70, 18, 'Spaghetti Bolognese', NULL, NULL),
(21, 5, 'male', 'Grilled Fish with Vegetables', 450, 28, 35, 20, 'Grilled Fish with Vegetables', NULL, NULL),
(22, 5, 'male', 'Omelette', 500, 30, 10, 40, 'Omelette', NULL, NULL),
(23, 5, 'male', 'Grilled chicken breast', 600, 50, 5, 45, 'Grilled chicken breast', NULL, NULL),
(24, 5, 'male', 'Protein shake', 250, 30, 10, 15, 'Protein shake', NULL, NULL),
(25, 5, 'male', 'Turkey burger', 600, 40, 30, 30, 'Turkey burger', NULL, NULL);

-- --------------------------------------------------------

--
-- Table structure for table `questions`
--

CREATE TABLE `questions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `question_type_id` bigint(20) UNSIGNED NOT NULL,
  `question` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `questions`
--

INSERT INTO `questions` (`id`, `question_type_id`, `question`, `created_at`, `updated_at`) VALUES
(1, 1, 'What is your gender?', NULL, NULL),
(2, 2, 'What is your age?', NULL, NULL),
(3, 3, 'What is your height? (feets)', NULL, NULL),
(4, 4, 'What is your weight? (kilograms)', NULL, NULL),
(5, 5, 'Do you have any disability?', NULL, NULL),
(6, 6, 'Days for workout in a week?', NULL, NULL),
(7, 6, 'Day for rest in a week?', NULL, NULL);

-- --------------------------------------------------------

--
-- Table structure for table `question_types`
--

CREATE TABLE `question_types` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `question_types`
--

INSERT INTO `question_types` (`id`, `name`, `created_at`, `updated_at`) VALUES
(1, 'Gender', NULL, NULL),
(2, 'Age', NULL, NULL),
(3, 'Height', NULL, NULL),
(4, 'Weight', NULL, NULL),
(5, 'Disability', NULL, NULL),
(6, 'Day', NULL, NULL);

--
-- Indexes for dumped tables
--

--
-- Indexes for table `bmi_ranges`
--
ALTER TABLE `bmi_ranges`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `bmi_range_exercises`
--
ALTER TABLE `bmi_range_exercises`
  ADD PRIMARY KEY (`id`),
  ADD KEY `bmi_range_exercises_bmi_range_id_foreign` (`bmi_range_id`),
  ADD KEY `bmi_range_exercises_program_exercise_id_foreign` (`program_exercise_id`);

--
-- Indexes for table `bmi_range_meals`
--
ALTER TABLE `bmi_range_meals`
  ADD PRIMARY KEY (`id`),
  ADD KEY `bmi_range_meals_bmi_range_id_foreign` (`bmi_range_id`),
  ADD KEY `bmi_range_meals_program_meal_id_foreign` (`program_meal_id`);

--
-- Indexes for table `customer_answers`
--
ALTER TABLE `customer_answers`
  ADD PRIMARY KEY (`id`),
  ADD KEY `customer_answers_question_id_foreign` (`question_id`),
  ADD KEY `customer_answers_customer_id_foreign` (`customer_id`);

--
-- Indexes for table `customer_plans`
--
ALTER TABLE `customer_plans`
  ADD PRIMARY KEY (`id`),
  ADD KEY `customer_plans_customer_id_foreign` (`customer_id`),
  ADD KEY `customer_plans_plan_id_foreign` (`plan_id`);

--
-- Indexes for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`);

--
-- Indexes for table `fitness_categories`
--
ALTER TABLE `fitness_categories`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `fitness_category_questions`
--
ALTER TABLE `fitness_category_questions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fitness_category_questions_fitness_category_id_foreign` (`fitness_category_id`),
  ADD KEY `fitness_category_questions_question_id_foreign` (`question_id`);

--
-- Indexes for table `migrations`
--
ALTER TABLE `migrations`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `program_exercises`
--
ALTER TABLE `program_exercises`
  ADD PRIMARY KEY (`id`),
  ADD KEY `program_exercises_fitness_category_id_foreign` (`fitness_category_id`);

--
-- Indexes for table `program_meals`
--
ALTER TABLE `program_meals`
  ADD PRIMARY KEY (`id`),
  ADD KEY `program_meals_fitness_category_id_foreign` (`fitness_category_id`);

--
-- Indexes for table `questions`
--
ALTER TABLE `questions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `questions_question_type_id_foreign` (`question_type_id`);

--
-- Indexes for table `question_types`
--
ALTER TABLE `question_types`
  ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `bmi_ranges`
--
ALTER TABLE `bmi_ranges`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `bmi_range_exercises`
--
ALTER TABLE `bmi_range_exercises`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=48;

--
-- AUTO_INCREMENT for table `bmi_range_meals`
--
ALTER TABLE `bmi_range_meals`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=26;

--
-- AUTO_INCREMENT for table `customer_answers`
--
ALTER TABLE `customer_answers`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=23;

--
-- AUTO_INCREMENT for table `customer_plans`
--
ALTER TABLE `customer_plans`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `fitness_categories`
--
ALTER TABLE `fitness_categories`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `fitness_category_questions`
--
ALTER TABLE `fitness_category_questions`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=36;

--
-- AUTO_INCREMENT for table `migrations`
--
ALTER TABLE `migrations`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=18;

--
-- AUTO_INCREMENT for table `program_exercises`
--
ALTER TABLE `program_exercises`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=48;

--
-- AUTO_INCREMENT for table `program_meals`
--
ALTER TABLE `program_meals`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=26;

--
-- AUTO_INCREMENT for table `questions`
--
ALTER TABLE `questions`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `question_types`
--
ALTER TABLE `question_types`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `bmi_range_exercises`
--
ALTER TABLE `bmi_range_exercises`
  ADD CONSTRAINT `bmi_range_exercises_bmi_range_id_foreign` FOREIGN KEY (`bmi_range_id`) REFERENCES `bmi_ranges` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `bmi_range_exercises_program_exercise_id_foreign` FOREIGN KEY (`program_exercise_id`) REFERENCES `program_exercises` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `bmi_range_meals`
--
ALTER TABLE `bmi_range_meals`
  ADD CONSTRAINT `bmi_range_meals_bmi_range_id_foreign` FOREIGN KEY (`bmi_range_id`) REFERENCES `bmi_ranges` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `bmi_range_meals_program_meal_id_foreign` FOREIGN KEY (`program_meal_id`) REFERENCES `program_meals` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `customer_answers`
--
ALTER TABLE `customer_answers`
  ADD CONSTRAINT `customer_answers_customer_id_foreign` FOREIGN KEY (`customer_id`) REFERENCES `users` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `customer_answers_question_id_foreign` FOREIGN KEY (`question_id`) REFERENCES `questions` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `customer_plans`
--
ALTER TABLE `customer_plans`
  ADD CONSTRAINT `customer_plans_customer_id_foreign` FOREIGN KEY (`customer_id`) REFERENCES `users` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `customer_plans_plan_id_foreign` FOREIGN KEY (`plan_id`) REFERENCES `fitness_categories` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `fitness_category_questions`
--
ALTER TABLE `fitness_category_questions`
  ADD CONSTRAINT `fitness_category_questions_fitness_category_id_foreign` FOREIGN KEY (`fitness_category_id`) REFERENCES `fitness_categories` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `fitness_category_questions_question_id_foreign` FOREIGN KEY (`question_id`) REFERENCES `questions` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `program_exercises`
--
ALTER TABLE `program_exercises`
  ADD CONSTRAINT `program_exercises_fitness_category_id_foreign` FOREIGN KEY (`fitness_category_id`) REFERENCES `fitness_categories` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `program_meals`
--
ALTER TABLE `program_meals`
  ADD CONSTRAINT `program_meals_fitness_category_id_foreign` FOREIGN KEY (`fitness_category_id`) REFERENCES `fitness_categories` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `questions`
--
ALTER TABLE `questions`
  ADD CONSTRAINT `questions_question_type_id_foreign` FOREIGN KEY (`question_type_id`) REFERENCES `question_types` (`id`) ON DELETE CASCADE;
COMMIT;

