Files
Virtnet.bond/extensions/Servers/Proxmox/Models/Server.php
Joseph.Rawlings b95c59be81 feat: reimplement server icon customization feature
- Add user_set_icon and user_set_icon_color to Server model fillable
- Add icon modal properties and methods to Overview component
- Add clickable icon button next to server hostname in layout
- Add icon picker modal with search, color selection, and preview
- Support for 100+ Remix icons across various categories
- Icons persist to database and display on page load
2025-12-06 08:07:52 -05:00

62 lines
1.2 KiB
PHP

<?php
namespace Paymenter\Extensions\Servers\Proxmox\Models;
use App\Models\Service;
use Illuminate\Database\Eloquent\Model;
class Server extends Model
{
protected $table = 'ext_proxmox_servers';
protected $fillable = [
'user_id',
'node_id',
'os_id',
'service_id',
'vm_id',
'primary_ipv4',
'primary_ipv6',
'status',
'hostname',
'password',
'user_set_icon',
'user_set_icon_color',
];
public function node()
{
return $this->belongsTo(Node::class);
}
public function os()
{
return $this->belongsTo(OS::class);
}
public function ipAddresses()
{
return $this->hasMany(IPAddress::class);
}
public function service()
{
return $this->belongsTo(Service::class);
}
public function primaryIpv4()
{
return $this->belongsTo(IPAddress::class, 'primary_ipv4');
}
public function primaryIpv6()
{
return $this->belongsTo(IPAddress::class, 'primary_ipv6');
}
public function statistics()
{
return $this->hasMany(ServerStatistics::class);
}
}