'boolean', 'include_foundations' => 'boolean', 'days_of_week' => 'array', 'policy_types' => 'array', 'last_run_at' => 'datetime', 'next_run_at' => 'datetime', ]; public function tenant(): BelongsTo { return $this->belongsTo(Tenant::class); } public function runs(): HasMany { return $this->hasMany(BackupScheduleRun::class); } public function operationRuns(): HasMany { return $this->hasMany(OperationRun::class, 'tenant_id', 'tenant_id') ->whereIn('type', [ 'backup_schedule.run_now', 'backup_schedule.retry', 'backup_schedule.scheduled', ]) ->where('context->backup_schedule_id', (int) $this->getKey()); } }