<?php

namespace App\Models\Cost;

use Illuminate\Database\Eloquent\Model;

abstract class Type extends Model
{
	public $timestamps = FALSE;

	protected $casts = [
		'start_at' => 'datetime:Y-m-d',
		'end_at' => 'datetime:Y-m-d',
	];

	/* RELATIONS */

	abstract public function service();

	/* ATTRIBUTES */

	public function getCostAttribute(): float
	{
		return $this->base+$this->excess;
	}
}