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

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

import org.springframework.stereotype.Repository;

import com.ecep.contract.ds.MyRepository;
import com.ecep.contract.model.DeliverySignMethod;
import com.ecep.contract.model.ProjectSaleType;

@Repository
public interface ProductDeliverySignMethodRepository extends MyRepository<DeliverySignMethod, Integer>{

    Optional<DeliverySignMethod> findBySaleTypeAndName(ProjectSaleType saleType, String name);

    Optional<DeliverySignMethod> findBySaleTypeAndCode(ProjectSaleType saleType, String code);

    Optional<DeliverySignMethod> findBySaleTypeAndId(ProjectSaleType saleType, Integer id);

    List<DeliverySignMethod> findAllBySaleTypeId(Integer saleTypeId);
}
