55 lines
1.2 KiB
PHP
55 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use App\Traits\LogsActivity;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
class IpPool extends Model
|
|
{
|
|
use HasFactory, SoftDeletes, LogsActivity;
|
|
|
|
protected $fillable = [
|
|
'uuid',
|
|
'ip_address',
|
|
'module_network_id',
|
|
'gateway',
|
|
'cidr',
|
|
'netmask',
|
|
'status',
|
|
'owner_type',
|
|
'ip_role',
|
|
'parent_ip',
|
|
'customer_name',
|
|
'service_name',
|
|
'allocated_at',
|
|
'revoked_at',
|
|
'allocation_status',
|
|
'contact_email',
|
|
'contact_cc',
|
|
'contact_phone',
|
|
'monthly_cost',
|
|
'selling_price',
|
|
'additional_info',
|
|
'last_email_type',
|
|
'last_email_at',
|
|
'updated_by',
|
|
'note',
|
|
];
|
|
|
|
protected $casts = [
|
|
'allocated_at' => 'date',
|
|
'revoked_at' => 'date',
|
|
'last_email_at' => 'datetime',
|
|
'monthly_cost' => 'decimal:2',
|
|
'selling_price' => 'decimal:2',
|
|
];
|
|
|
|
public function network()
|
|
{
|
|
return $this->belongsTo(ModuleNetwork::class, 'module_network_id', 'id');
|
|
}
|
|
}
|