- 2.x - sites (wip)

- improved ssh error handling
- database soft deletes
This commit is contained in:
Saeed Vaziry
2024-10-04 21:34:07 +02:00
parent ecdba02bc9
commit d1f2add699
64 changed files with 1340 additions and 421 deletions

View File

@ -3,9 +3,11 @@
namespace App\Models;
use App\Enums\DatabaseStatus;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\SoftDeletes;
/**
* @property int $server_id
@ -13,10 +15,12 @@
* @property string $status
* @property Server $server
* @property Backup[] $backups
* @property Carbon $deleted_at
*/
class Database extends AbstractModel
{
use HasFactory;
use SoftDeletes;
protected $fillable = [
'server_id',
@ -41,9 +45,6 @@ public static function boot(): void
$user->save();
}
});
$database->backups()->each(function (Backup $backup) {
$backup->delete();
});
});
}