Track machine counters and maintenance with counter and time intervals
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
@@ -31,6 +31,17 @@ final readonly class NewNotification
|
||||
return new self($userId, NotificationType::TaskStartsSoon, $params, "task_starts:{$taskId}:{$startsOn}:{$userId}", $at);
|
||||
}
|
||||
|
||||
/**
|
||||
* One notification per maintenance need: the item, its last maintenance
|
||||
* and the level (coming up or late).
|
||||
*
|
||||
* @param array<string, int|string> $params
|
||||
*/
|
||||
public static function maintenanceDue(int $userId, int $itemId, ?int $lastRecordId, string $level, array $params, DateTimeImmutable $at): self
|
||||
{
|
||||
return new self($userId, NotificationType::MaintenanceDue, $params, 'maintenance:'.$itemId.':'.($lastRecordId ?? 'start').':'.$level.':'.$userId, $at);
|
||||
}
|
||||
|
||||
/**
|
||||
* Each assignment is its own notification: one removed and added again
|
||||
* is told again.
|
||||
|
||||
Reference in New Issue
Block a user