mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-10-08 13:53:17 +01:00
Models implementing AuditableWithoutOwner intentionally have no audit owner, either because they belong to neither an organization nor a user, or because they and their audits have to be kept when the owner is deleted (for example billing records). Adds helpers and a scope on the audit model to find audits that are missing an owner although they should have one.
15 lines
570 B
PHP
15 lines
570 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Models\Concerns;
|
|
|
|
/**
|
|
* Marks an auditable model whose audits intentionally have no owner (neither an organization nor a user),
|
|
* either because the model belongs to neither of them, or because the model and its audits have to be kept
|
|
* when its organization or user is deleted (for example billing records).
|
|
* Audits of these models are not deleted together with an organization or user,
|
|
* and are not considered as missing an owner (for example by the audit backfill command).
|
|
*/
|
|
interface AuditableWithoutOwner {}
|