Code refactor work. New optimised query to get invoice status summary for an account

This commit is contained in:
2024-07-05 12:04:08 +10:00
parent 59dc825bf7
commit 648d941893
15 changed files with 375 additions and 169 deletions

View File

@@ -20,10 +20,6 @@ class Broadband extends Type implements ServiceUsage
{
private const LOGKEY = 'MSB';
protected $casts = [
'connect_at'=>'datetime:Y-m-d',
'expire_at'=>'datetime:Y-m-d',
];
protected $table = 'service_broadband';
/* INTERFACES */

View File

@@ -14,7 +14,9 @@ class Domain extends Type
use ServiceDomains;
protected $table = 'service_domain';
protected $with = ['tld'];
protected $with = [
'tld',
];
/* OVERRIDES */

View File

@@ -13,5 +13,7 @@ class Email extends Type
use ServiceDomains;
protected $table = 'service_email';
protected $with = ['tld'];
protected $with = [
'tld',
];
}

View File

@@ -14,7 +14,9 @@ class Host extends Type
use ServiceDomains;
protected $table = 'service_host';
protected $with = ['tld'];
protected $with = [
'tld',
];
/* RELATIONS */

View File

@@ -8,10 +8,6 @@ namespace App\Models\Service;
*/
class Phone extends Type
{
protected $dates = [
'connect_at',
'expire_at',
];
protected $table = 'service_phone';
/* INTERFACES */

View File

@@ -14,9 +14,11 @@ abstract class Type extends Model implements ServiceItem
{
use ScopeServiceActive,ScopeServiceUserAuthorised;
protected $dates = [
'expire_at',
protected $casts = [
'connect_at' => 'datetime:Y-m-d',
'expire_at' => 'datetime:Y-m-d',
];
public $timestamps = FALSE;
/* RELATIONS */