initial commit
This commit is contained in:
26
app/Models/VmFirewallRule.php
Normal file
26
app/Models/VmFirewallRule.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class VmFirewallRule extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'customer_id', 'direction', 'action', 'protocol', 'port', 'source', 'is_active', 'sort_order',
|
||||
];
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'is_active' => 'boolean',
|
||||
'sort_order' => 'integer',
|
||||
];
|
||||
}
|
||||
|
||||
public function vm(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Customer::class, 'customer_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user