|
|
@@ -26,7 +26,7 @@ final class ConsumerRepository
|
|
|
{
|
|
|
/** @var array<string, mixed>|false $row */
|
|
|
$row = $this->connection->fetchAssociative(
|
|
|
- 'SELECT id, name, description, policy_id, is_active, created_by_user_id, created_at, last_pulled_at '
|
|
|
+ 'SELECT id, name, description, policy_id, is_active, audit_enabled, created_by_user_id, created_at, last_pulled_at '
|
|
|
. 'FROM consumers WHERE id = :id',
|
|
|
['id' => $id]
|
|
|
);
|
|
|
@@ -38,7 +38,7 @@ final class ConsumerRepository
|
|
|
{
|
|
|
/** @var array<string, mixed>|false $row */
|
|
|
$row = $this->connection->fetchAssociative(
|
|
|
- 'SELECT id, name, description, policy_id, is_active, created_by_user_id, created_at, last_pulled_at '
|
|
|
+ 'SELECT id, name, description, policy_id, is_active, audit_enabled, created_by_user_id, created_at, last_pulled_at '
|
|
|
. 'FROM consumers WHERE name = :name',
|
|
|
['name' => $name]
|
|
|
);
|
|
|
@@ -53,7 +53,7 @@ final class ConsumerRepository
|
|
|
{
|
|
|
/** @var list<array<string, mixed>> $rows */
|
|
|
$rows = $this->connection->fetchAllAssociative(
|
|
|
- 'SELECT id, name, description, policy_id, is_active, created_by_user_id, created_at, last_pulled_at '
|
|
|
+ 'SELECT id, name, description, policy_id, is_active, audit_enabled, created_by_user_id, created_at, last_pulled_at '
|
|
|
. 'FROM consumers ORDER BY id DESC LIMIT :limit OFFSET :offset',
|
|
|
['limit' => $limit, 'offset' => $offset]
|
|
|
);
|
|
|
@@ -73,6 +73,7 @@ final class ConsumerRepository
|
|
|
'description' => $description,
|
|
|
'policy_id' => $policyId,
|
|
|
'is_active' => 1,
|
|
|
+ 'audit_enabled' => 1,
|
|
|
'created_by_user_id' => $createdByUserId,
|
|
|
]);
|
|
|
|
|
|
@@ -121,6 +122,7 @@ final class ConsumerRepository
|
|
|
description: $row['description'] !== null ? (string) $row['description'] : null,
|
|
|
policyId: (int) $row['policy_id'],
|
|
|
isActive: (bool) $row['is_active'],
|
|
|
+ auditEnabled: (bool) ($row['audit_enabled'] ?? true),
|
|
|
createdByUserId: $row['created_by_user_id'] !== null ? (int) $row['created_by_user_id'] : null,
|
|
|
createdAt: $createdAt,
|
|
|
lastPulledAt: $lastPulled,
|