# lunch-item-price-exposure Specification

## Purpose
Defines how the admin lunch menu detail and public lunch item list endpoints expose each lunch item's current `price`, including how unset and zero prices are represented.
## Requirements

### Requirement: Admin menu detail returns item price
`GET /api/v1/admin/lunch-menus/{id}` SHALL return a `price` field on every element of `items[]`, taken from the lunch item's current `price`.

#### Scenario: Menu items show their prices
- **WHEN** a menu contains "Cơm gà" priced 35,000 and "Bún bò" priced 40,000 and an admin opens its detail
- **THEN** `items[]` contains "Cơm gà" with `price: 35000` and "Bún bò" with `price: 40000`

### Requirement: Public item list returns item price
`GET /api/v1/admin/public/lunch-items` SHALL return a `price` field on every item, both with and without `limit` (paginated and plain list).

#### Scenario: Item list without pagination
- **WHEN** an admin calls the endpoint without `limit`
- **THEN** every element of the response array has a `price` field

#### Scenario: Item list with pagination
- **WHEN** an admin calls the endpoint with `limit=20`
- **THEN** every element of `data` has a `price` field

### Requirement: Unset price is null, zero price is zero
On both endpoints, `price` SHALL be a number when the item has a price set, including `0`, and SHALL be `null` when the item's price was never set. The API SHALL NOT replace a null price with `0` or with `default_item_price` in these responses.

#### Scenario: Item with no price set
- **WHEN** an item was created before prices existed and its `price` is null
- **THEN** the endpoints return `price: null` for that item

#### Scenario: Free item
- **WHEN** an item's price is set to 0
- **THEN** the endpoints return `price: 0` for that item
