refactor: align codebase with EventCrew domain and trim legacy band stack
- Update API: events, users, policies, routes, resources, migrations - Remove deprecated models/resources (customers, setlists, invitations, etc.) - Refresh admin app and docs; remove apps/band Made-with: Cursor
This commit is contained in:
21
api/app/Models/Scopes/OrganisationScope.php
Normal file
21
api/app/Models/Scopes/OrganisationScope.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Models\Scopes;
|
||||
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Scope;
|
||||
|
||||
final class OrganisationScope implements Scope
|
||||
{
|
||||
public function __construct(
|
||||
private readonly string $organisationId,
|
||||
) {}
|
||||
|
||||
public function apply(Builder $builder, Model $model): void
|
||||
{
|
||||
$builder->where($model->getTable() . '.organisation_id', $this->organisationId);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user