package com.example.demo.product.repo;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

public interface UnitRepository extends JpaRepository<com.example.demo.product.entity.ProductUnit, Long> {
    @Query("SELECT u FROM ProductUnit u WHERE u.shopId = :shopId AND u.deletedAt IS NULL ORDER BY u.id DESC")
    List<com.example.demo.product.entity.ProductUnit> listByShop(@Param("shopId") Long shopId);
}







