菜单实体

Menu 实体用于定义菜单项、优惠和菜单部分等属性。

定义 Menu 实体时,请使用 Menu 类型。

菜单实体关系图
图 1:菜单实体,显示其与 MenuSection、Availability、MenuItem、MenuItemOption 和 MenuItemOffer 的关系。

使用 MenuSectionMenuItem 对象整理为逻辑类别。对于拥有多个菜单的餐厅,这种方法非常有用。例如,某家餐厅可能有不同的早餐、午餐和晚餐菜单。每个菜单都可以作为单独的 MenuSection 添加。

每个菜单项都可以包含说明、图片、附加项和营养信息。优惠用于为菜单项定价、指定菜单项的供应时间,以及指定特价的有效时间。Menu 实体中的数据预计会随每次数据 Feed 上传而发生变化和刷新。

以下示例定义了一个包含两个不同菜单部分的基本 Menu 实体。

{
  "@type":"Menu",
  "@id":"menu_1"
}
{
  "@type":"MenuSection",
  "@id":"menu_1_pizza",
  "menuId":{
    "@id":"menu_1",
    "displayOrder":1
  },
  "name":"Pizza"
}
{
  "@type":"MenuItem",
  "@id":"menu_1_pizza_cheese",
  "name":"Cheese Pizza - Large",
  "description":"Four cheese pizza with marinara sauce.",
  "parentMenuSectionId":{
    "@id":"menu_1_pizza",
    "displayOrder":1
  }
}
{
  "@type":"MenuItemOffer",
  "@id":"menu_1_pizza_cheese_offer",
  "sku":"6680306",
  "menuItemId":"menu_1_pizza_cheese",
  "price":20.5,
  "priceCurrency":"USD"
}
{
  "@type":"MenuItem",
  "@id":"menu_1_pizza_pesto",
  "name":"Pesto Primavera Pizza - Large",
  "description":"Pesto with pancetta and freshly sliced tomatoes.",
  "parentMenuSectionId":{
    "@id":"menu_1_pizza",
    "displayOrder":2
  }
}
{
  "@type":"MenuItemOffer",
  "@id":"menu_1_pizza_pesto_offer",
  "sku":"9825028",
  "menuItemId":"menu_1_pizza_pesto",
  "price":23.5,
  "priceCurrency":"USD"
}
{
  "@type":"MenuSection",
  "@id":"menu_1_pasta",
  "menuId":{
    "@id":"menu_1",
    "displayOrder":2
  },
  "name":"Pasta"
}
{
  "@type":"MenuItem",
  "@id":"menu_1_pasta_spag",
  "name":"Spaghetti",
  "description":"With meat sauce and meatballs.",
  "parentMenuSectionId":{
    "@id":"menu_1_pasta",
    "displayOrder":1
  }
}
{
  "@type":"MenuItemOffer",
  "@id":"menu_1_pasta_spag_offer",
  "sku":"6680300",
  "menuItemId":"menu_1_pasta_spag",
  "price":15.75,
  "priceCurrency":"USD"
}
{
  "@type":"MenuItem",
  "@id":"menu_1_pasta_spin_ling",
  "name":"Spinach Linguini",
  "description":"Grilled chicken breast, shiitake mushrooms, fresh Roma tomato,
    garlic, and fresh herbs.",
  "parentMenuSectionId":{
    "@id":"menu_1_pasta",
    "displayOrder":2
  }
}
{
  "@type":"MenuItemOffer",
  "@id":"menu_1_pasta_spin_ling_offer",
  "sku":"6680312",
  "menuItemId":"menu_1_pasta_spin_ling",
  "price":15.75,
  "priceCurrency":"USD"
}