mirror of
https://github.com/coollabsio/coolify.git
synced 2026-11-06 13:10:37 -04:00
feat(canvas): add interactive resource views and team avatars (#12160)
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
<?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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user