Implemented repository and service for alarms.