2020-12-01 17:02:10 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
|
|
|
|
|
class ServiceStat extends Model
|
|
|
|
|
{
|
|
|
|
|
use HasFactory;
|
|
|
|
|
|
|
|
|
|
protected $fillable = ['date'];
|
|
|
|
|
|
2021-03-14 10:45:42 +01:00
|
|
|
protected $attributes = [
|
|
|
|
|
'nb_calls' => 0
|
|
|
|
|
];
|
|
|
|
|
|
2021-02-28 12:04:49 +01:00
|
|
|
/**
|
|
|
|
|
* Brand BelongsTo relation
|
|
|
|
|
*
|
|
|
|
|
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
|
|
|
|
*/
|
|
|
|
|
public function brand()
|
|
|
|
|
{
|
|
|
|
|
return $this->belongsTo(Brand::class);
|
2020-12-01 17:02:10 +01:00
|
|
|
}
|
|
|
|
|
|
2021-02-28 12:04:49 +01:00
|
|
|
/**
|
|
|
|
|
* Service BelongsTo relation
|
|
|
|
|
*
|
|
|
|
|
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
|
|
|
|
*/
|
|
|
|
|
public function service()
|
|
|
|
|
{
|
|
|
|
|
return $this->belongsTo(Service::class);
|
2020-12-01 17:02:10 +01:00
|
|
|
}
|
|
|
|
|
}
|