title: Meal (Order)
type: object
properties:
  uuid:
    type: string
    format: uuid
    description: The unique identifier.
  source_meal_uuid:
    type:
      - string
      - 'null'
    description: |-
      The UUID of the original (catalog) meal that was used to create this instance.

      For ad-hoc meals, this field will be `null`.
    format: uuid
  name:
    type: string
    minLength: 1
    maxLength: 255
    example: Burger Combo
    description: The name of the meal at the time the order was placed.
  unit_price:
    $ref: ./Money.yaml
    description: 'The value of a single unit of the meal, before the value of modifiers are calculated.'
  modifiers:
    type: array
    description: The modifiers that the customer selected for this meal.
    items:
      $ref: ./OrderModifier.yaml
  sub_total:
    $ref: ./Money.yaml
    description: 'The unit price of the meal, plus the aggregate value of the selected modifiers.'
  total:
    $ref: ./Money.yaml
    description: The total value of the meal (this will be the same as `sub_total`).

description: Represents a meal that has been applied against an order line item.
x-tags:
  - Orders
