package org.dalian.ithome.phonenumber;

import java.util.List;

import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.data.rest.core.annotation.RepositoryRestResource;
@RepositoryRestResource(collectionResourceRel = "cars", path = "cars")
public interface CarRepository extends MongoRepository<Car, String> {
	List<Car> findByPlateNumber(@Param("plate") String plate);
	List<Car> findByPhone(@Param("phone")String phone);
	List<Car> findByPlateNumberAndPhone(@Param("plate")String plate, @Param("phone")String phone);
}
