Update backup logic to use activity logs, not audit logs
This commit is contained in:
parent
cbecfff6da
commit
2fc5a734f9
12 changed files with 222 additions and 159 deletions
40
app/Models/ActivityLogSubject.php
Normal file
40
app/Models/ActivityLogSubject.php
Normal file
|
@ -0,0 +1,40 @@
|
|||
<?php
|
||||
|
||||
namespace Pterodactyl\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Relations\Pivot;
|
||||
|
||||
/**
|
||||
* \Pterodactyl\Models\ActivityLogSubject.
|
||||
*
|
||||
* @property int $id
|
||||
* @property int $activity_log_id
|
||||
* @property int $subject_id
|
||||
* @property string $subject_type
|
||||
* @property \Pterodactyl\Models\ActivityLog|null $activityLog
|
||||
* @property \Illuminate\Database\Eloquent\Model|\Eloquent $subject
|
||||
*
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ActivityLogSubject newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ActivityLogSubject newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ActivityLogSubject query()
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class ActivityLogSubject extends Pivot
|
||||
{
|
||||
public $incrementing = true;
|
||||
public $timestamps = false;
|
||||
|
||||
protected $table = 'activity_log_subjects';
|
||||
|
||||
protected $guarded = ['id'];
|
||||
|
||||
public function activityLog()
|
||||
{
|
||||
return $this->belongsTo(ActivityLog::class);
|
||||
}
|
||||
|
||||
public function subject()
|
||||
{
|
||||
return $this->morphTo();
|
||||
}
|
||||
}
|
Reference in a new issue