first commit

This commit is contained in:
mstfyldz
2026-06-03 04:11:30 +03:00
parent d369c9e258
commit 7b4b3a85af
20 changed files with 3446 additions and 442 deletions
+1628
View File
File diff suppressed because it is too large Load Diff
+82 -316
View File
@@ -1,8 +1,11 @@
import prisma from '@/lib/prisma'
export type LocalizedString = { tr: string; en: string }
export type MenuItem = {
id: string
emoji?: string
image?: string
name: LocalizedString
description?: LocalizedString
price?: number
@@ -18,319 +21,82 @@ export type Category = {
export const WHATSAPP_NUMBER = '905XXXXXXXXXX'
export const categories: Category[] = [
{
id: 'kahvaltiliklar',
emoji: '🍳',
label: { tr: 'Kahvaltılıklar', en: 'Breakfasts' },
items: [
{ id: 'k1', name: { tr: 'Sucuklu Yumurta', en: 'Eggs with Sucuk' }, description: { tr: 'Kaşar peynirli, çıtır domates', en: 'Kaşar cheese, crispy tomato' } },
{ id: 'k2', name: { tr: 'Menemen', en: 'Menemen' }, description: { tr: 'Domates, yeşil biber, 2 yumurta', en: 'Tomato, green pepper, 2 eggs' } },
{ id: 'k3', name: { tr: 'Kaşarlı Menemen', en: 'Menemen with Kaşar Cheese' }, description: { tr: 'Rondanın 5 kaşar peyniri, domates, yeşil biber, çeşitli 2 yumurta', en: '5 portions of kaşar cheese, tomato, green pepper, 2 eggs' } },
{ id: 'k4', name: { tr: 'Sade Omlet', en: 'Plain Omelette' }, description: { tr: 'Çeşitme 2 yumurta, mezelemeniz kaşar peyniri', en: '2 eggs, kaşar cheese' } },
{ id: 'k5', name: { tr: 'Mantarlı Omlet', en: 'Mushroom Omelette' }, description: { tr: 'Mantarlarla zenginleştirilmiş kaşar peyniri, çıtır biber, çimento, yeşil biber, satır, mantarı', en: 'Mushrooms, kaşar cheese, crispy peppers' } },
{ id: 'k6', name: { tr: 'Sebzeli Omlet', en: 'Vegetable Omelette' }, description: { tr: 'Mantarlar, zenginleştirilmiş kaşar peyniri, kapıya biber, çimento, yeşil biber ve saman mantarı', en: 'Mushrooms, kaşar cheese, capia pepper, green pepper' } },
{ id: 'k7', name: { tr: 'Vegan Kahvaltı', en: 'Vegan Breakfast' }, description: { tr: 'Avokado, çeşit domatesi, zeytin, tost, roka, havuç', en: 'Avocado, cherry tomato, olives, toast, arugula, carrot' } },
{ id: 'k8', name: { tr: 'Serpme Kahvaltı 2 Kişilik', en: 'Mixed Breakfast - For 2' }, description: { tr: 'Kaşar peyniri, bal & kaymak, siyah zeytin, yeşil zeytin, sürüm, hinse türreyi, çeşit domatesi, erikçimler, tatlıpırçık, havuç, maydanoz ve sonsuz çay', en: 'Kaşar cheese, honey & clotted cream, black & green olives, cherry tomato, jams, carrot, parsley and unlimited tea' } },
],
},
{
id: 'burgerler',
emoji: '🍔',
label: { tr: 'Burgerler', en: 'Burgers' },
items: [
{ id: 'b1', name: { tr: 'Kids Smash Burger', en: 'Kids Smash Burger' }, description: { tr: 'Kids Smash burger, cheddar peyniri, çıtır patates, kızartılmış turşu, domates, marul, burger sosu, patates cipsi', en: 'Kids Smash burger, cheddar cheese, crispy fries, fried pickles, tomato, lettuce, burger sauce, potato chips' } },
{ id: 'b2', name: { tr: 'Dana Smash Burger', en: 'Beef Smash Burger' }, description: { tr: 'Dana Smash burger, cheddar peyniri, karamelize soğan, turşu, domates, marul, burger sosu, patates cipsi', en: 'Beef Smash burger, cheddar cheese, caramelized onions, pickles, tomato, lettuce, burger sauce, potato chips' } },
{ id: 'b3', name: { tr: 'Dana Smash Big Burger', en: 'Beef Smash Big Burger' }, description: { tr: 'Dana Smash burger smash kafası, cheddar peyniri, karamelize soğan, çıtır patates, kızartılmış turşu, domates, marul, burger sosu, patates cipsi', en: 'Beef Smash big burger, cheddar cheese, caramelized onions, crispy fries, fried pickles, tomato, lettuce, burger sauce, potato chips' } },
{ id: 'b4', name: { tr: 'Çıtır Tavuk Burger', en: 'Crispy Chicken Burger' }, description: { tr: 'Çıtır Tavuk Burger harika cheddar peyniri, burger sos, patates cipsi', en: 'Crispy Chicken Burger, cheddar cheese, burger sauce, potato chips' } },
],
},
{
id: 'tatlilar',
emoji: '🍮',
label: { tr: 'Tatlılar', en: 'Desserts' },
items: [
{ id: 't1', name: { tr: 'Meşhur Akyaka Tatlısı', en: 'Famous Akyaka Dessert' }, description: { tr: 'Deniz tuzlu, bürüme, bitter çikolata, Gökova sütlemi', en: 'Sea salt, bitter chocolate, Gökova milk' } },
{ id: 't2', name: { tr: 'Fırın Helva', en: 'Baked Halva' } },
],
},
{
id: 'tostlar',
emoji: '🥪',
label: { tr: 'Tostlar', en: 'Toasts' },
items: [
{ id: 'ts1', name: { tr: 'Peynirli Tost', en: 'Cheese Toast' }, description: { tr: 'Kaşar peyniri, çeşit domatesi, zeytin, patates cipsi', en: 'Kaşar cheese, cherry tomato, olives, potato chips' } },
{ id: 'ts2', name: { tr: 'Sucuklu Tost', en: 'Sucuk Toast' }, description: { tr: 'Kaşar sucuklu, çeşit domatesi, zeytin, patates cipsi', en: 'Sucuk, kaşar cheese, cherry tomato, olives, potato chips' } },
{ id: 'ts3', name: { tr: 'Akdeniz Tost', en: 'Mediterranean Toast' }, description: { tr: 'Kaşar pul, Ezine peyniri, tulum peyniri, kaşar domates, çeşit domatesi, zeytin, patates cipsi', en: 'Ezine cheese, tulum cheese, kaşar cheese, cherry tomato, olives, potato chips' } },
{ id: 'ts4', name: { tr: 'Karışık Tost', en: 'Mixed Toast' }, description: { tr: 'Kaşar sucuklu, kaşar peyniri, peri domates, zeytin, salatalık, dilimlen', en: 'Sucuk, kaşar cheese, cherry tomato, olives, cucumber slices' } },
{ id: 'ts5', name: { tr: 'Ayvalık Tostu', en: 'Ayvalik Toast' }, description: { tr: 'Ekşi, karamize turşu, kırmızı bilet kaşar peyniri, çeşit domatesi, salatalık, dilimlen', en: 'Sourdough bread, caramelized pickles, red pepper kaşar cheese, cherry tomato, cucumber slices' } },
],
},
{
id: 'salatalar',
emoji: '🥗',
label: { tr: 'Salatalar', en: 'Salads' },
items: [
{ id: 'sl1', name: { tr: 'Çoban Salata', en: "Shepherd's Salad" } },
{ id: 'sl2', name: { tr: 'Roka Salatası', en: 'Arugula Salad' }, description: { tr: 'Domates, zenginleştirilmiş üzüme bol peyniri', en: 'Tomato, grapes, cheese' } },
{ id: 'sl3', name: { tr: 'Yaz Salatası', en: 'Summer Salad' }, description: { tr: 'Kaşar ve her, taze domates, kırmızı soğan, beyaz peynir, fasulye, çeşitli yeşil besinleri, dalya üzümleri, çeşit domatesi', en: 'Fresh tomato, red onion, white cheese, beans, mixed greens, grapes, cherry tomato' } },
{ id: 'sl4', name: { tr: 'Avokado Salatası', en: 'Avocado Salad' }, description: { tr: 'Avokado, çeşit domatesi, salatalık, yeşil zeytin', en: 'Avocado, cherry tomato, cucumber, green olives' } },
{ id: 'sl5', name: { tr: 'Ton Balıklı Kinoalı Salata', en: 'Tuna & Quinoa Salad' }, description: { tr: 'Siyah kinoa, ton balığı, maydanoz, çeşit domatesi, salatalık, dilimlen', en: 'Black quinoa, tuna fish, parsley, cherry tomato, cucumber slices' } },
],
},
{
id: 'pizzalar',
emoji: '🍕',
label: { tr: 'Pizzalar', en: 'Pizzas' },
items: [
{ id: 'pz1', name: { tr: 'Margherita Pizza', en: 'Margherita Pizza' }, description: { tr: 'Pizza sosu, mozzarella peyniri, fesleğen, zeytin makul', en: 'Pizza sauce, mozzarella cheese, basil, olives' } },
{ id: 'pz2', name: { tr: 'Akdeniz Pizza', en: 'Mediterranean Pizza' }, description: { tr: 'Kaşar peyniri, yeşil biber, mantar, fesleğen, mozzarella peyniri, piliç sosu', en: 'Kaşar cheese, green pepper, mushroom, basil, mozzarella cheese' } },
{ id: 'pz3', name: { tr: 'Sucuk Pizza', en: 'Sucuk Pizza' }, description: { tr: 'Yeşil biber, domates biber, mantar, kaşar', en: 'Green pepper, tomato, pepper, mushroom, kaşar' } },
{ id: 'pz4', name: { tr: 'Enginar lı Pizza', en: 'Artichoke Pizza' }, description: { tr: 'Belirli peşik, fesleğen, mozzarella peyniri, domates sosu', en: 'Artichoke, basil, mozzarella cheese, tomato sauce' } },
],
},
{
id: 'wraps',
emoji: '🌯',
label: { tr: 'Wraps', en: 'Wraps' },
items: [
{ id: 'w1', name: { tr: 'Sebzeli Wrap', en: 'Veggie Wrap' }, description: { tr: 'Mantar, toflu peynirli, turşu, soğan, samon biber, yeşil biber, kaşar biber', en: 'Mushroom, tofu cheese, pickles, onions, yellow pepper, green pepper, red pepper' } },
{ id: 'w2', name: { tr: 'Tavuklu Wrap', en: 'Chicken Wrap' }, description: { tr: 'Salatalık doğası, turşu soğan, kısma biber, marul, kon türfü turşu', en: 'Cucumber, pickled onions, red pepper, lettuce, pickles' } },
],
},
{
id: 'mantilar',
emoji: '🥟',
label: { tr: 'Mantılar', en: 'Manti & Ravioli' },
items: [
{ id: 'mt1', name: { tr: 'Ev Yapımı Mantı', en: 'Homemade Manti' }, description: { tr: 'Yoğurt ve sas eşliğince', en: 'Served with yogurt and sauce' } },
{ id: 'mt2', name: { tr: 'Cevizli Mantı', en: 'Walnut Manti' }, description: { tr: 'Yoğurt ve sas eşliğince', en: 'Served with yogurt and sauce' } },
{ id: 'mt3', name: { tr: 'Akdeniz Mantısı', en: 'Mediterranean Manti' }, description: { tr: 'Fesleğen, maydanoz, cziz, yoğurtlu sos', en: 'Basil, parsley, walnuts, yogurt sauce' } },
],
},
{
id: 'makarnalar',
emoji: '🍝',
label: { tr: 'Makarnalar', en: 'Pastas' },
items: [
{ id: 'mk1', name: { tr: 'Penne Arrabbiata', en: 'Penne Arrabbiata' } },
{ id: 'mk2', name: { tr: 'Spaghetti al Pesto', en: 'Spaghetti al Pesto' } },
{ id: 'mk3', name: { tr: 'Fettuccine Alfredo', en: 'Fettuccine Alfredo' } },
{ id: 'mk4', name: { tr: 'Spagetti Bolonez', en: 'Spaghetti Bolognese' } },
],
},
{
id: 'ana-yemekler',
emoji: '🍗',
label: { tr: 'Ana Yemekler', en: 'Main Courses' },
items: [
{ id: 'ay1', name: { tr: 'Tavuk Izgara', en: 'Grilled Chicken' }, description: { tr: 'Tavuk göğsü, karamelize yeşil biber, soğan, yeşillik, domatesli cipsi', en: 'Chicken breast, caramelized green pepper, onions, greens, potato chips' } },
{ id: 'ay2', name: { tr: 'Tavuk Pirzola', en: 'Chicken Chops' }, description: { tr: 'Kalemime yeşil biber, soğan, yeşil fık, patates cipsi', en: 'Green pepper, onions, greens, potato chips' } },
{ id: 'ay3', name: { tr: 'Köfte', en: 'Meatballs' }, description: { tr: 'Maydanoz, yeşil biber, soğan, yeşillik, patlıcan cipsi', en: 'Parsley, green pepper, onions, greens, eggplant chips' } },
{ id: 'ay4', name: { tr: 'Karışık Izgara', en: 'Mixed Grill' }, description: { tr: 'Köfte, tavuk göğsü, kısık pırzola. Kalemima yeşil biber, soğan, yeşillik, patlıcan cipsi', en: 'Meatballs, chicken breast, chicken chops. Green pepper, onions, greens, eggplant chips' } },
{ id: 'ay5', name: { tr: 'Sac Kavurma 2 Kişilik', en: 'Sac Kavurma - For 2' }, description: { tr: 'Mevsim salatası ve patates cipsi eşliğinde', en: 'Served with seasonal salad and potato chips' } },
{ id: 'ay6', name: { tr: 'Günlük Balık Çeşitleri', en: 'Daily Fish Catch' } },
],
},
{
id: 'atistirmaliklar',
emoji: '🍟',
label: { tr: 'Atıştırmalıklar', en: 'Snacks' },
items: [
{ id: 'at1', name: { tr: 'Patates Cipsi', en: 'Potato Chips' } },
{ id: 'at2', name: { tr: 'Çıtır Tavuk', en: 'Crispy Chicken' }, description: { tr: 'Çıtır tavuk ve patates cipsi', en: 'Crispy chicken and potato chips' } },
{ id: 'at3', name: { tr: 'Peynir Tabağı', en: 'Cheese Platter' }, description: { tr: 'Ezine peyniri, tulum peyniri, ham, haşar, çeşit kaşar, kuru domates', en: 'Ezine cheese, tulum cheese, kaşar cheese, dried tomatoes' } },
{ id: 'at4', name: { tr: 'Bira Tabağı', en: 'Beer Platter' }, description: { tr: 'Roka & patates cipsi, çıtır tavuk, çeşit kaşar', en: 'Arugula & potato chips, crispy chicken, cheese varieties' } },
{ id: 'at5', name: { tr: 'Deniz Tabağı', en: 'Seafood Platter' }, description: { tr: 'Halk kalamar, çıtır karides, roka', en: 'Calamari rings, crispy shrimp, arugula' } },
],
},
{
id: 'sicak-icecekler',
emoji: '☕',
label: { tr: 'Sıcak İçecekler & Kahveler', en: 'Hot Drinks & Coffees' },
items: [
{ id: 'si1', name: { tr: 'Çay', en: 'Tea' } },
{ id: 'si2', name: { tr: 'Türk Kahvesi', en: 'Turkish Coffee' } },
{ id: 'si3', name: { tr: 'Duble Türk Kahvesi', en: 'Double Turkish Coffee' } },
{ id: 'si4', name: { tr: 'Filtre Kahve', en: 'Filter Coffee' } },
{ id: 'si5', name: { tr: 'Espresso', en: 'Espresso' } },
{ id: 'si6', name: { tr: 'Americano', en: 'Americano' } },
{ id: 'si7', name: { tr: 'Latte', en: 'Latte' } },
{ id: 'si8', name: { tr: 'Cappuccino', en: 'Cappuccino' } },
],
},
{
id: 'soguk-icecekler',
emoji: '🥤',
label: { tr: 'Soğuk İçecekler', en: 'Cold Drinks' },
items: [
{ id: 'so1', name: { tr: 'Su', en: 'Water' } },
{ id: 'so2', name: { tr: 'Soda', en: 'Sparkling Water' } },
{ id: 'so3', name: { tr: 'Meyveli Soda', en: 'Fruit Sparkling Water' } },
{ id: 'so4', name: { tr: 'Ayran', en: 'Ayran' } },
{ id: 'so5', name: { tr: 'Limonata', en: 'Lemonade' } },
{ id: 'so6', name: { tr: 'Churchill', en: 'Churchill' } },
{ id: 'so7', name: { tr: 'Coca-Cola / Fanta / Sprite', en: 'Coca-Cola / Fanta / Sprite' } },
{ id: 'so8', name: { tr: 'Ice Tea', en: 'Ice Tea' } },
{ id: 'so9', name: { tr: 'Red Bull', en: 'Red Bull' } },
{ id: 'so10', name: { tr: 'Vişne Suyu', en: 'Cherry Juice' } },
{ id: 'so11', name: { tr: 'Portakal Suyu', en: 'Orange Juice' } },
{ id: 'so12', name: { tr: 'Nar Suyu', en: 'Pomegranate Juice' } },
],
},
{
id: 'soguk-kahveler',
emoji: '🧋',
label: { tr: 'Soğuk Kahveler', en: 'Cold Coffees' },
items: [
{ id: 'sk1', name: { tr: 'Iced Americano', en: 'Iced Americano' } },
{ id: 'sk2', name: { tr: 'Iced Latte', en: 'Iced Latte' } },
{ id: 'sk3', name: { tr: 'Iced Mocha', en: 'Iced Mocha' } },
],
},
{
id: 'frozen',
emoji: '🧊',
label: { tr: 'Frozen', en: 'Frozen' },
items: [
{ id: 'fz1', name: { tr: 'Çilek', en: 'Strawberry' } },
{ id: 'fz2', name: { tr: 'Mango', en: 'Mango' } },
{ id: 'fz3', name: { tr: 'Orman Meyvesi', en: 'Forest Fruits' } },
],
},
{
id: 'milkshakes',
emoji: '🥛',
label: { tr: 'Milkshakes', en: 'Milkshakes' },
items: [
{ id: 'ms1', name: { tr: 'Muz', en: 'Banana' } },
{ id: 'ms2', name: { tr: 'Vanilya', en: 'Vanilla' } },
{ id: 'ms3', name: { tr: 'Çilek', en: 'Strawberry' } },
{ id: 'ms4', name: { tr: 'Çikolata', en: 'Chocolate' } },
{ id: 'ms5', name: { tr: 'Mango', en: 'Mango' } },
{ id: 'ms6', name: { tr: 'Orman Meyvesi', en: 'Forest Fruits' } },
{ id: 'ms7', name: { tr: 'Espresso', en: 'Espresso' } },
],
},
{
id: 'refreshers',
emoji: '🌿',
label: { tr: 'Refreshers', en: 'Refreshers' },
items: [
{ id: 'rf1', name: { tr: 'Limonata', en: 'Lemonade' } },
{ id: 'rf2', name: { tr: 'Nar Suyu', en: 'Pomegranate Juice' } },
{ id: 'rf3', name: { tr: 'Portakal Suyu', en: 'Orange Juice' } },
{ id: 'rf4', name: { tr: 'Cool Lime', en: 'Cool Lime' } },
{ id: 'rf5', name: { tr: 'Rooibos Peach', en: 'Rooibos Peach' } },
],
},
{
id: 'biralar',
emoji: '🍺',
label: { tr: 'Biralar', en: 'Beers' },
items: [
{ id: 'br1', name: { tr: 'Tuborg Gold', en: 'Tuborg Gold' }, description: { tr: '50 cl', en: '50 cl' } },
{ id: 'br2', name: { tr: 'Tuborg Filtresiz', en: 'Tuborg Unfiltered' }, description: { tr: '50 cl', en: '50 cl' } },
{ id: 'br3', name: { tr: 'Tuborg Amber', en: 'Tuborg Amber' }, description: { tr: '50 cl', en: '50 cl' } },
{ id: 'br4', name: { tr: 'Carlsberg', en: 'Carlsberg' }, description: { tr: '50 cl', en: '50 cl' } },
{ id: 'br5', name: { tr: 'Efes Malt', en: 'Efes Malt' }, description: { tr: '50 cl', en: '50 cl' } },
{ id: 'br6', name: { tr: 'Efes Green', en: 'Efes Green' }, description: { tr: '50 cl', en: '50 cl' } },
{ id: 'br7', name: { tr: 'Stella Artois', en: 'Stella Artois' }, description: { tr: '44 cl', en: '44 cl' } },
{ id: 'br8', name: { tr: "Beck's", en: "Beck's" }, description: { tr: '33 cl', en: '33 cl' } },
{ id: 'br9', name: { tr: 'Bud', en: 'Bud' }, description: { tr: '33 cl', en: '33 cl' } },
],
},
{
id: 'saraplar',
emoji: '🍷',
label: { tr: 'Şaraplar', en: 'Wines' },
items: [
{ id: 'sr1', name: { tr: 'Beyaz Kadeh', en: 'White Glass' } },
{ id: 'sr2', name: { tr: 'Rosé Kadeh', en: 'Rosé Glass' } },
{ id: 'sr3', name: { tr: 'Kırmızı Kadeh', en: 'Red Glass' } },
{ id: 'sr4', name: { tr: 'Sevilen Colombard Semillon Beyaz Şişe', en: 'Sevilen Colombard Semillon White Bottle' } },
{ id: 'sr5', name: { tr: 'Sevilen Letter R Blush Şişe', en: 'Sevilen Letter R Blush Bottle' } },
{ id: 'sr6', name: { tr: 'Sevilen Parsel II Kırmızı Şişe', en: 'Sevilen Parsel II Red Bottle' } },
],
},
{
id: 'alkolsuz-kokteyller',
emoji: '🧃',
label: { tr: 'Alkolsüz Kokteyller', en: 'Mocktails' },
items: [
{ id: 'ak1', name: { tr: 'Golden Jüpiter', en: 'Golden Jupiter' }, description: { tr: 'Red Bull Peach Edition, fesleğen, portakal suyu, limon', en: 'Red Bull Peach Edition, basil, orange juice, lemon' } },
{ id: 'ak2', name: { tr: 'Venus Wave', en: 'Venus Wave' }, description: { tr: 'Red Bull White Edition, ananas suyu, lime', en: 'Red Bull White Edition, pineapple juice, lime' } },
{ id: 'ak3', name: { tr: 'Kozmos Twist', en: 'Kozmos Twist' }, description: { tr: 'Red Bull White Edition, portakal, lime, soda', en: 'Red Bull White Edition, orange, lime, sparkling water' } },
],
},
{
id: 'house-kokteyller',
emoji: '🍹',
label: { tr: 'House Kokteyller', en: 'House Cocktails' },
items: [
{ id: 'hk1', name: { tr: 'Grass', en: 'Grass' }, description: { tr: 'Gin, yeşil erik, buzlu turşu, limon suyu, greyfurt, portakal', en: 'Gin, green plum, ice pickle, lemon juice, grapefruit, orange' } },
{ id: 'hk2', name: { tr: 'Strawberry Hibiscus', en: 'Strawberry Hibiscus' }, description: { tr: 'Hibiscus çayı, greyfurt, Cointreau, Casemigos teklila', en: 'Hibiscus tea, grapefruit, Cointreau, Casamigos tequila' } },
{ id: 'hk3', name: { tr: 'Satsuma', en: 'Satsuma' }, description: { tr: 'Satsuma, greyfurt, portakal, votka', en: 'Satsuma, grapefruit, orange, vodka' } },
{ id: 'hk4', name: { tr: 'Chili Mango', en: 'Chili Mango' }, description: { tr: 'Mango, Antrout taberi, turunç, kamişeri', en: 'Mango, chili pepper, citrus' } },
{ id: 'hk5', name: { tr: 'Black Mulberry', en: 'Black Mulberry' }, description: { tr: 'Karadut, lime, sweet & sour, votka', en: 'Black mulberry, lime, sweet & sour, vodka' } },
{ id: 'hk6', name: { tr: 'Lunar Bloom', en: 'Lunar Bloom' }, description: { tr: 'Beyaz çay, şeftali, beyaz şarap', en: 'White tea, peach, white wine' } },
{ id: 'hk7', name: { tr: 'White Peach', en: 'White Peach' }, description: { tr: 'Beyaz çay, şeftali, rom', en: 'White tea, peach, rum' } },
{ id: 'hk8', name: { tr: 'Kozmos', en: 'Kozmos' }, description: { tr: 'Cinzano, sweet & sour, ananas suyu, limon suyu, Kozmos mavi', en: 'Cinzano, sweet & sour, pineapple juice, lemon juice, Kozmos blue' } },
],
},
{
id: 'raki',
emoji: '🥃',
label: { tr: 'Rakı', en: 'Raki' },
items: [
{ id: 'rk1', name: { tr: 'Lokal Rakı Tek', en: 'Local Raki Single' } },
{ id: 'rk2', name: { tr: 'Lokal Rakı Duble', en: 'Local Raki Double' } },
{ id: 'rk3', name: { tr: 'Yeni Rakı Özel Seri', en: 'Yeni Raki Special Series' }, description: { tr: '35 cl', en: '35 cl' } },
{ id: 'rk4', name: { tr: 'Yeni Rakı Özel Seri', en: 'Yeni Raki Special Series' }, description: { tr: '50 cl', en: '50 cl' } },
{ id: 'rk5', name: { tr: 'Yeni Rakı Özel Seri', en: 'Yeni Raki Special Series' }, description: { tr: '70 cl', en: '70 cl' } },
{ id: 'rk6', name: { tr: 'Beylerbeyi Göbek', en: 'Beylerbeyi Gobek' }, description: { tr: '35 cl', en: '35 cl' } },
{ id: 'rk7', name: { tr: 'Beylerbeyi Göbek', en: 'Beylerbeyi Gobek' }, description: { tr: '50 cl', en: '50 cl' } },
{ id: 'rk8', name: { tr: 'Beylerbeyi Göbek', en: 'Beylerbeyi Gobek' }, description: { tr: '70 cl', en: '70 cl' } },
],
},
{
id: 'klasik-kokteyller',
emoji: '🍸',
label: { tr: 'Klasik Kokteyller', en: 'Classic Cocktails' },
items: [
{ id: 'kk1', name: { tr: 'Espresso Martini', en: 'Espresso Martini' } },
{ id: 'kk2', name: { tr: 'Mojito', en: 'Mojito' } },
{ id: 'kk3', name: { tr: 'Margarita', en: 'Margarita' } },
{ id: 'kk4', name: { tr: 'Aperol Spritz', en: 'Aperol Spritz' } },
{ id: 'kk5', name: { tr: 'Lynchburg Lemonade', en: 'Lynchburg Lemonade' } },
{ id: 'kk6', name: { tr: 'Whiskey Sour', en: 'Whiskey Sour' } },
{ id: 'kk7', name: { tr: 'Long Island Iced Tea', en: 'Long Island Iced Tea' } },
{ id: 'kk8', name: { tr: 'Negroni', en: 'Negroni' } },
],
},
{
id: 'shots',
emoji: '🥃',
label: { tr: 'Shots', en: 'Shots' },
items: [
{ id: 'sh1', name: { tr: 'Olmeca Gold', en: 'Olmeca Gold' } },
{ id: 'sh2', name: { tr: 'Olmeca Silver', en: 'Olmeca Silver' } },
{ id: 'sh3', name: { tr: 'Olmeca Dark Chocolate', en: 'Olmeca Dark Chocolate' } },
{ id: 'sh4', name: { tr: 'Aperol Spritz', en: 'Aperol Spritz' } },
{ id: 'sh5', name: { tr: 'Lynchburg Lemonade', en: 'Lynchburg Lemonade' } },
{ id: 'sh6', name: { tr: 'Whiskey Sour', en: 'Whiskey Sour' } },
],
},
{
id: 'spirits',
emoji: '🫙',
label: { tr: 'Spirits', en: 'Spirits' },
items: [
{ id: 'sp1', name: { tr: 'Absolut Vodka', en: 'Absolut Vodka' } },
{ id: 'sp2', name: { tr: 'Absolut Vanilla', en: 'Absolut Vanilla' } },
{ id: 'sp3', name: { tr: 'Beefeater Gin', en: 'Beefeater Gin' } },
{ id: 'sp4', name: { tr: 'Beefeater Pink', en: 'Beefeater Pink' } },
{ id: 'sp5', name: { tr: 'Beefeater Blood Orange', en: 'Beefeater Blood Orange' } },
],
},
]
export async function getCategories(): Promise<Category[]> {
try {
const categories = await prisma.category.findMany({
orderBy: { order: 'asc' },
include: {
items: {
orderBy: { order: 'asc' },
},
},
})
return categories.map((c) => ({
id: c.id,
emoji: c.emoji,
label: { tr: c.labelTr, en: c.labelEn },
items: c.items.map((i) => ({
id: i.id,
emoji: i.emoji || undefined,
image: i.image || undefined,
name: { tr: i.nameTr, en: i.nameEn },
description:
i.descriptionTr && i.descriptionEn
? { tr: i.descriptionTr, en: i.descriptionEn }
: undefined,
price: i.price !== null ? i.price : undefined,
highlight: i.highlight,
})),
}))
} catch (error) {
console.error('Error reading from database:', error)
return []
}
}
export async function saveCategories(categories: Category[]): Promise<void> {
try {
await prisma.$transaction(async (tx) => {
// 1. Delete all existing records (mimics overwriting the JSON file)
await tx.menuItem.deleteMany()
await tx.category.deleteMany()
// 2. Insert new records
for (let cIndex = 0; cIndex < categories.length; cIndex++) {
const c = categories[cIndex]
await tx.category.create({
data: {
id: c.id,
emoji: c.emoji,
labelTr: c.label.tr,
labelEn: c.label.en || c.label.tr,
order: cIndex,
},
})
for (let iIndex = 0; iIndex < c.items.length; iIndex++) {
const i = c.items[iIndex]
await tx.menuItem.create({
data: {
id: i.id,
categoryId: c.id,
emoji: i.emoji || null,
image: i.image || null,
nameTr: i.name.tr,
nameEn: i.name.en || i.name.tr,
descriptionTr: i.description?.tr || null,
descriptionEn: i.description?.en || null,
price: i.price ?? null,
highlight: i.highlight ?? false,
order: iIndex,
},
})
}
}
})
} catch (error) {
console.error('Error saving to database:', error)
throw new Error('Failed to save menu data to database')
}
}