20 lines
445 B
PHP
20 lines
445 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Modules\Subscriptions;
|
|
|
|
use App\Models\BaseModel;
|
|
|
|
final class SubscriptionModel extends BaseModel
|
|
{
|
|
protected string $table = 'subscriptions';
|
|
|
|
public function findByTenantId(string $tenantId): ?array
|
|
{
|
|
$stmt = $this->db()->prepare("SELECT * FROM {$this->table} WHERE tenant_id = ? LIMIT 1");
|
|
$stmt->execute([$tenantId]);
|
|
return $stmt->fetch() ?: null;
|
|
}
|
|
}
|