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

Synced resources - proof of concept

This commit is contained in:
Samuel Štancl 2020-05-11 07:32:20 +02:00
parent 86a98b2bc8
commit daae67c0f7
8 changed files with 393 additions and 0 deletions

View file

@ -0,0 +1,14 @@
<?php
namespace Stancl\Tenancy\Contracts;
use Illuminate\Database\Eloquent\Collection;
// todo rename?
/**
* @property-read Tenant[]|Collection $tenants
*/
interface SyncMaster extends Syncable
{
public function tenants(); // Probably should return BelongsToMany
}

View file

@ -0,0 +1,12 @@
<?php
namespace Stancl\Tenancy\Contracts;
// todo add comments
interface Syncable
{
public function getGlobalIdentifierKeyName(): string;
public function getGlobalIdentifierKey(): string;
public function getCentralModelName(): string;
public function getSyncedAttributeNames(): array;
}