Files
FlightsAPI/app/Models/AchievementDifficulty.php
2026-04-26 15:16:17 +10:00

34 lines
804 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
/**
* @property int $id
* @property string $internal_name
* @property string $name
* @property string $description
*
* @property-read Collection<int, Achievement> $achievements
*/
class AchievementDifficulty extends Model
{
protected $fillable = [
'internal_name',
'name',
'description',
];
// ---------------------------------------------------------------
// Relationships
// ---------------------------------------------------------------
public function achievements(): HasMany
{
return $this->hasMany(Achievement::class, 'achievement_difficulty_id');
}
}