package de.assecutor.votianlt.pages.domain;

import de.assecutor.votianlt.model.Customer;
import org.bson.types.ObjectId;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Slice;
import org.springframework.data.mongodb.repository.MongoRepository;
import java.util.List;

public interface CustomerRepository extends MongoRepository<Customer, ObjectId> {

    // If you don't need a total row count, Slice is better than Page.
    Slice<Customer> findAllBy(Pageable pageable);

    List<Customer> findByOwner(ObjectId owner);
}
