initial commit
This commit is contained in:
41
app/Models/HostingPlan.php
Normal file
41
app/Models/HostingPlan.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
|
||||
class HostingPlan extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'slug',
|
||||
'name',
|
||||
'cpu',
|
||||
'ram',
|
||||
'disk',
|
||||
'max_backups',
|
||||
'allow_public_ip',
|
||||
'allow_iso_upload',
|
||||
'is_active',
|
||||
'whmcs_product_id',
|
||||
];
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'cpu' => 'integer',
|
||||
'ram' => 'integer',
|
||||
'disk' => 'integer',
|
||||
'max_backups' => 'integer',
|
||||
'allow_public_ip' => 'boolean',
|
||||
'allow_iso_upload' => 'boolean',
|
||||
'is_active' => 'boolean',
|
||||
'whmcs_product_id' => 'integer',
|
||||
];
|
||||
}
|
||||
|
||||
public function customers(): HasMany
|
||||
{
|
||||
return $this->hasMany(Customer::class, 'hosting_plan_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user