package com.yn.bftl.thirdparty.common.repository;

import com.yn.bftl.common.modules.company.entity.Company;
import com.yn.bftl.common.modules.relation.entity.CrmContractItem;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface CrmContractItemRepository extends JpaRepository<CrmContractItem, Long> {

    CrmContractItem findFirstByContractId(String contractId);

    List<CrmContractItem> findAllByCompanyRelationPartyAOrCompanyRelationPartyB(Company partyA, Company partyB);
}
