ldc-flucollector/database/factories/XmlIncoFactory.php
Jérémy Munsch 656120f042
TMP
- Arcadia Xml Jobs WIP
- Api WIP
2022-04-11 12:41:44 +02:00

105 lines
4.6 KiB
PHP

<?php
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
class XmlIncoFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array
* @phpcs:disable Generic.Metrics.CyclomaticComplexity.TooHigh
*/
public function definition()
{
return [
'nom' => $this->faker->unique()->words(rand(2, 3), true),
'prod_saison' => $this->faker->boolean(),
'allegations' => $this->faker->boolean(75) ? $this->faker->sentence(7) : null,
'descriptif' => $this->faker->boolean(75) ? 'descriptif ' . $this->faker->text(150) : null,
'pictures' => [],
'astuces' => $this->faker->boolean(75) ? 'astuces ' . $this->faker->text(150) : null,
'lib_conso' => $this->faker->boolean(75) ? $this->faker->sentence(7) : null,
'nb_portion' => $this->faker->boolean(75) ? $this->faker->text(20) : null,
'typ_portion' => $this->faker->boolean(75) ? 'typ_portion ' . $this->faker->text(150) : null,
'pds_moy_theo' => $this->faker->boolean(75) ? $this->faker->numberBetween(0, 250) : null,
'conseil_prepa' => $this->faker->boolean(75) ? 'conseil_prepa ' . $this->faker->text(150) : null,
'arg_vente' => $this->faker->boolean(75) ? 'arg_vente ' . $this->faker->text(150) : null,
'lst_ing' => $this->faker->boolean(75) ? 'lst_ing ' . $this->faker->text(150) : null,
'lib_allergene' => $this->faker->boolean(75) ? 'lib_allergene ' . $this->faker->text(150) : null,
'nutritional_values' => [
'val_energ_kj_r' => $this->faker->numberBetween(250, 1200),
'val_energ_kcal_r' => $this->faker->numberBetween(50, 400),
'mat_grass_r' => $this->faker->numberBetween(6, 30),
'ags_r' => '5.3',
'glucides_r' => '2',
'sucre_r' => '1.4',
'fib_alim_r' => '0.8',
'proteine_r' => '17',
'sel_r' => '0.47',
'sodium_r' => '188',
'fruits_r' => '0',
'fruits_coque_sech_r' => '0',
'pourcent_apport_ref_e14_r' => '11.4',
'pourcent_apport_ref_kjo_r' => '11.5',
'pourcent_apport_ref_fat_r' => '24.7',
'pourcent_apport_ref_fatsat_r' => '29.8',
'pourcent_apport_ref_choval_r' => '0.6',
'pourcent_apport_ref_sugar_r' => '1.7',
'pourcent_apport_ref_fibtg_r' => null,
'pourcent_apport_ref_pro_r' => '33',
'pourcent_apport_ref_salteq_r' => '6.7',
'taille_port' => null,
'val_energ_kj_p' => null,
'val_energ_kcal_p' => null,
'mat_grass_p' => null,
'ags_p' => null,
'glucides_p' => null,
'sucre_p' => null,
'fib_alim_p' => null,
'proteine_p' => null,
'sodium_p' => null,
'fruits_p' => null,
'sel_p' => null,
'fruits_coque_sech_p' => null,
'pourcent_apport_ref_e14_p' => null,
'pourcent_apport_ref_kjo_p' => null,
'pourcent_apport_ref_fat_p' => null,
'pourcent_apport_ref_fatsat_p' => null,
'pourcent_apport_ref_choval_p' => null,
'pourcent_apport_ref_sugar_p' => null,
'pourcent_apport_ref_fibtg_p' => null,
'pourcent_apport_ref_pro_p' => null,
'pourcent_apport_ref_salteq_p' => null,
'apport_port' => 'Apport de r\u00e9f\u00e9rence pour un adulte type (8400Kj-2000Kcal)',
'part_p' => '32',
'part_g' => '4',
'part_l' => '63',
'p_sur_l' => '1.13',
'pourcent_ags' => '35',
'pourcent_agi' => '65',
'pourcent_ss' => '70',
'pourcent_amidon' => '30',
'composante_n' => '9',
'composante_p' => '5',
'pourcent_fruits' => '0',
'score_nutri' => '4',
'classement' => 'C',
'mat_grass_r_prec' => '=',
'ags_r_prec' => '=',
'glucides_r_prec' => '=',
'sucre_r_prec' => '=',
'fib_alim_r_prec' => '=',
'proteine_r_prec' => '=',
'sel_r_prec' => '=',
'sodium_r_prec' => null,
'fruits_r_prec' => null,
'fruits_coque_sech_r_prec' => null
]
];
}
}