ldc-flucollector/app/Models/ServiceStat.php
2023-09-28 12:05:50 +02:00

40 lines
759 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
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
/**
* Get the Service that owns the ServiceStat
*
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function service(): BelongsTo
{
return $this->belongsTo(Service::class);
}
}