Added achievement data
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
<?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');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user