Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace Functional\Tracking\Database\Factories;
|
||||
|
||||
use Functional\Tracking\Models\BodyMetric;
|
||||
use Functional\Users\Models\User;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends Factory<BodyMetric>
|
||||
*/
|
||||
class BodyMetricFactory extends Factory
|
||||
{
|
||||
protected $model = BodyMetric::class;
|
||||
|
||||
/**
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'user_id' => User::factory(),
|
||||
'measured_on' => fake()->unique()->dateTimeBetween('-6 months', 'now')->format('Y-m-d'),
|
||||
'weight' => fake()->randomFloat(2, 55, 110),
|
||||
'body_fat' => fake()->randomFloat(2, 8, 30),
|
||||
'notes' => null,
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user