You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
SmartGymManagementSystem/MaintenanceRecordRepository...

16 lines
583 B

package com.gym.repository;
import com.gym.model.MaintenanceRecord;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
public interface MaintenanceRecordRepository extends JpaRepository<MaintenanceRecord, Long> {
List<MaintenanceRecord> findByEquipmentIdOrderByMaintenanceDateDesc(Long equipmentId);
List<MaintenanceRecord> findByEquipmentIdAndStatusOrderByMaintenanceDateDesc(Long equipmentId, String status);
Long countByEquipmentId(Long equipmentId);
}