# ListProductCategoryChildren

## Overview

ListProductCategoryChildren retrieves the direct child categories of a given product category. Used as a guard check before category deletion to enforce the constraint that only leaf categories (with no children) can be deleted.

## Business Rules

- Searches ProductCategory table for records with parentId matching the given category ID
- Returns all matching child category records as an array
- Returns an empty array if the category has no children (is a leaf category)

## Process Flow

```mermaid
flowchart TD
    A[Receive parentId] --> B[SELECT from ProductCategory where parentId = input]
    B --> C{Children found?}
    C -->|Yes| D[Return child records]
    C -->|No| E[Return empty array]
```

## External Dependencies

- None

## Error Scenarios

None

## Test Cases

- returns children when found
- returns empty array when no children
