Files
coolify/app/Models/ResourceLink.php
T
6b07f03107 feat(terminal): interactive console mode for containers (docker attach) (#11538)
Co-authored-by: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com>
Co-authored-by: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: rosslh <ross@rosshill.ca>
2026-10-14 14:32:02 +02:00

38 lines
743 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\MorphTo;
/**
* A visual-only link between two resources of one environment on the environment canvas.
*/
class ResourceLink extends BaseModel
{
protected $fillable = [
'environment_id',
'source_type',
'source_id',
'target_type',
'target_id',
'label',
'created_by',
];
public function environment(): BelongsTo
{
return $this->belongsTo(Environment::class);
}
public function source(): MorphTo
{
return $this->morphTo();
}
public function target(): MorphTo
{
return $this->morphTo();
}
}