# GetWarehouse

## Overview

GetWarehouse retrieves a single warehouse by id. It returns the full record including current status, storage condition, capacity, and the list of storage locations within the warehouse.

## Business Rules

- Requires `id`
- Returns the full Warehouse record including:
  - Current status (Active, Inactive)
  - `name`, `siteId`, `storageCondition`, `capacity`
  - Associated StorageLocation records
- Returns null if no matching warehouse is found

## Process Flow

```mermaid
flowchart TD
    A[Receive id] --> B[SELECT from Warehouse where id matches]
    B --> C{Warehouse found?}
    C -->|Yes| D[Include associated StorageLocation records]
    D --> E[Return Warehouse record]
    C -->|No| F[Return null]
```

## External Dependencies

- None

## Error Scenarios

- **WAREHOUSE_NOT_FOUND**: No warehouse matches the given id — caller receives null

## Test Cases

- returns warehouse when found
- returns null when not found
- includes associated storage locations
- includes storage condition and capacity
