ldc-arcadia-api/database/factories/IncoCompoFactory.php

214 lines
8.9 KiB
PHP
Raw Permalink Normal View History

<?php
declare(strict_types=1);
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
use Infra\Database\Models\IncoCompo;
/**
* @extends Factory<IncoCompo>
*/
final class IncoCompoFactory extends Factory
{
protected $model = IncoCompo::class;
/**
* @return array<string, mixed>
*/
#[\Override]
public function definition(): array
{
$idInco = (string) fake()->unique()->numberBetween(10000, 99999);
return [
'id' => $idInco,
'id_inco' => $idInco,
'identification' => [
'name' => 'Poulet Rôti 1kg',
'number' => $idInco,
'source' => 'LDC',
],
'energy' => [
'reference' => ['size' => '100g', 'energyKj' => '500', 'energyKcal' => '120'],
'portion' => ['size' => '150g', 'energyKj' => '750', 'energyKcal' => '180'],
],
'reference_macronutrients' => [
'fat' => ['amount' => '10.0', 'precision' => null],
'saturatedFat' => ['amount' => '2.5', 'precision' => null],
'carbohydrates' => ['amount' => '0.5', 'precision' => null],
'sugars' => ['amount' => '0.1', 'precision' => null],
'fiber' => ['amount' => '0.0', 'precision' => null],
'protein' => ['amount' => '22.0', 'precision' => null],
'salt' => ['amount' => '1.2', 'precision' => null],
'sodium' => '0.48',
],
'portion_macronutrients' => [
'fat' => ['amount' => '15.0', 'precision' => null],
'saturatedFat' => ['amount' => '3.75', 'precision' => null],
'carbohydrates' => ['amount' => '0.75', 'precision' => null],
'sugars' => ['amount' => '0.15', 'precision' => null],
'fiber' => ['amount' => '0.0', 'precision' => null],
'protein' => ['amount' => '33.0', 'precision' => null],
'salt' => ['amount' => '1.8', 'precision' => null],
'sodium' => '0.72',
],
'fresh_produce_and_nuts' => [
'reference' => ['fruits' => '0', 'nuts' => '0'],
'portion' => ['fruits' => '0', 'nuts' => '0'],
'freshFnlPercentage' => ['value' => '0'],
'fruitsPercentage' => ['value' => '0'],
],
'reference_intakes' => [
'energyE14' => ['value' => '6%'],
'energyKj' => ['value' => '6%'],
'fat' => ['value' => '14%'],
'saturatedFat' => ['value' => '13%'],
'carbohydrates' => ['value' => '0%'],
'sugars' => ['value' => '0%'],
'protein' => ['value' => '44%'],
'salt' => ['value' => '20%'],
'portionAmount' => '150g',
'proteinToLipidRatio' => '2.2',
],
'nutri_score' => [
'class' => 'A',
'score' => -2,
'isFnl' => false,
'status' => 'valid',
],
'nutri_score_points' => [
'energyPoints' => '1',
'saturatedFatPoints' => '1',
'sugarsPoints' => '0',
'saltPoints' => '2',
'fiberPoints' => '0',
'proteinPoints' => '5',
'freshFnlPoints' => '0',
],
'minerals' => [
'calcium' => '12.0',
'magnesium' => '25.0',
'potassium' => '300.0',
'phosphorus' => '200.0',
'chloride' => '0.0',
'iron' => '1.1',
'zinc' => '1.5',
'copper' => '0.1',
'manganese' => '0.0',
'selenium' => '15.0',
'iodine' => '0.0',
'chromium' => '0.0',
'molybdenum' => '0.0',
'sulfur' => '0.0',
'nitrates' => '0.0',
],
'vitamins' => [
'vitaminA' => '0.0',
'vitaminB6' => '0.4',
'vitaminB12' => '0.5',
'vitaminC' => '0.0',
'vitaminD' => '0.0',
'vitaminE' => '0.2',
'vitaminK' => '0.0',
'cholecalciferol' => '0.0',
'niacin' => '8.0',
'riboflavin' => '0.2',
'thiamine' => '0.1',
'pantothenicAcid' => '1.0',
'biotin' => '0.0',
'folates' => '10.0',
],
'carbohydrates_detail' => [
'starch' => '0.0',
'maltodextrin' => '0.0',
'sucrose' => '0.0',
'glucose' => '0.0',
'lactose' => '0.0',
'maltose' => '0.0',
'galactose' => '0.0',
'carbohydrateHydrates' => '0.0',
'boundFructose' => '0.0',
'freeFructose' => '0.0',
'oligosaccharides' => '0.0',
'polyols' => '0.0',
'solubleFiber' => '0.0',
'inositol' => '0.0',
],
'fatty_acids' => [
'fd' => '0.0',
'cholesterol' => '70.0',
'transFat' => '0.1',
'formic' => '0.0',
'acetic' => '0.0',
'propionic' => '0.0',
'butyric' => '0.0',
'valeric' => '0.0',
'caproic' => '0.0',
'enanthic' => '0.0',
'caprylic' => '0.0',
'pelargonic' => '0.0',
'capric' => '0.0',
'undecylic' => '0.0',
'lauric' => '0.0',
'tridecylic' => '0.0',
'myristic' => '0.1',
'pentadecylic' => '0.0',
'f16d0' => '0.0',
'margaric' => '0.0',
'stearic' => '0.8',
'arachidic' => '0.0',
'heneicosylic' => '0.0',
'behenic' => '0.0',
'tricosylic' => '0.0',
'lignoceric' => '0.0',
'carboceric' => '0.0',
'cerotic' => '0.0',
'ceroplastic' => '0.0',
'montanic' => '0.0',
'nonacosylic' => '0.0',
'melissic' => '0.0',
'laceric' => '0.0',
'hentriacontylic' => '0.0',
'hextriacontylic' => '0.0',
'heptatriacontylic' => '0.0',
'octatriacontylic' => '0.0',
'nonadylie' => '0.0',
'psyllic' => '0.0',
'palmitic' => '1.5',
'oleic' => '2.0',
'f18d' => '0.0',
'f19d' => '0.0',
'f11eico' => '0.0',
'geddic' => '0.0',
'erucic' => '0.0',
'nervonic' => '0.0',
'hyenic' => '0.0',
'amscis' => '0.0',
'f18d2cn6' => '0.5',
'f18d3n3' => '0.1',
'f20d4' => '0.0',
'f20d5n3' => '0.0',
'f22d6n3' => '0.0',
'fapun3' => '0.0',
'fapun6' => '0.0',
'fapun9' => '0.0',
'fapucis' => '0.0',
'fapulc' => '0.0',
],
'amino_acids' => [
'essentialAminoAcids' => '8.5',
'caseins' => '0.0',
'wheyProtein' => '0.0',
],
'special_compounds' => [
'choline' => '60.0',
'carnitine' => '5.0',
'taurine' => '0.0',
'nucleotides' => '0.0',
],
];
}
}