1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-13 23:54:03 +00:00

Bootstrapper tests

This commit is contained in:
Samuel Štancl 2020-05-11 03:37:47 +02:00
parent 73fc525126
commit 6f4b9f486c
20 changed files with 266 additions and 79 deletions

View file

@ -2,8 +2,12 @@
namespace Stancl\Tenancy\Contracts;
/**
* @see \Stancl\Tenancy\Database\Models\Tenant
*/
interface Tenant
{
public function getTenantKeyName(): string;
public function getTenantKey(): string;
public function run(callable $callback);
}

View file

@ -4,8 +4,6 @@ declare(strict_types=1);
namespace Stancl\Tenancy\Contracts;
use Stancl\Tenancy\Tenant;
interface TenantDatabaseManager
{
/**
@ -18,12 +16,12 @@ interface TenantDatabaseManager
/**
* Create a database.
*/
public function createDatabase(Tenant $tenant): bool;
public function createDatabase(TenantWithDatabase $tenant): bool;
/**
* Delete a database.
*/
public function deleteDatabase(Tenant $tenant): bool;
public function deleteDatabase(TenantWithDatabase $tenant): bool;
/**
* Does a database exist.