mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-14 09:24:03 +00:00
Use a nicer way to bind the current tenant
This commit is contained in:
parent
27425a4360
commit
6b716e5345
6 changed files with 62 additions and 38 deletions
|
|
@ -4,26 +4,12 @@ declare(strict_types=1);
|
|||
|
||||
namespace Stancl\Tenancy\Contracts;
|
||||
|
||||
use Stancl\Tenancy\Tenant;
|
||||
|
||||
interface StorageDriver
|
||||
{
|
||||
public function identifyTenant(string $domain): array;
|
||||
|
||||
/** @return array[] */
|
||||
public function getAllTenants(array $uuids = []): array;
|
||||
|
||||
public function getTenantById(string $uuid, array $fields = []): array;
|
||||
|
||||
public function getTenantIdByDomain(string $domain): ?string;
|
||||
|
||||
public function createTenant(string $domain, string $uuid): array;
|
||||
|
||||
public function deleteTenant(string $uuid): bool;
|
||||
|
||||
public function get(string $uuid, string $key);
|
||||
|
||||
public function getMany(string $uuid, array $keys): array;
|
||||
|
||||
public function put(string $uuid, string $key, $value);
|
||||
|
||||
public function putMany(string $uuid, array $values): array;
|
||||
public function createTenant(Tenant $tenant): bool; // todo return type
|
||||
public function updateTenant(Tenant $tenant): bool; // todo return type
|
||||
public function findById(string $id): Tenant;
|
||||
public function findByDomain(string $domain): Tenant;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue