mirror of
https://github.com/coollabsio/coolify.git
synced 2026-11-04 10:42:23 +00:00
39 lines
834 B
PHP
39 lines
834 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
/**
|
|
* The copy of one database backup execution in one S3 destination.
|
|
*/
|
|
class DatabaseBackupS3Replica extends Model
|
|
{
|
|
protected $fillable = [
|
|
'execution_id',
|
|
's3_storage_id',
|
|
's3_uploaded',
|
|
's3_storage_deleted',
|
|
'message',
|
|
];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
's3_uploaded' => 'boolean',
|
|
's3_storage_deleted' => 'boolean',
|
|
];
|
|
}
|
|
|
|
public function execution(): BelongsTo
|
|
{
|
|
return $this->belongsTo(ScheduledDatabaseBackupExecution::class, 'execution_id');
|
|
}
|
|
|
|
public function s3(): BelongsTo
|
|
{
|
|
return $this->belongsTo(S3Storage::class, 's3_storage_id');
|
|
}
|
|
}
|