package com.carmaintenance.repository;

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

import java.util.Optional;

/**
 * 客户Repository
 */
@Repository
public interface CustomerRepository extends JpaRepository<Customer, Integer> {

    Optional<Customer> findByUserId(Integer userId);

    Optional<Customer> findByCustomerNo(String customerNo);
}
