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.

10 lines
812 B

2 weeks ago
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class CameraMonitorSetting extends Model
{
2 days ago
protected $fillable = ['timezone','notification_start_time','notification_end_time','default_push_interval_seconds','default_push_timeout_seconds','probe_interval_seconds','probe_failure_threshold','auto_reconnect_max_attempts','send_manual_action_email','send_recovery_email','recipient_emails','repeat_notification_enabled','repeat_notification_interval_hours'];
protected $casts = ['repeat_notification_enabled'=>'boolean','repeat_notification_interval_hours'=>'integer','recipient_emails'=>'array','send_manual_action_email'=>'boolean','send_recovery_email'=>'boolean'];
2 weeks ago
public static function current(): self { return static::query()->firstOrCreate([], ['recipient_emails'=>[]]); }
}