feat(projects-bulk): update_days handler with bitmask OR/AND-NOT
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -101,7 +101,14 @@ class ProjectService
|
||||
|
||||
private function bulkUpdateDays($query, array $payload): array
|
||||
{
|
||||
return ['updated' => 0, 'skipped' => [], 'warnings' => []];
|
||||
$add = (int) ($payload['add'] ?? 0);
|
||||
$remove = (int) ($payload['remove'] ?? 0);
|
||||
|
||||
$updated = $query->update([
|
||||
'delivery_days_mask' => \DB::raw("(delivery_days_mask | {$add}) & ~{$remove} & 127"),
|
||||
]);
|
||||
|
||||
return ['updated' => $updated, 'skipped' => [], 'warnings' => []];
|
||||
}
|
||||
|
||||
private function bulkUpdateLimit($query, array $payload): array
|
||||
|
||||
Reference in New Issue
Block a user