-- Migration 087 — Room Service: menu items

CREATE TABLE room_service_menu_items (
  id           UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  hotel_id     UUID NOT NULL REFERENCES hotels(id) ON DELETE CASCADE,
  name         TEXT NOT NULL,
  category     TEXT NOT NULL DEFAULT 'Основные',
  price        NUMERIC(10,2) NOT NULL,
  emoji        TEXT NOT NULL DEFAULT '🍽️',
  prep_time_min INTEGER NOT NULL DEFAULT 15,
  is_popular   BOOLEAN NOT NULL DEFAULT false,
  is_stop_list BOOLEAN NOT NULL DEFAULT false,
  is_active    BOOLEAN NOT NULL DEFAULT true,
  sort_order   INTEGER NOT NULL DEFAULT 0,
  created_at   TIMESTAMPTZ NOT NULL DEFAULT NOW()
);

CREATE INDEX ON room_service_menu_items(hotel_id, is_active);
