feat: product search

This commit is contained in:
2024-09-04 14:40:44 +03:00
parent a175201923
commit e5be667690

View File

@@ -120,7 +120,7 @@ class ProductService(BaseService):
stmt.where(
or_(
Product.name.ilike(f'%{search_input}%'),
Product.barcodes.any(ProductBarcode.barcode == search_input),
Product.barcodes.any(ProductBarcode.barcode.ilike(f'%{search_input}%')),
Product.article.ilike(f'%{search_input}%')
)
)