StreakFit — API Laravel 13 OSDD + Octane/FrankenPHP
Build & Deploy / build (push) Successful in 18s

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-19 03:00:17 +02:00
co-authored by Claude Opus 4.8
commit af32669931
300 changed files with 21235 additions and 0 deletions
@@ -0,0 +1,39 @@
<?php
namespace Functional\Streaks\Database\Factories;
use Functional\Streaks\Enums\GoalPeriod;
use Functional\Streaks\Enums\GoalType;
use Functional\Streaks\Models\Goal;
use Functional\Users\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends Factory<Goal>
*/
class GoalFactory extends Factory
{
protected $model = Goal::class;
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
$type = fake()->randomElement(GoalType::cases());
return [
'user_id' => User::factory(),
'type' => $type,
'target' => match ($type) {
GoalType::WeeklySessions => fake()->numberBetween(2, 6),
GoalType::WeeklyMinutes => fake()->numberBetween(60, 300),
GoalType::WeeklyVolume => fake()->numberBetween(1000, 10000),
},
'period' => GoalPeriod::Week,
'is_active' => fake()->boolean(85),
];
}
}