coolify/app/Models/V5/Cluster.php
Andras Bacsai 1e038fecae feat(v5): add server clusters and CLI bootstrap
Create v5 cluster/server persistence, expose them on the home page,
and add a bootstrap endpoint backed by the coolify CLI. Add dev Lima
server sync support and update the dev script firewall flow.
2026-06-16 15:45:16 +02:00

35 lines
695 B
PHP

<?php
namespace App\Models\V5;
use App\Models\Team;
use App\Models\User;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
class Cluster extends V5Model
{
protected $table = 'v5_clusters';
protected $fillable = [
'team_id',
'created_by_user_id',
'name',
'description',
];
public function team(): BelongsTo
{
return $this->belongsTo(Team::class);
}
public function creator(): BelongsTo
{
return $this->belongsTo(User::class, 'created_by_user_id');
}
public function servers(): HasMany
{
return $this->hasMany(Server::class);
}
}