Last active
November 11, 2019 08:42
-
-
Save ciszu/7a72d7b1df5886964e5d2adb3ff460fb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Mozartify\Subscription; | |
interface ReadOpStorage | |
{ | |
public function select(string $model, int $id); | |
public function selectAll($model); | |
public function getActivePackage(int $subscriptionId); | |
} | |
interface WriteOpStorage | |
{ | |
public function createNewTenant(string $tenantName); | |
public function createNewSubscription(int $tenantId); | |
public function addPackage(int $subscriptionId, string $packageType, int $heartbeats); | |
public function addExtraHeartbeats(int $subscriptionId, int $heartbeats); | |
} | |
class PostgreSqlStorage implements WriteOpStorage, ReadOpStorage | |
{ | |
// ... | |
} | |
class ElasticSearchStorage implements ReadOpStorage | |
{ | |
// ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment