mirror of
https://github.com/sp-tarkov/forge.git
synced 2025-02-13 04:30:41 -05:00
Refringe
2cca45bcea
Part of moving back to PHPStan level 5 means we can remove some of these. They're very busy and don't give enough context to outweigh the ugly.
45 lines
1.1 KiB
PHP
45 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
|
|
|
class ModDependency extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
/**
|
|
* The relationship between the mod dependency and the mod version.
|
|
*
|
|
* @return BelongsTo<ModVersion, ModDependency>
|
|
*/
|
|
public function modVersion(): BelongsTo
|
|
{
|
|
return $this->belongsTo(ModVersion::class);
|
|
}
|
|
|
|
/**
|
|
* The relationship between the mod dependency and the resolved dependency.
|
|
*
|
|
* @return HasMany<ModResolvedDependency>
|
|
*/
|
|
public function resolvedDependencies(): HasMany
|
|
{
|
|
return $this->hasMany(ModResolvedDependency::class, 'dependency_id')
|
|
->chaperone();
|
|
}
|
|
|
|
/**
|
|
* The relationship between the mod dependency and the dependent mod.
|
|
*
|
|
* @return BelongsTo<Mod, ModDependency>
|
|
*/
|
|
public function dependentMod(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Mod::class, 'dependent_mod_id');
|
|
}
|
|
}
|