You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
860 B

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class CameraHealthState extends Model
{
protected $fillable = ['camera_device_id','status','sdk_status','alarm_status','tcp_reachable','last_pdc_at','pdc_count','push_age_seconds','last_tcp_probe_at','last_tcp_error','last_sdk_exception','last_sdk_exception_at','last_reconnect_at','reconnect_attempts','first_stale_at','last_recovered_at','observed_at'];
protected $casts = ['tcp_reachable'=>'boolean','last_pdc_at'=>'datetime','last_tcp_probe_at'=>'datetime','last_sdk_exception_at'=>'datetime','last_reconnect_at'=>'datetime','first_stale_at'=>'datetime','last_recovered_at'=>'datetime','observed_at'=>'datetime'];
public function camera(): BelongsTo { return $this->belongsTo(CameraDevice::class, 'camera_device_id'); }
}