<?php

/** @var \Illuminate\Database\Eloquent\Factory $factory */

use App\TrainingWorkoutLine;
use Faker\Generator as Faker;

$factory->define(TrainingWorkoutLine::class, function (Faker $faker) {
    return [
        "description" => $faker->sentence,
        "seconds" => $faker->randomElement([30, 45, 60, 90, 120, null, null, null, null, null, null, null]),
        "reps" => $faker->boolean(20) ? null : ($faker->numberBetween(1,4) . ($faker->boolean(30) ? ("n" . ($faker->boolean(40) ? ("+" . $faker->numberBetween(1,3)) : "") . ($faker->boolean(40) ? (":" . $faker->numberBetween(20, 60)) : "")) : "")),
        "exercise_id" => App\Exercise::all()->random()->id,
        "maleVal" => $faker->numberBetween(4, 120),
        "femaleVal" => $faker->numberBetween(2, 110),
        "units" => $faker->randomElement(["kg", "m", "kcal", "seconds"]),
        "seconds_scaled" => $faker->randomElement([30, 45, 60, 90, 120, null, null, null, null, null, null, null]),
        "reps_scaled" => $faker->randomElement([null, ($faker->numberBetween(1,4) . ($faker->boolean(30) ? ("n" . ($faker->boolean(40) ? ("+" . $faker->numberBetween(1,3)) : "") . ($faker->boolean(40) ? (":" . $faker->numberBetween(20, 60)) : "")) : ""))]),
        "exercise_scaled_id" => App\Exercise::all()->random()->id,
        "maleVal_scaled" => $faker->numberBetween(4, 120),
        "femaleVal_scaled" => $faker->numberBetween(2, 110),
        "units_scaled" => $faker->randomElement(["kg", "m", "kcal", "seconds"])
    ];
});
