Skip to content

Commit

Permalink
feat: Added excluded columns to various models
Browse files Browse the repository at this point in the history
  • Loading branch information
lewislarsen committed Sep 2, 2024
1 parent 9bcbf3b commit 6862d07
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 0 deletions.
11 changes: 11 additions & 0 deletions app/Models/BackupDestination.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,17 @@ class BackupDestination extends Model

protected $guarded = [];

/**
* Define the model values that shouldn't be audited.
*
* @var string[]
*/
protected array $excludedFromAuditing = [
'status',
'created_at',
'updated_at',
];

/**
* Get the user that owns the backup destination.
*
Expand Down
11 changes: 11 additions & 0 deletions app/Models/BackupTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,17 @@ class BackupTask extends Model

protected $guarded = [];

/**
* Define the model values that shouldn't be audited.
*
* @var string[]
*/
protected array $excludedFromAuditing = [
'status',
'created_at',
'updated_at',
];

/**
* Get the count of tasks per month for the last six months for a given user.
*
Expand Down
11 changes: 11 additions & 0 deletions app/Models/RemoteServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,17 @@ class RemoteServer extends Model
*/
public $guarded = [];

/**
* Define the model values that shouldn't be audited.
*
* @var string[]
*/
protected array $excludedFromAuditing = [
'connectivity_status',
'created_at',
'updated_at',
];

/**
* Get the user that owns the remote server.
*
Expand Down
12 changes: 12 additions & 0 deletions app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,18 @@ class User extends Authenticatable implements TwoFactorAuthenticatable
'remember_token',
];

/**
* Define the model values that shouldn't be audited.
*
* @var string[]
*/
protected array $excludedFromAuditing = [
'quiet_until',
'last_two_factor_at',
'created_at',
'updated_at',
];

/**
* Get the user's remote servers.
*
Expand Down

0 comments on commit 6862d07

Please sign in to comment.