🚀 مُصادَق: تحديث برمجي جديد 2026-05-03 13:19
This commit is contained in:
19
app/Modules/Tenants/TenantModel.php
Normal file
19
app/Modules/Tenants/TenantModel.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Modules\Tenants;
|
||||
|
||||
use App\Models\BaseModel;
|
||||
|
||||
final class TenantModel extends BaseModel
|
||||
{
|
||||
protected string $table = 'tenants';
|
||||
|
||||
public function findByEmail(string $email): ?array
|
||||
{
|
||||
$stmt = $this->db()->prepare("SELECT * FROM {$this->table} WHERE email = ? AND deleted_at IS NULL LIMIT 1");
|
||||
$stmt->execute([$email]);
|
||||
return $stmt->fetch() ?: null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user