osb/app/Models/Cost/Type.php

26 lines
356 B
PHP
Raw Normal View History

<?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;
}
}