Files
HexaHost-Panel/app/Models/VmSnapshot.php
2026-05-17 13:26:14 +02:00

27 lines
553 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class VmSnapshot extends Model
{
protected $fillable = [
'customer_id', 'name', 'proxmox_snapshot_id', 'auto_created', 'expires_at',
];
protected function casts(): array
{
return [
'auto_created' => 'boolean',
'expires_at' => 'datetime',
];
}
public function vm(): BelongsTo
{
return $this->belongsTo(Customer::class, 'customer_id');
}
}