Updates to service updating - broadband

This commit is contained in:
Deon George
2022-08-01 20:34:10 +10:00
parent de3f1a534b
commit 7feec266b8
11 changed files with 234 additions and 73 deletions

View File

@@ -10,6 +10,7 @@ use App\Interfaces\ServiceUsage;
use App\Models\Supplier\Broadband as SupplierBroadband;
use App\Models\Supplier\Type as SupplierType;
use App\Models\Usage\Broadband as UsageBroadband;
use App\Rules\IPv6_CIDR;
/**
* Class Broadband (Service)
@@ -81,6 +82,27 @@ class Broadband extends Type implements ServiceUsage
return $value ?: $this->supplied()->technology;
}
/* OVERRIDES */
/**
* Service update validation
*
* @return array
*/
public function validation(): array
{
return [
'service_number' => 'nullable|string|min:10|max:10',
'service_username' => 'nullable|string',
'service_password' => 'nullable|string',
'connect_at' => 'nullable|date',
'start_at' => 'nullable|date',
'expire_at' => 'nullable|date|after:start_at',
'ipaddress' => 'nullable|ipv4',
'ip6address' => ['nullable',new IPv6_CIDR],
];
}
/* METHODS */
/**