'integer', 'storage_id' => 'integer', 'database_id' => 'integer', 'keep_backups' => 'integer', ]; public static function boot(): void { parent::boot(); static::deleting(function (Backup $backup) { $backup->files()->delete(); }); } public function server(): BelongsTo { return $this->belongsTo(Server::class); } public function storage(): BelongsTo { return $this->belongsTo(StorageProvider::class, 'storage_id'); } public function database(): BelongsTo { return $this->belongsTo(Database::class); } public function files(): HasMany { return $this->hasMany(BackupFile::class, 'backup_id'); } }