| @@ -561,8 +561,16 @@ | ||
| 561 | 561 | if (array_key_exists('helpful_count', $data)) { |
| 562 | 562 | $prepared['helpful_count'] = (int) $data['helpful_count']; |
| 563 | 563 | } |
| 564 | 564 | |
| 565 | + // Audit columns — kept optional so legacy callers don't need updating. | |
| 566 | + if (array_key_exists('created_by', $data)) { | |
| 567 | + $prepared['created_by'] = $data['created_by'] ? (int) $data['created_by'] : null; | |
| 568 | + } | |
| 569 | + if (array_key_exists('updated_by', $data)) { | |
| 570 | + $prepared['updated_by'] = $data['updated_by'] ? (int) $data['updated_by'] : null; | |
| 571 | + } | |
| 572 | + | |
| 565 | 573 | return $prepared; |
| 566 | 574 | } |
| 567 | 575 | |
| 568 | 576 | /** |