| 511 | | # '''ROLE''' (role_id PK, role_name, description) |
| 512 | | # '''APP_USER''' (user_id PK, role_id FK, username, password_hash, first_name, last_name, email, active) |
| 513 | | # '''SESSION''' (token PK, user_id FK, created_at, expires_at) |
| 514 | | # '''SHIFT''' (shift_id PK, user_id FK, start_time, end_time) |
| 515 | | # '''SHIFT_CLOSE''' (shift_id PK, closed_at, closed_by FK, total, order_count) |
| 516 | | # '''RESTAURANT_TABLE''' (table_id PK, table_number, capacity, status) |
| 517 | | # '''CATEGORY''' (category_id PK, name, description, active) |
| 518 | | # '''PRODUCT''' (product_id PK, category_id FK, name, description, price, active, min_stock) |
| 519 | | # '''ORDERS''' (order_id PK, user_id FK, table_id FK, created_at, status) |
| 520 | | # '''ORDER_ITEM''' (order_id PK, item_number PK, product_id FK, quantity, unit_price, status) |
| 521 | | # '''PAYMENT''' (payment_id PK, order_id FK, amount, method, payment_date) |
| 522 | | # '''INVOICE''' (invoice_id PK, payment_id FK, invoice_number, issued_at) |
| 523 | | # '''INGREDIENT''' (ingredient_id PK, name, unit, min_stock, active) |
| 524 | | # '''RECIPE''' (recipe_id PK, product_id FK) |
| 525 | | # '''RECIPE_ITEM''' (recipe_id PK, ingredient_id PK, quantity_needed) |
| 526 | | # '''INVENTORY''' (inventory_id PK, product_id FK, quantity_change, operation_type, created_at) |
| 527 | | # '''INGREDIENT_INVENTORY''' (id PK, ingredient_id FK, quantity_change, operation_type, created_at) |
| 528 | | # '''AUDIT_LOG''' (log_id PK, user_id FK, action, entity_name, created_at) |
| 529 | | # '''APP_SETTINGS''' (id PK, restaurant_name, vat_rate, currency, printer_config) |
| 530 | | # '''SETTINGS''' (id PK, restaurant_name, vat_percent, currency, printer_ip, printer_port) |
| | 511 | * '''ROLE''' (role_id PK, role_name, description) |
| | 512 | * '''APP_USER''' (user_id PK, role_id FK, username, password_hash, first_name, last_name, email, active) |
| | 513 | * '''SESSION''' (token PK, user_id FK, created_at, expires_at) |
| | 514 | * '''SHIFT''' (shift_id PK, user_id FK, start_time, end_time) |
| | 515 | * '''SHIFT_CLOSE''' (shift_id PK, closed_by FK, total, order_count, closed_at) |
| | 516 | * '''RESTAURANT_TABLE''' (table_id PK, table_number, capacity, status) |
| | 517 | * '''CATEGORY''' (category_id PK, name, description, active) |
| | 518 | * '''PRODUCT''' (product_id PK, category_id FK, name, description, price, active, min_stock) |
| | 519 | * '''ORDERS''' (order_id PK, user_id FK, table_id FK, created_at, status) |
| | 520 | * '''ORDER_ITEM''' (order_id PK, item_number PK, product_id FK, quantity, unit_price, status) |
| | 521 | * '''PAYMENT''' (payment_id PK, order_id FK, amount, method, payment_date) |
| | 522 | * '''INVOICE''' (invoice_id PK, payment_id FK, invoice_number, issued_at) |
| | 523 | * '''INGREDIENT''' (ingredient_id PK, name, unit, min_stock, active) |
| | 524 | * '''RECIPE''' (recipe_id PK, product_id FK) |
| | 525 | * '''RECIPE_ITEM''' (recipe_id PK, ingredient_id PK, quantity_needed) |
| | 526 | * '''INVENTORY''' (inventory_id PK, product_id FK, quantity_change, operation_type, created_at) |
| | 527 | * '''INGREDIENT_INVENTORY''' (id PK, ingredient_id FK, quantity_change, operation_type, created_at) |
| | 528 | * '''AUDIT_LOG''' (log_id PK, user_id FK, action, entity_name, created_at) |
| | 529 | * '''APP_SETTINGS''' (id PK, restaurant_name, vat_rate, currency, printer_config) |
| | 530 | * '''SETTINGS''' (id PK, restaurant_name, vat_percent, currency, printer_ip, printer_port) |