🚀 مُصادَق: تحديث برمجي جديد 2026-05-03 13:39
This commit is contained in:
19
app/Modules/ApiKeys/ApiKeyModel.php
Normal file
19
app/Modules/ApiKeys/ApiKeyModel.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Modules\ApiKeys;
|
||||
|
||||
use App\Models\BaseModel;
|
||||
|
||||
final class ApiKeyModel extends BaseModel
|
||||
{
|
||||
protected string $table = 'api_keys';
|
||||
|
||||
public function findAllByTenant(string $tenantId): array
|
||||
{
|
||||
$stmt = $this->db()->prepare("SELECT id, name, prefix, expires_at, last_used_at, is_active, created_at FROM {$this->table} WHERE tenant_id = ? AND deleted_at IS NULL");
|
||||
$stmt->execute([$tenantId]);
|
||||
return $stmt->fetchAll();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user