package com.ecep.contract.ds.contract.repository;

import java.util.List;
import java.util.Optional;

import com.ecep.contract.ds.MyRepository;
import org.springframework.stereotype.Repository;

import com.ecep.contract.ds.customer.model.SalesOrder;
import com.ecep.contract.ds.customer.model.SalesOrderItem;

@Repository
public interface SalesOrderItemRepository extends MyRepository<SalesOrderItem, Integer> {

    Optional<SalesOrderItem> findByCode(String code);

    List<SalesOrderItem> findAllByOrder(SalesOrder order);

    List<SalesOrderItem> findByCodeStartsWith(String code);
}
