mirror of
https://github.com/sp-tarkov/forge.git
synced 2025-02-13 04:30:41 -05:00
Pretty nifty, but it still needs a few things before merge. Factory & front-end work, at least.
41 lines
962 B
PHP
41 lines
962 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
/**
|
|
* @property int $id
|
|
* @property int $mod_version_id
|
|
* @property int $dependency_mod_id
|
|
* @property string $version_constraint
|
|
* @property int|null $resolved_version_id
|
|
*/
|
|
class ModDependency extends Model
|
|
{
|
|
/**
|
|
* The relationship between a mod dependency and mod version.
|
|
*/
|
|
public function modVersion(): BelongsTo
|
|
{
|
|
return $this->belongsTo(ModVersion::class);
|
|
}
|
|
|
|
/**
|
|
* The relationship between a mod dependency and mod.
|
|
*/
|
|
public function dependencyMod(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Mod::class, 'dependency_mod_id');
|
|
}
|
|
|
|
/**
|
|
* The relationship between a mod dependency and resolved mod version.
|
|
*/
|
|
public function resolvedVersion(): BelongsTo
|
|
{
|
|
return $this->belongsTo(ModVersion::class, 'resolved_version_id');
|
|
}
|
|
}
|