Implement compliance exports and retention overrides
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Enums\DataExportScope;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
@@ -21,7 +22,10 @@ class DataExport extends Model
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'tenant_id',
|
||||
'event_id',
|
||||
'status',
|
||||
'scope',
|
||||
'include_media',
|
||||
'path',
|
||||
'size_bytes',
|
||||
'expires_at',
|
||||
@@ -30,6 +34,8 @@ class DataExport extends Model
|
||||
|
||||
protected $casts = [
|
||||
'expires_at' => 'datetime',
|
||||
'include_media' => 'boolean',
|
||||
'scope' => DataExportScope::class,
|
||||
];
|
||||
|
||||
public function user(): BelongsTo
|
||||
@@ -42,6 +48,11 @@ class DataExport extends Model
|
||||
return $this->belongsTo(Tenant::class);
|
||||
}
|
||||
|
||||
public function event(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Event::class);
|
||||
}
|
||||
|
||||
public function isReady(): bool
|
||||
{
|
||||
return $this->status === self::STATUS_READY;
|
||||
|
||||
Reference in New Issue
Block a user