ldc-crm/app/Models/ServiceStat.php
2023-10-06 16:33:22 +02:00

51 lines
903 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
/**
* Brand BelongsTo relation
*
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function brand()
{
return $this->belongsTo(Brand::class);
}
/**
* Service BelongsTo relation
*
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function service()
{
return $this->belongsTo(Service::class);
}
}