| import os | |
| import pandas as pd | |
| CUSTOMERS_FILE = "database/customers.xlsx" | |
| MENU_FILE = "database/menu.xlsx" | |
| ORDERS_FILE = "database/orders.xlsx" | |
| def initialize_files(): | |
| if not os.path.exists("database"): | |
| os.makedirs("database") | |
| if not os.path.exists(CUSTOMERS_FILE): | |
| pd.DataFrame(columns=["Name", "Email", "Password"]).to_excel(CUSTOMERS_FILE, index=False) | |
| if not os.path.exists(MENU_FILE): | |
| pd.DataFrame(columns=["Item", "Category", "Price"]).to_excel(MENU_FILE, index=False) | |
| if not os.path.exists(ORDERS_FILE): | |
| pd.DataFrame(columns=["Table", "Customer", "OrderDetails", "TotalAmount"]).to_excel(ORDERS_FILE, index=False) | |