2020-04-17 09:18:42 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
2022-06-15 12:07:34 +02:00
|
|
|
use App\Enums\Environment;
|
|
|
|
|
use App\Enums\ServerType;
|
2020-04-17 09:18:42 +02:00
|
|
|
use Illuminate\Database\Eloquent\Model;
|
2022-06-15 12:07:34 +02:00
|
|
|
use Kwaadpepper\Enum\Traits\CastsEnums;
|
2020-04-17 09:18:42 +02:00
|
|
|
|
2022-06-13 17:40:44 +02:00
|
|
|
class Server extends Model
|
2020-04-17 09:18:42 +02:00
|
|
|
{
|
2022-06-15 12:07:34 +02:00
|
|
|
use CastsEnums;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Map attribute names to enum classes.
|
|
|
|
|
*
|
|
|
|
|
* @var array
|
|
|
|
|
*/
|
|
|
|
|
protected $enumCasts = [
|
|
|
|
|
'env' => Environment::class,
|
|
|
|
|
'type' => ServerType::class
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* The attributes that are mass assignable.
|
|
|
|
|
*
|
|
|
|
|
* @var array
|
|
|
|
|
*/
|
|
|
|
|
protected $fillable = [
|
|
|
|
|
'env', 'virtual_ip',
|
|
|
|
|
'ssh', 'infraweb_ip',
|
|
|
|
|
'title', 'name', 'function',
|
|
|
|
|
'datastore_pcc_id', 'comment',
|
|
|
|
|
'type'
|
|
|
|
|
];
|
2020-04-17 09:18:42 +02:00
|
|
|
}
|