package com.carmaintenance.repository;

import com.carmaintenance.entity.Appointment;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 预约记录Repository
 */
@Repository
public interface AppointmentRepository extends JpaRepository<Appointment, Integer> {

    List<Appointment> findByCustomerId(Integer customerId);

    List<Appointment> findByVehicleId(Integer vehicleId);

    List<Appointment> findByStatus(Appointment.AppointmentStatus status);
}
