40 lines
679 B
PHP
40 lines
679 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Models;
|
||
|
|
|
||
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||
|
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
|
||
|
|
class ServiceStat extends Model
|
||
|
|
{
|
||
|
|
use HasFactory;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* The attributes that are mass assignable.
|
||
|
|
*
|
||
|
|
* @var string[]
|
||
|
|
*/
|
||
|
|
protected $fillable = ['date'];
|
||
|
|
|
||
|
|
/**
|
||
|
|
* The model's attributes.
|
||
|
|
*
|
||
|
|
* @var array
|
||
|
|
*/
|
||
|
|
protected $attributes = [
|
||
|
|
'nb_calls' => 0
|
||
|
|
];
|
||
|
|
|
||
|
|
// * RELATIONS
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Service BelongsTo relation
|
||
|
|
*
|
||
|
|
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||
|
|
*/
|
||
|
|
public function service()
|
||
|
|
{
|
||
|
|
return $this->belongsTo(Service::class);
|
||
|
|
}
|
||
|
|
}
|