Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?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
You can’t perform that action at this time.