1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 14:14:03 +00:00

narrow type

This commit is contained in:
Samuel Štancl 2024-12-31 00:30:27 +01:00
parent 872fa414cf
commit 541d7c3a00

View file

@ -7,18 +7,17 @@ namespace Stancl\Tenancy\ResourceSyncing;
use Illuminate\Database\Eloquent\Collection; use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsToMany; use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Stancl\Tenancy\Contracts\Tenant;
use Stancl\Tenancy\Database\Contracts\TenantWithDatabase; use Stancl\Tenancy\Database\Contracts\TenantWithDatabase;
// todo@move move all resource syncing-related things to a separate namespace? // todo@move move all resource syncing-related things to a separate namespace?
/** /**
* @property-read Tenant[]|Collection<Tenant> $tenants * @property-read TenantWithDatabase[]|Collection<TenantWithDatabase> $tenants
*/ */
interface SyncMaster extends Syncable interface SyncMaster extends Syncable
{ {
/** /**
* @return BelongsToMany<Tenant&Model, self&Model> * @return BelongsToMany<TenantWithDatabase&Model, self&Model>
*/ */
public function tenants(): BelongsToMany; public function tenants(): BelongsToMany;