Some service host/domain updates, including schema updates
This commit is contained in:
@@ -16,6 +16,26 @@ class Domain extends Type
|
||||
protected $table = 'service_domain';
|
||||
protected $with = ['tld'];
|
||||
|
||||
/* OVERRIDES */
|
||||
|
||||
/**
|
||||
* Service update validation
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function validation(): array
|
||||
{
|
||||
return [
|
||||
'domain_name' => 'nullable|string|min:2',
|
||||
'tld_id' => 'required|exists:tlds,id',
|
||||
'expire_at' => 'required|date',
|
||||
'domain_registrar_id' => 'required|exists:domain_registrars,id',
|
||||
'registrar_account' => 'nullable|string',
|
||||
'registrar_ns' => 'nullable|string',
|
||||
'registrar_username' => 'nullable|string',
|
||||
];
|
||||
}
|
||||
|
||||
/* RELATIONS */
|
||||
|
||||
public function registrar()
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace App\Models\Service;
|
||||
|
||||
use App\Models\HostServer;
|
||||
use App\Models\SupplierHostServer;
|
||||
use App\Traits\ServiceDomains;
|
||||
|
||||
/**
|
||||
@@ -20,6 +20,25 @@ class Host extends Type
|
||||
|
||||
public function provider()
|
||||
{
|
||||
return $this->belongsTo(HostServer::class,'host_server_id');
|
||||
return $this->belongsTo(SupplierHostServer::class,'supplier_host_server_id');
|
||||
}
|
||||
|
||||
/* OVERRIDES */
|
||||
|
||||
/**
|
||||
* Service update validation
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function validation(): array
|
||||
{
|
||||
return [
|
||||
'domain_name' => 'nullable|string|min:2',
|
||||
'tld_id' => 'required|exists:tlds,id',
|
||||
'expire_at' => 'required|date',
|
||||
'supplier_host_server_id' => 'required|exists:supplier_host_servers,id',
|
||||
'host_username' => 'nullable|string',
|
||||
'host_password' => 'nullable|string',
|
||||
];
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user