mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-16 09:04:05 +00:00
25 lines
642 B
PHP
25 lines
642 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Stancl\Tenancy\Contracts;
|
|
|
|
/**
|
|
* @see \Stancl\Tenancy\Database\Models\Tenant
|
|
*
|
|
* @mixin \Illuminate\Database\Eloquent\Model
|
|
*/
|
|
interface Tenant
|
|
{
|
|
/** Get the name of the key used for identifying the tenant. */
|
|
public function getTenantKeyName(): string;
|
|
|
|
/** Get the value of the key used for identifying the tenant. */
|
|
public function getTenantKey(): int|string;
|
|
|
|
/** Get the value of an internal key. */
|
|
public function getInternal(string $key): mixed;
|
|
|
|
/** Set the value of an internal key. */
|
|
public function setInternal(string $key, mixed $value): static;
|
|
}
|