feat: history and calculate needs for user
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Enums\NutritionPlanSource;
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\NutritionPlan>
|
||||
*/
|
||||
class NutritionPlanFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'user_id' => User::factory(),
|
||||
'source' => NutritionPlanSource::ONBOARDING,
|
||||
'formula_version' => 'mifflin_st_jeor_v1',
|
||||
'calories' => 2200,
|
||||
'proteins' => 112,
|
||||
'carbs' => 286,
|
||||
'fats' => 61,
|
||||
'resting_metabolism' => 1650,
|
||||
'maintenance_calories' => 2200,
|
||||
'calorie_adjustment_percent' => 0,
|
||||
'calculation_details' => [
|
||||
'activityFactor' => 1.55,
|
||||
'inputWeightKg' => 70,
|
||||
],
|
||||
'is_active' => true,
|
||||
'effective_from' => now(),
|
||||
'effective_until' => null,
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user