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
+43
View File
@@ -0,0 +1,43 @@
<?php
namespace Functional\Streaks\Models;
use Functional\Streaks\Database\Factories\GoalFactory;
use Functional\Streaks\Enums\GoalPeriod;
use Functional\Streaks\Enums\GoalType;
use Functional\Users\Models\User;
use Illuminate\Database\Eloquent\Attributes\UseFactory;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
/**
* Objectif hebdomadaire fixé par le user (nombre de séances, minutes ou volume).
*
* @property int $user_id
* @property GoalType $type
* @property int $target
* @property GoalPeriod $period
* @property bool $is_active
*/
#[UseFactory(GoalFactory::class)]
class Goal extends Model
{
use HasFactory;
protected $fillable = [
'user_id', 'type', 'target', 'period', 'is_active',
];
protected $casts = [
'type' => GoalType::class,
'target' => 'integer',
'period' => GoalPeriod::class,
'is_active' => 'boolean',
];
public function user(): BelongsTo
{
return $this->belongsTo(User::class);
}
}