Rework service, removed redundant code, service invoicing improvements
This commit is contained in:
@@ -3,25 +3,23 @@
|
||||
namespace App\Models\Usage;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
use App\Models\Service\Broadband as ServiceBroadband;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
class Broadband extends Model
|
||||
class Broadband extends Type
|
||||
{
|
||||
protected $casts = [
|
||||
'date'=>'datetime:Y-m-d',
|
||||
];
|
||||
|
||||
protected $table = 'usage_broadband';
|
||||
public $timestamps = FALSE;
|
||||
|
||||
private $traffic_end = 14;
|
||||
|
||||
/* RELATIONS */
|
||||
|
||||
/* @todo rename to service() and put in parent */
|
||||
/* @deprecated */
|
||||
public function broadband()
|
||||
{
|
||||
Log::alert('deprecated function '.__METHOD__);
|
||||
return $this->belongsTo(ServiceBroadband::class);
|
||||
}
|
||||
|
||||
|
14
app/Models/Usage/Type.php
Normal file
14
app/Models/Usage/Type.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Usage;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
abstract class Type extends Model
|
||||
{
|
||||
protected $casts = [
|
||||
'date'=>'datetime:Y-m-d',
|
||||
];
|
||||
|
||||
public $timestamps = FALSE;
|
||||
}
|
Reference in New Issue
Block a user