26 lines
356 B
PHP
26 lines
356 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Models\Cost;
|
||
|
|
||
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
||
|
abstract class Type extends Model
|
||
|
{
|
||
|
public $timestamps = FALSE;
|
||
|
|
||
|
protected $dates = [
|
||
|
'start_at',
|
||
|
'end_at',
|
||
|
];
|
||
|
|
||
|
/* RELATIONS */
|
||
|
|
||
|
abstract public function service();
|
||
|
|
||
|
/* ATTRIBUTES */
|
||
|
|
||
|
public function getCostAttribute(): float
|
||
|
{
|
||
|
return $this->base+$this->excess;
|
||
|
}
|
||
|
}
|