-- phpMyAdmin SQL Dump
-- version 5.2.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Erstellungszeit: 23. Jul 2024 um 09:38
-- Server-Version: 8.0.33
-- PHP-Version: 8.1.13

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Datenbank: `demo`
--

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `accounting_log`
--

DROP TABLE IF EXISTS `accounting_log`;
CREATE TABLE IF NOT EXISTS `accounting_log` (
  `accl_id` bigint NOT NULL AUTO_INCREMENT,
  `branch_no` int UNSIGNED NOT NULL DEFAULT '0',
  `station_no` int UNSIGNED NOT NULL DEFAULT '0',
  `moncl_no` int UNSIGNED DEFAULT NULL,
  `accl_type` tinyint UNSIGNED DEFAULT NULL,
  `accl_type_no` int UNSIGNED DEFAULT NULL,
  `accl_date` date DEFAULT NULL,
  `accl_time` time DEFAULT NULL,
  `opera_no` smallint UNSIGNED DEFAULT NULL,
  `accl_changed_date` datetime(3) DEFAULT NULL,
  `accl_first_slip_no` bigint UNSIGNED DEFAULT '0',
  `accl_last_slip_no` bigint UNSIGNED DEFAULT '0',
  `accl_accounting_date` date DEFAULT NULL,
  `accl_pdf` longblob,
  `accl_atm_accounting` longtext,
  PRIMARY KEY (`accl_id`),
  KEY `WDIDX16910981920` (`branch_no`),
  KEY `WDIDX16910981921` (`station_no`),
  KEY `WDIDX16910981922` (`moncl_no`),
  KEY `WDIDX16910981923` (`accl_type`),
  KEY `WDIDX16910981924` (`accl_type_no`),
  KEY `WDIDX16910981925` (`accl_date`),
  KEY `WDIDX16910981926` (`accl_time`),
  KEY `WDIDX16910981927` (`opera_no`),
  KEY `WDIDX16910981928` (`accl_changed_date`),
  KEY `WDIDX16910981929` (`accl_last_slip_no`),
  KEY `accl_key_type` (`station_no`,`accl_type`,`accl_type_no`),
  KEY `accl_key_money_counting` (`station_no`,`moncl_no`),
  KEY `accl_key_log` (`station_no`,`accl_type`,`opera_no`,`accl_last_slip_no`),
  KEY `accl_key_branch` (`branch_no`,`station_no`,`accl_type`,`accl_type_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `atm_log`
--

DROP TABLE IF EXISTS `atm_log`;
CREATE TABLE IF NOT EXISTS `atm_log` (
  `atml_id` bigint NOT NULL AUTO_INCREMENT,
  `station_no` int UNSIGNED DEFAULT NULL,
  `salesm_guid` varchar(32) DEFAULT NULL,
  `atml_transaction_log` longtext,
  `atml_termination_due_to_errors` tinyint DEFAULT '0',
  `atml_last_error` longtext,
  `atml_changed_date` datetime(3) DEFAULT NULL,
  `salesm_slip_no` bigint UNSIGNED DEFAULT '0',
  `atml_date_time` datetime(3) DEFAULT NULL,
  `atml_error_log` longtext,
  PRIMARY KEY (`atml_id`),
  KEY `WDIDX169109819210` (`station_no`),
  KEY `WDIDX169109819211` (`salesm_guid`),
  KEY `WDIDX169109819212` (`atml_changed_date`),
  KEY `WDIDX169109819213` (`salesm_slip_no`),
  KEY `WDIDX169109819214` (`atml_date_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `banking_accounts`
--

DROP TABLE IF EXISTS `banking_accounts`;
CREATE TABLE IF NOT EXISTS `banking_accounts` (
  `banka_id` bigint NOT NULL AUTO_INCREMENT,
  `banka_no` int DEFAULT '0',
  `banka_bank_name` varchar(50) DEFAULT '',
  `banka_iban` varchar(50) DEFAULT '',
  `banka_bic_swift` varchar(50) DEFAULT '',
  `banka_account_no` varchar(50) DEFAULT '',
  `banka_bank_code` varchar(50) DEFAULT '',
  `banka_creditor_id` varchar(50) DEFAULT '',
  PRIMARY KEY (`banka_id`),
  UNIQUE KEY `banka_no` (`banka_no`),
  KEY `WDIDX169109819215` (`banka_bank_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `bar_systems`
--

DROP TABLE IF EXISTS `bar_systems`;
CREATE TABLE IF NOT EXISTS `bar_systems` (
  `bars_id` bigint NOT NULL AUTO_INCREMENT,
  `station_no` int UNSIGNED DEFAULT NULL,
  `opera_no` smallint UNSIGNED DEFAULT NULL,
  `bars_date_time` datetime(3) DEFAULT NULL,
  `salesd_line_no` int DEFAULT NULL,
  `bars_last_send` datetime(3) DEFAULT NULL,
  `bars_last_receive` datetime(3) DEFAULT NULL,
  `bars_debit_kredit` tinyint UNSIGNED DEFAULT NULL,
  `bars_ok` tinyint DEFAULT NULL,
  `bars_cancellation` tinyint DEFAULT NULL,
  `bars_send` varchar(40) DEFAULT NULL,
  `bars_receive` varchar(40) DEFAULT NULL,
  `bars_error` tinyint DEFAULT NULL,
  `prod_no` bigint UNSIGNED DEFAULT NULL,
  `bars_quantity` decimal(24,6) DEFAULT '0.000000',
  `salesm_guid` varchar(32) DEFAULT NULL,
  `bars_prod_foreign_no` bigint UNSIGNED DEFAULT NULL,
  `bars_table_no` int UNSIGNED DEFAULT NULL,
  PRIMARY KEY (`bars_id`),
  KEY `WDIDX169109819216` (`station_no`),
  KEY `WDIDX169109819217` (`opera_no`),
  KEY `WDIDX169109819218` (`bars_date_time`),
  KEY `WDIDX169109819219` (`salesd_line_no`),
  KEY `WDIDX169109819220` (`bars_debit_kredit`),
  KEY `WDIDX169109819221` (`bars_ok`),
  KEY `WDIDX169109819222` (`bars_cancellation`),
  KEY `bars_key` (`station_no`,`prod_no`,`bars_prod_foreign_no`,`bars_ok`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `bluecode_customers`
--

DROP TABLE IF EXISTS `bluecode_customers`;
CREATE TABLE IF NOT EXISTS `bluecode_customers` (
  `bluec_id` bigint NOT NULL AUTO_INCREMENT,
  `cust_no` int UNSIGNED DEFAULT NULL,
  `opera_no` smallint UNSIGNED DEFAULT NULL,
  `bluec_customer_id` varchar(40) DEFAULT NULL,
  `bluec_scheme_no` tinyint UNSIGNED DEFAULT NULL,
  PRIMARY KEY (`bluec_id`),
  UNIQUE KEY `bluec_key` (`cust_no`,`bluec_customer_id`),
  UNIQUE KEY `bluec_key_customer` (`bluec_customer_id`,`cust_no`),
  KEY `WDIDX169109819223` (`cust_no`),
  KEY `WDIDX169109819224` (`opera_no`),
  KEY `WDIDX169109819225` (`bluec_customer_id`),
  KEY `WDIDX169109819226` (`bluec_scheme_no`),
  KEY `bluec_key_operator_id` (`opera_no`,`bluec_customer_id`),
  KEY `bluec_key_id_operator` (`bluec_customer_id`,`opera_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `bluecode_logs`
--

DROP TABLE IF EXISTS `bluecode_logs`;
CREATE TABLE IF NOT EXISTS `bluecode_logs` (
  `bluel_id` bigint NOT NULL AUTO_INCREMENT,
  `opera_no` smallint UNSIGNED DEFAULT NULL,
  `station_no` int UNSIGNED DEFAULT NULL,
  `branch_no` int UNSIGNED DEFAULT NULL,
  `bluel_date` datetime(3) DEFAULT NULL,
  `bluel_slip_no` bigint UNSIGNED DEFAULT NULL,
  `salesm_guid` varchar(32) DEFAULT NULL,
  `bluel_changed_date` datetime(3) DEFAULT NULL,
  `bluel_uuid` varchar(36) DEFAULT NULL,
  `bluel_tan` varchar(40) DEFAULT NULL,
  `bluel_barcode` varchar(20) DEFAULT NULL,
  `bluel_response_content` longtext,
  `bluel_success` tinyint DEFAULT NULL,
  `bluel_error` tinyint DEFAULT NULL,
  `bluel_error_code` varchar(50) DEFAULT NULL,
  `bluel_total` decimal(24,6) DEFAULT '0.000000',
  `bluel_tip` decimal(24,6) DEFAULT '0.000000',
  PRIMARY KEY (`bluel_id`),
  UNIQUE KEY `bluel_uuid` (`bluel_uuid`),
  KEY `WDIDX169109819227` (`opera_no`),
  KEY `WDIDX169109819228` (`station_no`),
  KEY `WDIDX169109819229` (`branch_no`),
  KEY `WDIDX169109819230` (`bluel_date`),
  KEY `WDIDX169109819231` (`bluel_slip_no`),
  KEY `WDIDX169109819232` (`salesm_guid`),
  KEY `WDIDX169109819233` (`bluel_changed_date`),
  KEY `WDIDX169109819234` (`bluel_tan`),
  KEY `WDIDX169109819235` (`bluel_barcode`),
  KEY `WDIDX169109819236` (`bluel_success`),
  KEY `WDIDX169109819237` (`bluel_error`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `bluecode_schemes`
--

DROP TABLE IF EXISTS `bluecode_schemes`;
CREATE TABLE IF NOT EXISTS `bluecode_schemes` (
  `blues_id` bigint NOT NULL AUTO_INCREMENT,
  `bluec_scheme_no` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `blues_description` varchar(35) DEFAULT NULL,
  `blues_code_key` varchar(50) DEFAULT NULL,
  `blues_address_type` tinyint UNSIGNED DEFAULT NULL,
  PRIMARY KEY (`blues_id`),
  UNIQUE KEY `bluec_scheme_no` (`bluec_scheme_no`),
  UNIQUE KEY `blues_code_key` (`blues_code_key`),
  KEY `WDIDX169109819338` (`blues_description`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `branches`
--

DROP TABLE IF EXISTS `branches`;
CREATE TABLE IF NOT EXISTS `branches` (
  `branch_id` bigint NOT NULL AUTO_INCREMENT,
  `branch_no` int UNSIGNED NOT NULL DEFAULT '0',
  `branch_ref_no` int UNSIGNED DEFAULT NULL,
  `branch_description` varchar(50) DEFAULT NULL,
  `branch_fiscal_authorities_description` varchar(12) DEFAULT NULL,
  `branch_composite_no_description` varchar(57) DEFAULT NULL,
  `branch_account` int UNSIGNED DEFAULT NULL,
  `branch_offset_account` int UNSIGNED DEFAULT NULL,
  `branch_booking_reference` varchar(6) DEFAULT NULL,
  `branch_customer_payments_booking_reference` varchar(6) DEFAULT NULL,
  `branch_customer_payments_code` int UNSIGNED DEFAULT NULL,
  `branch_customer_payments_offset_account` int UNSIGNED DEFAULT NULL,
  `branch_last_waitl_no` smallint UNSIGNED DEFAULT '0',
  PRIMARY KEY (`branch_id`),
  UNIQUE KEY `branch_no` (`branch_no`),
  UNIQUE KEY `branch_ref_no` (`branch_ref_no`),
  UNIQUE KEY `branch_composite_no_description` (`branch_composite_no_description`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Daten für Tabelle `branches`
--

INSERT INTO `branches` (`branch_id`, `branch_no`, `branch_ref_no`, `branch_description`, `branch_fiscal_authorities_description`, `branch_composite_no_description`, `branch_account`, `branch_offset_account`, `branch_booking_reference`, `branch_customer_payments_booking_reference`, `branch_customer_payments_code`, `branch_customer_payments_offset_account`, `branch_last_waitl_no`) VALUES
(1, 1, 1000001, 'Filiale 1', 'FILIALE1', '     1 - Filiale 1', NULL, NULL, NULL, NULL, NULL, NULL, 0);

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `branch_customer_imports`
--

DROP TABLE IF EXISTS `branch_customer_imports`;
CREATE TABLE IF NOT EXISTS `branch_customer_imports` (
  `branci_id` bigint NOT NULL AUTO_INCREMENT,
  `branch_no` int UNSIGNED DEFAULT NULL,
  `cust_no` int UNSIGNED DEFAULT NULL,
  `branci_weekday_1` tinyint DEFAULT '0',
  `branci_weekday_2` tinyint DEFAULT '0',
  `branci_weekday_3` tinyint DEFAULT '0',
  `branci_weekday_4` tinyint DEFAULT '0',
  `branci_weekday_5` tinyint DEFAULT '0',
  `branci_weekday_6` tinyint DEFAULT '0',
  `branci_weekday_7` tinyint DEFAULT '0',
  PRIMARY KEY (`branci_id`),
  UNIQUE KEY `branci_key` (`branch_no`,`cust_no`),
  KEY `WDIDX169109819339` (`branch_no`),
  KEY `WDIDX169109819340` (`cust_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `branch_images`
--

DROP TABLE IF EXISTS `branch_images`;
CREATE TABLE IF NOT EXISTS `branch_images` (
  `branchi_id` bigint NOT NULL AUTO_INCREMENT,
  `branch_no` int UNSIGNED DEFAULT NULL,
  `branchi_time_of_day` tinyint UNSIGNED DEFAULT NULL,
  `branchi_sort` int DEFAULT NULL,
  `branchi_image` longblob,
  `branchi_image_file_name` varchar(128) DEFAULT NULL,
  PRIMARY KEY (`branchi_id`),
  KEY `WDIDX169109819341` (`branch_no`),
  KEY `WDIDX169109819342` (`branchi_time_of_day`),
  KEY `WDIDX169109819343` (`branchi_sort`),
  KEY `branchi_key` (`branch_no`,`branchi_time_of_day`,`branchi_sort`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `buildings`
--

DROP TABLE IF EXISTS `buildings`;
CREATE TABLE IF NOT EXISTS `buildings` (
  `build_id` bigint NOT NULL AUTO_INCREMENT,
  `build_no` int UNSIGNED NOT NULL DEFAULT '0',
  `branch_no` int UNSIGNED NOT NULL DEFAULT '0',
  `build_description` varchar(50) DEFAULT NULL,
  `build_number_of_rooms` smallint UNSIGNED DEFAULT NULL,
  `build_image` longblob,
  `build_image_file_name` varchar(128) DEFAULT NULL,
  `build_father_building` int UNSIGNED DEFAULT NULL,
  `build_father_click_x` int UNSIGNED DEFAULT NULL,
  `build_father_click_y` int UNSIGNED DEFAULT NULL,
  `build_father_click_height` int UNSIGNED DEFAULT NULL,
  `build_father_click_width` int UNSIGNED DEFAULT NULL,
  PRIMARY KEY (`build_id`),
  UNIQUE KEY `build_no` (`build_no`),
  KEY `WDIDX169109819344` (`branch_no`),
  KEY `WDIDX169109819345` (`build_father_building`),
  KEY `build_key` (`branch_no`,`build_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `calendar_entries`
--

DROP TABLE IF EXISTS `calendar_entries`;
CREATE TABLE IF NOT EXISTS `calendar_entries` (
  `cale_id` bigint NOT NULL AUTO_INCREMENT,
  `calt_id` bigint DEFAULT NULL,
  `branch_no` int UNSIGNED DEFAULT NULL,
  `cale_guid` varchar(32) DEFAULT NULL,
  `cale_changed_date` datetime(3) DEFAULT NULL,
  `cref_no` int UNSIGNED DEFAULT NULL,
  `cale_description` varchar(40) DEFAULT NULL,
  `cale_notes` longtext,
  `cale_from_date_time` datetime(3) DEFAULT NULL,
  `cale_to_date_time` datetime(3) DEFAULT NULL,
  `cale_walk_in_customers` tinyint DEFAULT NULL,
  `cust_no` int UNSIGNED DEFAULT NULL,
  `phonel_id` int DEFAULT NULL,
  `cale_first_name` varchar(40) DEFAULT NULL,
  `cale_last_name` varchar(40) DEFAULT NULL,
  `cale_phone_number` varchar(50) DEFAULT NULL,
  `cale_microsoft_outlook_import` tinyint DEFAULT '0',
  `cale_microsoft_outlook_export` tinyint DEFAULT '0',
  `cale_repeat` tinyint DEFAULT '0',
  `cale_table_seats` int DEFAULT NULL,
  `cale_attended` tinyint DEFAULT '0',
  `cale_customer_canceled` tinyint DEFAULT '0',
  `cale_customer_missed` tinyint DEFAULT '0',
  `cale_customer_uesd_online_booking` tinyint DEFAULT '0',
  `cale_canceled_by_staff` tinyint DEFAULT '0',
  `cale_confirmed_by_staff` tinyint DEFAULT '0',
  PRIMARY KEY (`cale_id`),
  KEY `WDIDX169109819346` (`calt_id`),
  KEY `WDIDX169109819347` (`branch_no`),
  KEY `WDIDX169109819348` (`cale_guid`),
  KEY `WDIDX169109819349` (`cale_changed_date`),
  KEY `WDIDX169109819350` (`cref_no`),
  KEY `WDIDX169109819351` (`cale_from_date_time`),
  KEY `WDIDX169109819352` (`cale_to_date_time`),
  KEY `WDIDX169109819353` (`cust_no`),
  KEY `WDIDX169109819354` (`phonel_id`),
  KEY `WDIDX169109819355` (`cale_attended`),
  KEY `WDIDX169109819356` (`cale_customer_canceled`),
  KEY `WDIDX169109819357` (`cale_customer_missed`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `calendar_infos`
--

DROP TABLE IF EXISTS `calendar_infos`;
CREATE TABLE IF NOT EXISTS `calendar_infos` (
  `cali_id` bigint NOT NULL AUTO_INCREMENT,
  `cust_no` int UNSIGNED DEFAULT NULL,
  `cali_date` date DEFAULT NULL,
  `cali_date_entry` datetime(3) DEFAULT NULL,
  `cali_text` longtext,
  `cali_control_width` float DEFAULT '0',
  PRIMARY KEY (`cali_id`),
  KEY `WDIDX169109819358` (`cust_no`),
  KEY `WDIDX169109819359` (`cali_date`),
  KEY `WDIDX169109819360` (`cali_date_entry`),
  KEY `cali_key_customer_no_date` (`cust_no`,`cali_date`),
  KEY `cali_key_date_customer_no` (`cali_date`,`cust_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `calendar_types`
--

DROP TABLE IF EXISTS `calendar_types`;
CREATE TABLE IF NOT EXISTS `calendar_types` (
  `calt_id` bigint NOT NULL AUTO_INCREMENT,
  `calt_description` varchar(35) DEFAULT NULL,
  `calt_subject` tinyint UNSIGNED DEFAULT NULL,
  `calt_type` tinyint UNSIGNED DEFAULT '0',
  `calt_image` longblob,
  `calt_image_file_name` varchar(128) DEFAULT NULL,
  `calt_minutes` int UNSIGNED DEFAULT '60',
  PRIMARY KEY (`calt_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `cash_inflows`
--

DROP TABLE IF EXISTS `cash_inflows`;
CREATE TABLE IF NOT EXISTS `cash_inflows` (
  `cashi_no` int UNSIGNED NOT NULL DEFAULT '0',
  `cashi_description` varchar(50) DEFAULT NULL,
  `prod_no` bigint UNSIGNED DEFAULT NULL,
  `cashi_id` bigint NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`cashi_id`),
  UNIQUE KEY `cashi_no` (`cashi_no`),
  KEY `WDIDX169109819361` (`prod_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `cash_outflows`
--

DROP TABLE IF EXISTS `cash_outflows`;
CREATE TABLE IF NOT EXISTS `cash_outflows` (
  `casho_id` bigint NOT NULL AUTO_INCREMENT,
  `casho_no` int UNSIGNED NOT NULL DEFAULT '0',
  `casho_description` varchar(50) DEFAULT NULL,
  `prod_no` bigint UNSIGNED DEFAULT NULL,
  PRIMARY KEY (`casho_id`),
  UNIQUE KEY `casho_no` (`casho_no`),
  KEY `WDIDX169109819362` (`prod_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `characteristic_details`
--

DROP TABLE IF EXISTS `characteristic_details`;
CREATE TABLE IF NOT EXISTS `characteristic_details` (
  `chard_id` bigint NOT NULL AUTO_INCREMENT,
  `charm_no` int NOT NULL DEFAULT '0',
  `chard_no` int NOT NULL DEFAULT '0',
  `chard_description` varchar(50) DEFAULT NULL,
  `chard_sort` int DEFAULT NULL,
  PRIMARY KEY (`chard_id`),
  UNIQUE KEY `chard_no` (`chard_no`),
  KEY `WDIDX169109819363` (`charm_no`),
  KEY `WDIDX169109819364` (`chard_sort`),
  KEY `chard_key` (`charm_no`,`chard_no`),
  KEY `chard_key_sort` (`charm_no`,`chard_sort`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `characteristic_master`
--

DROP TABLE IF EXISTS `characteristic_master`;
CREATE TABLE IF NOT EXISTS `characteristic_master` (
  `charm_id` bigint NOT NULL AUTO_INCREMENT,
  `charm_no` int NOT NULL DEFAULT '0',
  `charm_description` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`charm_id`),
  UNIQUE KEY `charm_no` (`charm_no`),
  KEY `WDIDX169109819365` (`charm_description`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `combo_meals`
--

DROP TABLE IF EXISTS `combo_meals`;
CREATE TABLE IF NOT EXISTS `combo_meals` (
  `combm_id` bigint NOT NULL AUTO_INCREMENT,
  `combm_no` int UNSIGNED NOT NULL DEFAULT '0',
  `prod_no` bigint UNSIGNED NOT NULL DEFAULT '0',
  `combm_destination_prod_no` bigint UNSIGNED DEFAULT NULL,
  `combm_quantity` double DEFAULT NULL,
  `combm_print_on_slip` tinyint DEFAULT '1',
  `combm_print_on_kitchen_order` tinyint DEFAULT '1',
  `combm_print_price` tinyint DEFAULT '1',
  `combm_debit_stock` tinyint UNSIGNED DEFAULT '3',
  `combm_swap_this_product` tinyint DEFAULT '1',
  `combm_swap_type` tinyint UNSIGNED DEFAULT '1',
  `combm_swap_maximum_percent_price_difference` float DEFAULT '15',
  `selm_no` int UNSIGNED DEFAULT NULL,
  PRIMARY KEY (`combm_id`),
  UNIQUE KEY `combm_key` (`prod_no`,`combm_no`),
  KEY `WDIDX169109819366` (`combm_no`),
  KEY `WDIDX169109819367` (`prod_no`),
  KEY `WDIDX169109819368` (`selm_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `commission_groups`
--

DROP TABLE IF EXISTS `commission_groups`;
CREATE TABLE IF NOT EXISTS `commission_groups` (
  `commg_no` smallint UNSIGNED NOT NULL DEFAULT '0',
  `commg_match_code` varchar(30) DEFAULT NULL,
  `commg_composite_no_match` varchar(40) DEFAULT NULL,
  `commg_id` bigint NOT NULL AUTO_INCREMENT,
  `commg_description` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`commg_id`),
  UNIQUE KEY `commg_no` (`commg_no`),
  UNIQUE KEY `commg_composite_no_match` (`commg_composite_no_match`),
  KEY `WDIDX169109819369` (`commg_match_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `commission_operators`
--

DROP TABLE IF EXISTS `commission_operators`;
CREATE TABLE IF NOT EXISTS `commission_operators` (
  `commo_id` bigint NOT NULL AUTO_INCREMENT,
  `opera_no` smallint UNSIGNED DEFAULT NULL,
  `commg_no` smallint UNSIGNED DEFAULT NULL,
  `commo_date` date DEFAULT NULL,
  `commo_class_a` float DEFAULT '0',
  `commo_class_b` float DEFAULT '0',
  `commo_class_c` float DEFAULT '0',
  PRIMARY KEY (`commo_id`),
  KEY `WDIDX169109819370` (`opera_no`),
  KEY `WDIDX169109819371` (`commg_no`),
  KEY `WDIDX169109819372` (`commo_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `commission_pyramid`
--

DROP TABLE IF EXISTS `commission_pyramid`;
CREATE TABLE IF NOT EXISTS `commission_pyramid` (
  `commp_id` bigint NOT NULL AUTO_INCREMENT,
  `opera_no` smallint UNSIGNED DEFAULT NULL,
  `commp_no` int UNSIGNED DEFAULT NULL,
  PRIMARY KEY (`commp_id`),
  UNIQUE KEY `commp_key_operator_pyramid` (`opera_no`,`commp_no`),
  KEY `WDIDX169109819473` (`opera_no`),
  KEY `WDIDX169109819474` (`commp_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `company_settings`
--

DROP TABLE IF EXISTS `company_settings`;
CREATE TABLE IF NOT EXISTS `company_settings` (
  `comset_id` bigint NOT NULL AUTO_INCREMENT,
  `comset_no` int DEFAULT '0',
  `comset_address_text` longtext,
  `comset_address_addresser_text` longtext,
  `comset_company_name` varchar(50) DEFAULT '',
  `comset_company_name_2` varchar(50) DEFAULT '0',
  `comset_street` varchar(50) DEFAULT '',
  `count_no` varchar(2) DEFAULT '',
  `postc_no` varchar(8) DEFAULT '',
  `comset_city` varchar(50) DEFAULT '',
  `comset_tel` varchar(50) DEFAULT '',
  `comset_mobile` varchar(50) DEFAULT '',
  `comset_email` varchar(50) DEFAULT '',
  `comset_www` varchar(50) DEFAULT '',
  `comset_uid` varchar(50) DEFAULT '',
  `comset_tax_no` varchar(50) DEFAULT '',
  `comset_company_registration_number` varchar(50) DEFAULT '',
  `comset_managing_director` varchar(50) DEFAULT '',
  PRIMARY KEY (`comset_id`),
  UNIQUE KEY `comset_no` (`comset_no`),
  KEY `WDIDX169109819475` (`count_no`),
  KEY `WDIDX169109819476` (`postc_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `countries`
--

DROP TABLE IF EXISTS `countries`;
CREATE TABLE IF NOT EXISTS `countries` (
  `count_id` bigint NOT NULL AUTO_INCREMENT,
  `count_no` varchar(2) NOT NULL DEFAULT '',
  `count_no_iso` varchar(3) DEFAULT NULL,
  `count_description` varchar(100) DEFAULT NULL,
  `count_phone_area_code` varchar(5) DEFAULT NULL,
  `count_shop_address_type` longtext,
  `count_image` longblob,
  `count_image_file_name` varchar(128) DEFAULT NULL,
  PRIMARY KEY (`count_id`),
  UNIQUE KEY `count_no` (`count_no`),
  KEY `WDIDX169109819477` (`count_no_iso`),
  KEY `WDIDX169109819478` (`count_description`),
  KEY `WDIDX169109819479` (`count_phone_area_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `courses`
--

DROP TABLE IF EXISTS `courses`;
CREATE TABLE IF NOT EXISTS `courses` (
  `cours_id` bigint NOT NULL AUTO_INCREMENT,
  `cours_no` smallint UNSIGNED NOT NULL DEFAULT '0',
  `cours_description` varchar(50) DEFAULT NULL,
  `cours_font_color` int UNSIGNED DEFAULT NULL,
  `cours_background_color` int UNSIGNED DEFAULT NULL,
  PRIMARY KEY (`cours_id`),
  UNIQUE KEY `cours_no` (`cours_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `cross_references`
--

DROP TABLE IF EXISTS `cross_references`;
CREATE TABLE IF NOT EXISTS `cross_references` (
  `cref_no` int UNSIGNED NOT NULL DEFAULT '0',
  `cref_description` varchar(50) DEFAULT NULL,
  `cref_id` bigint NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`cref_id`),
  UNIQUE KEY `cref_no` (`cref_no`),
  KEY `WDIDX169109819480` (`cref_description`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Daten für Tabelle `cross_references`
--

INSERT INTO `cross_references` (`cref_no`, `cref_description`, `cref_id`) VALUES
(1000001, '     1 - Filiale 1', 1);

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `customers`
--

DROP TABLE IF EXISTS `customers`;
CREATE TABLE IF NOT EXISTS `customers` (
  `cust_id` bigint NOT NULL AUTO_INCREMENT,
  `cust_no` int UNSIGNED NOT NULL DEFAULT '0',
  `cust_reserved` tinyint DEFAULT NULL,
  `cust_accounts_receivable_account` int UNSIGNED DEFAULT NULL,
  `branch_no` int UNSIGNED DEFAULT NULL,
  `cust_ref_no` int UNSIGNED DEFAULT NULL,
  `cust_composite_no_match_code` varchar(50) DEFAULT NULL,
  `cust_locked` tinyint DEFAULT '0',
  `cust_last_changed` datetime(3) DEFAULT NULL,
  `cust_search` varchar(40) DEFAULT NULL,
  `custg_no` smallint DEFAULT NULL,
  `cust_company` varchar(50) DEFAULT NULL,
  `cust_company_department` varchar(50) DEFAULT '',
  `sal_no` int DEFAULT '0',
  `tit_no` int DEFAULT '0',
  `cust_first_name` varchar(40) DEFAULT NULL,
  `cust_last_name` varchar(40) DEFAULT NULL,
  `cust_street` varchar(50) DEFAULT NULL,
  `postc_no` varchar(8) DEFAULT NULL,
  `cust_city` varchar(50) DEFAULT NULL,
  `count_no` varchar(2) DEFAULT NULL,
  `cust_price_type` tinyint UNSIGNED DEFAULT '0',
  `cust_text` longtext,
  `cust_discount` double DEFAULT '0',
  `salesdc_no` int DEFAULT '0',
  `cust_phone` varchar(50) DEFAULT NULL,
  `cust_mobile_phone` varchar(50) DEFAULT NULL,
  `cust_fax` varchar(50) DEFAULT NULL,
  `cust_email` varchar(128) DEFAULT NULL,
  `cust_send_emails` tinyint DEFAULT '0',
  `cust_skype` varchar(100) DEFAULT NULL,
  `cust_invoice_copies` tinyint UNSIGNED DEFAULT '2',
  `banka_no` int DEFAULT '0',
  `cust_birthday` date DEFAULT NULL,
  `cust_created` date DEFAULT NULL,
  `cust_last_purchase` date DEFAULT NULL,
  `cust_annual_sales_last_year` decimal(24,6) DEFAULT '0.000000',
  `cust_annual_sales_this_year` decimal(24,6) DEFAULT '0.000000',
  `cust_turnover_not_deducted` decimal(24,6) DEFAULT '0.000000',
  `cust_uid` varchar(20) DEFAULT NULL,
  `cust_bank_name` varchar(60) DEFAULT NULL,
  `cust_bank_code_old` varchar(10) DEFAULT NULL,
  `cust_bank_no_old` varchar(50) DEFAULT NULL,
  `cust_iban` varchar(25) DEFAULT NULL,
  `cust_bic` varchar(12) DEFAULT NULL,
  `cust_sepa_id` varchar(35) DEFAULT NULL,
  `cust_contact_name` varchar(50) DEFAULT NULL,
  `cust_balance` decimal(24,6) DEFAULT '0.000000',
  `cust_balance_last_clearing` datetime(3) DEFAULT NULL,
  `formt_no` int UNSIGNED DEFAULT NULL,
  `shop_id` bigint DEFAULT NULL,
  `cust_driver_tour_sort_1` varchar(12) DEFAULT NULL,
  `cust_driver_tour_sort_2` varchar(12) DEFAULT NULL,
  `cust_driver_tour_sort_3` varchar(12) DEFAULT NULL,
  `cust_driver_tour_sort_4` varchar(12) DEFAULT NULL,
  `cust_driver_tour_sort_5` varchar(12) DEFAULT NULL,
  `cust_driver_tour_sort_6` varchar(12) DEFAULT NULL,
  `cust_driver_tour_sort_7` varchar(12) DEFAULT NULL,
  PRIMARY KEY (`cust_id`),
  UNIQUE KEY `cust_no` (`cust_no`),
  KEY `WDIDX1691098194106` (`cust_reserved`),
  KEY `WDIDX1691098194107` (`cust_accounts_receivable_account`),
  KEY `WDIDX1691098194108` (`branch_no`),
  KEY `WDIDX1691098194109` (`cust_composite_no_match_code`),
  KEY `WDIDX1691098194110` (`cust_last_changed`),
  KEY `WDIDX1691098194111` (`cust_search`),
  KEY `WDIDX1691098194112` (`custg_no`),
  KEY `WDIDX1691098194113` (`sal_no`),
  KEY `WDIDX1691098195114` (`tit_no`),
  KEY `WDIDX1691098195115` (`postc_no`),
  KEY `WDIDX1691098195116` (`cust_city`),
  KEY `WDIDX1691098195117` (`count_no`),
  KEY `WDIDX1691098195118` (`salesdc_no`),
  KEY `WDIDX1691098195119` (`cust_phone`),
  KEY `WDIDX1691098195120` (`cust_email`),
  KEY `WDIDX1691098195121` (`banka_no`),
  KEY `WDIDX1691098195122` (`cust_birthday`),
  KEY `WDIDX1691098195123` (`cust_created`),
  KEY `WDIDX1691098195124` (`cust_last_purchase`),
  KEY `WDIDX1691098195125` (`cust_sepa_id`),
  KEY `WDIDX1691098195126` (`formt_no`),
  KEY `WDIDX1691098195127` (`shop_id`),
  KEY `WDIDX1691098195128` (`cust_driver_tour_sort_1`),
  KEY `WDIDX1691098195129` (`cust_driver_tour_sort_2`),
  KEY `WDIDX1691098195130` (`cust_driver_tour_sort_3`),
  KEY `WDIDX1691098195131` (`cust_driver_tour_sort_4`),
  KEY `WDIDX1691098195132` (`cust_driver_tour_sort_5`),
  KEY `WDIDX1691098195133` (`cust_driver_tour_sort_6`),
  KEY `WDIDX1691098195134` (`cust_driver_tour_sort_7`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `customer_delivery_addresses`
--

DROP TABLE IF EXISTS `customer_delivery_addresses`;
CREATE TABLE IF NOT EXISTS `customer_delivery_addresses` (
  `custdel_id` bigint NOT NULL AUTO_INCREMENT,
  `cust_no` int UNSIGNED DEFAULT '0',
  `custdel_no` int DEFAULT '0',
  `tit_no` int DEFAULT '0',
  `sal_no` int DEFAULT '0',
  `custdel_first_name` varchar(50) DEFAULT '',
  `custdel_last_name` varchar(50) DEFAULT '',
  `custdel_company` varchar(50) DEFAULT '',
  `custdel_company_department` varchar(50) DEFAULT '',
  `custdel_street` varchar(50) DEFAULT '',
  `postc_no` varchar(8) DEFAULT '',
  `custdel_city` varchar(50) DEFAULT '',
  `count_no` varchar(2) DEFAULT '',
  `custdel_phone` varchar(50) DEFAULT '',
  `custdel_mobile_phone` varchar(50) DEFAULT '',
  PRIMARY KEY (`custdel_id`),
  UNIQUE KEY `custdel_key` (`cust_no`,`custdel_no`),
  KEY `WDIDX17217274830` (`cust_no`),
  KEY `WDIDX17217274831` (`custdel_no`),
  KEY `WDIDX17217274842` (`tit_no`),
  KEY `WDIDX17217274843` (`sal_no`),
  KEY `WDIDX17217274844` (`postc_no`),
  KEY `WDIDX17217274845` (`count_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `customer_emails`
--

DROP TABLE IF EXISTS `customer_emails`;
CREATE TABLE IF NOT EXISTS `customer_emails` (
  `custe_id` bigint NOT NULL AUTO_INCREMENT,
  `cust_no` int UNSIGNED DEFAULT NULL,
  `custe_email_address` varchar(128) DEFAULT NULL,
  `custe_subject` varchar(80) DEFAULT NULL,
  `custe_body` longtext,
  `custe_date_time` datetime(3) DEFAULT NULL,
  `custe_date_time_send` datetime(3) DEFAULT NULL,
  `custe_attachment` longblob,
  `custe_file_name` varchar(128) DEFAULT NULL,
  `custe_failed` tinyint DEFAULT NULL,
  `custe_source` longtext,
  `custe_error_code` varchar(128) DEFAULT NULL,
  `custe_email_address_sender` varchar(128) DEFAULT NULL,
  PRIMARY KEY (`custe_id`),
  KEY `WDIDX169109819481` (`cust_no`),
  KEY `WDIDX169109819482` (`custe_email_address`),
  KEY `WDIDX169109819483` (`custe_date_time`),
  KEY `WDIDX169109819484` (`custe_date_time_send`),
  KEY `WDIDX169109819485` (`custe_file_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `customer_groups`
--

DROP TABLE IF EXISTS `customer_groups`;
CREATE TABLE IF NOT EXISTS `customer_groups` (
  `custg_id` bigint NOT NULL AUTO_INCREMENT,
  `custg_no` smallint NOT NULL DEFAULT '0',
  `custg_ref_no` int UNSIGNED NOT NULL DEFAULT '0',
  `custg_description` varchar(40) NOT NULL DEFAULT '',
  `custg_composite_no_description` varchar(50) DEFAULT NULL,
  `custg_sort` int DEFAULT NULL,
  PRIMARY KEY (`custg_id`),
  UNIQUE KEY `custg_no` (`custg_no`),
  UNIQUE KEY `custg_ref_no` (`custg_ref_no`),
  KEY `WDIDX169109819488` (`custg_description`),
  KEY `WDIDX169109819489` (`custg_composite_no_description`),
  KEY `WDIDX169109819490` (`custg_sort`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `customer_group_links`
--

DROP TABLE IF EXISTS `customer_group_links`;
CREATE TABLE IF NOT EXISTS `customer_group_links` (
  `custgl_id` bigint NOT NULL AUTO_INCREMENT,
  `custg_no` smallint DEFAULT '0',
  `cust_no` int UNSIGNED DEFAULT '0',
  PRIMARY KEY (`custgl_id`),
  UNIQUE KEY `custgl_key` (`custg_no`,`cust_no`),
  UNIQUE KEY `custgl_mkey` (`cust_no`,`custg_no`),
  KEY `WDIDX169109819486` (`custg_no`),
  KEY `WDIDX169109819487` (`cust_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `customer_loyalty_accountings`
--

DROP TABLE IF EXISTS `customer_loyalty_accountings`;
CREATE TABLE IF NOT EXISTS `customer_loyalty_accountings` (
  `custl_id` bigint NOT NULL AUTO_INCREMENT,
  `custl_day` date DEFAULT NULL,
  `cust_no` int UNSIGNED DEFAULT NULL,
  `custl_amount` decimal(24,6) DEFAULT '0.000000',
  `custl_barcode` varchar(80) DEFAULT NULL,
  `custl_printed` tinyint DEFAULT '0',
  `custl_type` tinyint UNSIGNED DEFAULT NULL,
  PRIMARY KEY (`custl_id`),
  KEY `WDIDX169109819491` (`custl_day`),
  KEY `WDIDX169109819492` (`cust_no`),
  KEY `WDIDX169109819493` (`custl_barcode`),
  KEY `WDIDX169109819494` (`custl_printed`),
  KEY `custl_key` (`cust_no`,`custl_barcode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `customer_notes`
--

DROP TABLE IF EXISTS `customer_notes`;
CREATE TABLE IF NOT EXISTS `customer_notes` (
  `custn_id` bigint NOT NULL AUTO_INCREMENT,
  `cust_no` int UNSIGNED DEFAULT NULL,
  `opera_no` smallint UNSIGNED DEFAULT NULL,
  `custn_date` datetime(3) DEFAULT NULL,
  `custn_changed_date` datetime(3) DEFAULT NULL,
  `formd_id` bigint DEFAULT NULL,
  `custn_value` longtext,
  `custn_image` longblob,
  `custn_image_file_name` varchar(128) DEFAULT NULL,
  `custn_image_height` smallint UNSIGNED DEFAULT NULL,
  PRIMARY KEY (`custn_id`),
  KEY `WDIDX169109819495` (`cust_no`),
  KEY `WDIDX169109819496` (`opera_no`),
  KEY `WDIDX169109819497` (`custn_date`),
  KEY `WDIDX169109819498` (`custn_changed_date`),
  KEY `WDIDX169109819499` (`formd_id`),
  KEY `custn_key_date` (`cust_no`,`formd_id`,`custn_date`),
  KEY `custn_key` (`cust_no`,`formd_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `customer_sales_accounts`
--

DROP TABLE IF EXISTS `customer_sales_accounts`;
CREATE TABLE IF NOT EXISTS `customer_sales_accounts` (
  `custsa_id` bigint NOT NULL AUTO_INCREMENT,
  `cust_no` int UNSIGNED DEFAULT NULL,
  `custsa_date` datetime(3) DEFAULT NULL,
  `custsa_type` tinyint UNSIGNED DEFAULT NULL,
  `salesm_guid` varchar(32) DEFAULT NULL,
  `salesm_slip_no` bigint UNSIGNED DEFAULT NULL,
  `station_no` int UNSIGNED DEFAULT NULL,
  `custsa_amount` decimal(24,6) DEFAULT '0.000000',
  PRIMARY KEY (`custsa_id`),
  KEY `WDIDX1691098194100` (`cust_no`),
  KEY `WDIDX1691098194101` (`custsa_date`),
  KEY `WDIDX1691098194102` (`custsa_type`),
  KEY `WDIDX1691098194103` (`salesm_guid`),
  KEY `WDIDX1691098194104` (`salesm_slip_no`),
  KEY `WDIDX1691098194105` (`station_no`),
  KEY `custsa_key` (`cust_no`,`custsa_date`),
  KEY `custsa_key_type` (`cust_no`,`custsa_type`,`custsa_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `data_transfer_list`
--

DROP TABLE IF EXISTS `data_transfer_list`;
CREATE TABLE IF NOT EXISTS `data_transfer_list` (
  `dtl_id` bigint NOT NULL AUTO_INCREMENT,
  `dtl_from_station` smallint UNSIGNED DEFAULT NULL,
  `dtl_to_station` smallint UNSIGNED DEFAULT NULL,
  `dtl_date` datetime(3) DEFAULT NULL,
  `dtl_type` varchar(3) DEFAULT NULL,
  `dtl_message` longtext,
  `dtl_done` tinyint DEFAULT '0',
  PRIMARY KEY (`dtl_id`),
  KEY `WDIDX1691098195135` (`dtl_from_station`),
  KEY `WDIDX1691098195136` (`dtl_to_station`),
  KEY `WDIDX1691098195137` (`dtl_date`),
  KEY `WDIDX1691098195138` (`dtl_type`),
  KEY `WDIDX1691098195139` (`dtl_done`),
  KEY `dtl_key` (`dtl_done`,`dtl_from_station`,`dtl_to_station`,`dtl_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `delivery_types`
--

DROP TABLE IF EXISTS `delivery_types`;
CREATE TABLE IF NOT EXISTS `delivery_types` (
  `delt_id` bigint NOT NULL AUTO_INCREMENT,
  `delt_no` int NOT NULL DEFAULT '0',
  `delt_description` varchar(50) DEFAULT '0',
  `delt_eat_here` tinyint DEFAULT '0',
  `delt_take_away` tinyint DEFAULT '0',
  `delt_delivery` tinyint DEFAULT '0',
  PRIMARY KEY (`delt_id`),
  UNIQUE KEY `delt_no` (`delt_no`),
  KEY `WDIDX1691098195140` (`delt_description`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `device_details`
--

DROP TABLE IF EXISTS `device_details`;
CREATE TABLE IF NOT EXISTS `device_details` (
  `deviced_id` bigint NOT NULL AUTO_INCREMENT,
  `devicem_no` int NOT NULL DEFAULT '0',
  `deviced_no` int DEFAULT NULL,
  `deviced_description` varchar(50) DEFAULT NULL,
  `deviced_code` varchar(255) DEFAULT NULL,
  `devicem_type` tinyint UNSIGNED DEFAULT NULL,
  PRIMARY KEY (`deviced_id`),
  UNIQUE KEY `deviced_key` (`devicem_no`,`deviced_no`),
  KEY `WDIDX1691098195141` (`devicem_no`),
  KEY `WDIDX1691098195142` (`deviced_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `device_master`
--

DROP TABLE IF EXISTS `device_master`;
CREATE TABLE IF NOT EXISTS `device_master` (
  `devicem_no` int NOT NULL DEFAULT '0',
  `devicem_name` varchar(255) DEFAULT NULL,
  `devicem_description` longtext,
  `devicem_connection_type` tinyint UNSIGNED DEFAULT '0',
  `devicem_type` tinyint UNSIGNED DEFAULT '0',
  `devicem_port_name` varchar(255) DEFAULT NULL,
  `devicem_id` bigint NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`devicem_id`),
  UNIQUE KEY `devicem_no` (`devicem_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `dining_areas`
--

DROP TABLE IF EXISTS `dining_areas`;
CREATE TABLE IF NOT EXISTS `dining_areas` (
  `dareas_id` bigint NOT NULL AUTO_INCREMENT,
  `dareas_no` int UNSIGNED NOT NULL DEFAULT '0',
  `branch_no` int UNSIGNED DEFAULT '0',
  `dareas_description` varchar(50) DEFAULT NULL,
  `dareas_tables_count` smallint UNSIGNED DEFAULT '1',
  `dareas_image` longblob,
  `dareas_image_file_name` varchar(128) DEFAULT NULL,
  `dareas_master_no` int UNSIGNED DEFAULT '0',
  `dareas_master_x` int UNSIGNED DEFAULT '0',
  `dareas_master_y` int UNSIGNED DEFAULT '0',
  `dareas_master_width` int UNSIGNED DEFAULT '0',
  `dareas_master_height` int UNSIGNED DEFAULT '0',
  PRIMARY KEY (`dareas_id`),
  UNIQUE KEY `dareas_no` (`dareas_no`),
  KEY `WDIDX1691098195143` (`branch_no`),
  KEY `WDIDX1691098195144` (`dareas_master_no`),
  KEY `dareas_key` (`branch_no`,`dareas_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `fonts`
--

DROP TABLE IF EXISTS `fonts`;
CREATE TABLE IF NOT EXISTS `fonts` (
  `font_id` bigint NOT NULL AUTO_INCREMENT,
  `font_no` int NOT NULL DEFAULT '0',
  `font_name` varchar(128) DEFAULT NULL,
  `font_image` longblob,
  `font_image_file_name` varchar(128) DEFAULT NULL,
  PRIMARY KEY (`font_id`),
  UNIQUE KEY `font_no` (`font_no`),
  KEY `WDIDX1691098195145` (`font_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `form_template_details`
--

DROP TABLE IF EXISTS `form_template_details`;
CREATE TABLE IF NOT EXISTS `form_template_details` (
  `formd_id` bigint NOT NULL AUTO_INCREMENT,
  `formd_no` int NOT NULL DEFAULT '0',
  `formt_no` int UNSIGNED DEFAULT '0',
  `formd_control` varchar(50) DEFAULT '0',
  `formd_type` tinyint UNSIGNED DEFAULT '0',
  `formd_page` tinyint UNSIGNED DEFAULT '0',
  `formd_x` float DEFAULT '0',
  `formd_y` float DEFAULT '0',
  `formd_width` float DEFAULT '0',
  `formd_height` float DEFAULT '0',
  `formd_font_name` varchar(50) DEFAULT '',
  `formd_font_size` float DEFAULT '0',
  `formd_font_bold` tinyint DEFAULT '0',
  `formd_font_italic` tinyint DEFAULT '0',
  `formd_font_underlined` tinyint DEFAULT '0',
  `formd_value` varchar(512) DEFAULT NULL,
  `formd_image` longblob,
  `formd_image_file_name` varchar(80) DEFAULT NULL,
  `formd_angel` smallint DEFAULT '0',
  `formd_font_strike_out` tinyint DEFAULT '0',
  `formd_font_color` int UNSIGNED DEFAULT '0',
  `formd_background_color` int UNSIGNED DEFAULT '0',
  `formd_orientation_horizontal` tinyint UNSIGNED DEFAULT '0',
  `formd_orientation_vertical` tinyint UNSIGNED DEFAULT '0',
  PRIMARY KEY (`formd_id`),
  KEY `WDIDX1691098196146` (`formd_no`),
  KEY `WDIDX1691098196147` (`formt_no`),
  KEY `WDIDX1691098196148` (`formd_control`),
  KEY `WDIDX1691098196149` (`formd_type`),
  KEY `WDIDX1691098196150` (`formd_page`),
  KEY `formd_key` (`formt_no`,`formd_page`,`formd_control`),
  KEY `formd_key_id` (`formt_no`,`formd_page`,`formd_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `form_template_master`
--

DROP TABLE IF EXISTS `form_template_master`;
CREATE TABLE IF NOT EXISTS `form_template_master` (
  `formt_id` bigint NOT NULL AUTO_INCREMENT,
  `formt_no` int UNSIGNED NOT NULL DEFAULT '0',
  `formt_type` tinyint UNSIGNED DEFAULT '0',
  `formt_description` varchar(50) DEFAULT NULL,
  `formt_border` tinyint DEFAULT '0',
  `formt_preview` tinyint DEFAULT '0',
  `formt_width` float DEFAULT '0',
  `formt_height` float DEFAULT '0',
  `formt_border_right` float DEFAULT '0',
  `formt_border_left` float DEFAULT '0',
  `formt_border_top` float DEFAULT '0',
  `formt_border_bottom` float DEFAULT '0',
  `formt_zoom` smallint UNSIGNED DEFAULT '180',
  `formt_background_color` int UNSIGNED DEFAULT '0',
  PRIMARY KEY (`formt_id`),
  UNIQUE KEY `formt_no` (`formt_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `kiosk_details`
--

DROP TABLE IF EXISTS `kiosk_details`;
CREATE TABLE IF NOT EXISTS `kiosk_details` (
  `kioskd_id` bigint NOT NULL AUTO_INCREMENT,
  `station_no` int UNSIGNED DEFAULT '0',
  `kioskm_no` int DEFAULT '0',
  `kioskm_page_no` int DEFAULT '0',
  `kioskd_name` varchar(36) NOT NULL DEFAULT '',
  `kioskd_sort` int DEFAULT '0',
  `kioskd_x` smallint DEFAULT '0',
  `kioskd_y` smallint DEFAULT '0',
  `kioskd_width` smallint DEFAULT '0',
  `kioskd_height` smallint DEFAULT '0',
  `kioskd_type` tinyint UNSIGNED DEFAULT '0',
  `prod_no` bigint UNSIGNED DEFAULT NULL,
  `kioskd_program` varchar(160) DEFAULT NULL,
  `kioskd_offset_x` smallint DEFAULT '0',
  `kioskd_offset_y` smallint DEFAULT '0',
  `kioskd_font_name` varchar(50) DEFAULT 'Roboto Condensed',
  `kioskd_font_size` int DEFAULT '8',
  `kioskd_font_bold` tinyint DEFAULT '0',
  `kioskd_font_italic` tinyint DEFAULT '0',
  `kioskd_font_underlined` tinyint DEFAULT '0',
  `kioskd_font_color` int DEFAULT '16777215',
  `kioskd_text_pos_x` smallint UNSIGNED DEFAULT '0',
  `kioskd_text_pos_y` smallint UNSIGNED DEFAULT '0',
  `kioskd_generate_2_image` tinyint DEFAULT '0',
  `kioskd_dont_use_offset_for_text` tinyint DEFAULT '0',
  PRIMARY KEY (`kioskd_id`),
  UNIQUE KEY `kioskd_name` (`kioskd_name`),
  UNIQUE KEY `kioskd_key` (`station_no`,`kioskm_no`,`kioskd_name`),
  KEY `WDIDX1691098196151` (`station_no`),
  KEY `WDIDX1691098196152` (`kioskm_no`),
  KEY `WDIDX1691098196153` (`kioskm_page_no`),
  KEY `WDIDX1691098196154` (`prod_no`),
  KEY `kioskd_key_sort` (`station_no`,`kioskm_no`,`kioskm_page_no`,`kioskd_sort`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `kiosk_master`
--

DROP TABLE IF EXISTS `kiosk_master`;
CREATE TABLE IF NOT EXISTS `kiosk_master` (
  `kioskm_id` bigint NOT NULL AUTO_INCREMENT,
  `station_no` int UNSIGNED DEFAULT '0',
  `kioskm_no` int DEFAULT '0',
  `kioskm_page_no` int DEFAULT '0',
  `kioskm_previous_page_no` int DEFAULT '0',
  `kioskm_description` varchar(50) DEFAULT '',
  `kioskm_page_type` tinyint UNSIGNED DEFAULT '0',
  `kioskm_background_image` longblob,
  `kioskm_width` smallint DEFAULT '0',
  `kioskm_height` smallint DEFAULT '0',
  `selm_no_dine_in` int UNSIGNED DEFAULT '0',
  `selm_no_take_away` int UNSIGNED DEFAULT '0',
  PRIMARY KEY (`kioskm_id`),
  UNIQUE KEY `kioskm_key` (`station_no`,`kioskm_no`,`kioskm_page_no`),
  KEY `WDIDX1691098196155` (`station_no`),
  KEY `WDIDX1691098196156` (`kioskm_no`),
  KEY `WDIDX1691098196157` (`kioskm_page_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `kiosk_translations`
--

DROP TABLE IF EXISTS `kiosk_translations`;
CREATE TABLE IF NOT EXISTS `kiosk_translations` (
  `kioskt_id` bigint NOT NULL AUTO_INCREMENT,
  `kioskd_name` varchar(36) DEFAULT '',
  `lang_no` int DEFAULT '0',
  `kioskt_description` longtext,
  `kioskt_image` longblob,
  PRIMARY KEY (`kioskt_id`),
  UNIQUE KEY `kioskt_key` (`kioskd_name`,`lang_no`),
  KEY `WDIDX1691098196158` (`lang_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `languages`
--

DROP TABLE IF EXISTS `languages`;
CREATE TABLE IF NOT EXISTS `languages` (
  `lang_id` bigint NOT NULL AUTO_INCREMENT,
  `lang_no` int NOT NULL DEFAULT '0',
  `lang_description` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`lang_id`),
  UNIQUE KEY `lang_no` (`lang_no`),
  KEY `WDIDX1691098196159` (`lang_description`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `money_counting_lists`
--

DROP TABLE IF EXISTS `money_counting_lists`;
CREATE TABLE IF NOT EXISTS `money_counting_lists` (
  `moncl_id` bigint NOT NULL AUTO_INCREMENT,
  `branch_no` int UNSIGNED NOT NULL DEFAULT '0',
  `station_no` int UNSIGNED NOT NULL DEFAULT '0',
  `moncl_no` int UNSIGNED DEFAULT NULL,
  `moncl_date` date DEFAULT NULL,
  `moncl_cent_1` int UNSIGNED DEFAULT '0',
  `moncl_cent_2` int UNSIGNED DEFAULT '0',
  `moncl_cent_5` int UNSIGNED DEFAULT '0',
  `moncl_cent_10` int UNSIGNED DEFAULT '0',
  `moncl_cent_20` int UNSIGNED DEFAULT '0',
  `moncl_cent_50` int UNSIGNED DEFAULT '0',
  `moncl_euro_1` int UNSIGNED DEFAULT '0',
  `moncl_euro_2` int UNSIGNED DEFAULT '0',
  `moncl_note_5` int UNSIGNED DEFAULT '0',
  `moncl_note_10` int UNSIGNED DEFAULT '0',
  `moncl_note_20` int UNSIGNED DEFAULT '0',
  `moncl_note_50` int UNSIGNED DEFAULT '0',
  `moncl_note_100` int UNSIGNED DEFAULT '0',
  `moncl_note_200` int UNSIGNED DEFAULT '0',
  `moncl_note_500` int UNSIGNED DEFAULT '0',
  `moncl_total` decimal(24,6) DEFAULT '0.000000',
  `moncl_change` decimal(24,6) DEFAULT '0.000000',
  `moncl_changed_date` datetime(3) DEFAULT NULL,
  PRIMARY KEY (`moncl_id`),
  UNIQUE KEY `moncl_key` (`station_no`,`moncl_no`),
  KEY `WDIDX1691098196160` (`branch_no`),
  KEY `WDIDX1691098196161` (`station_no`),
  KEY `WDIDX1691098196162` (`moncl_no`),
  KEY `WDIDX1691098196163` (`moncl_date`),
  KEY `WDIDX1691098196164` (`moncl_changed_date`),
  KEY `moncl_key_date` (`station_no`,`moncl_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `operators`
--

DROP TABLE IF EXISTS `operators`;
CREATE TABLE IF NOT EXISTS `operators` (
  `opera_id` bigint NOT NULL AUTO_INCREMENT,
  `opera_no` smallint UNSIGNED NOT NULL DEFAULT '0',
  `commp_no` int UNSIGNED NOT NULL DEFAULT '0',
  `perm_no` tinyint UNSIGNED DEFAULT NULL,
  `opera_login_name` varchar(40) NOT NULL DEFAULT '',
  `opera_first_name` varchar(35) DEFAULT NULL,
  `opera_last_name` varchar(35) DEFAULT NULL,
  `opera_address` varchar(50) DEFAULT NULL,
  `opera_zip` varchar(50) DEFAULT NULL,
  `opera_city` varchar(50) DEFAULT NULL,
  `opera_birthday` date DEFAULT NULL,
  `opera_code` varchar(20) DEFAULT NULL,
  `opera_password` varchar(20) DEFAULT NULL,
  `opera_transponder_code` varchar(14) DEFAULT NULL,
  `opera_may_sell` tinyint DEFAULT '1',
  `opera_operator_base_sales` decimal(24,6) DEFAULT '0.000000',
  `opera_ref_no` int UNSIGNED DEFAULT '0',
  `opera_composite_no_login_name` varchar(50) DEFAULT NULL,
  `opera_sort` varchar(8) DEFAULT NULL,
  `operaw_no` int DEFAULT '0',
  `opera_limit_tables` tinyint DEFAULT '0',
  `opera_commission_in_percent` float DEFAULT NULL,
  `opera_start_of_work` time DEFAULT NULL,
  `opera_end_of_work` time DEFAULT NULL,
  `opera_lock_tables` tinyint DEFAULT '0',
  `opera_table_management_active` tinyint DEFAULT '0',
  `opera_table_management_type` tinyint UNSIGNED DEFAULT NULL,
  `opera_tables_balance` tinyint DEFAULT '0',
  `opera_time_recording_active` tinyint DEFAULT '0',
  `opera_time_recording_mandatory` tinyint DEFAULT '0',
  `opera_work_schedule_color` int UNSIGNED DEFAULT '0',
  `opera_work_schedule_font_color` int UNSIGNED DEFAULT '0',
  `opera_work_schedule_header_color` int UNSIGNED DEFAULT '0',
  `opera_screen_statistics_color` int UNSIGNED DEFAULT '0',
  `opera_login_color` int UNSIGNED DEFAULT '0',
  `opera_login_font_color` int UNSIGNED DEFAULT '0',
  `opera_calendar_color` int UNSIGNED DEFAULT '0',
  `opera_calendar_font_color` int UNSIGNED DEFAULT '0',
  `opera_calendar_width` smallint UNSIGNED DEFAULT '200',
  `opera_employed_since` date DEFAULT NULL,
  `opera_dismissed_since` date DEFAULT NULL,
  `opera_open_receipts_must_be_handed_over` tinyint DEFAULT '0',
  `opera_daily_budget` decimal(24,6) DEFAULT '0.000000',
  `opera_daily_budget_last_balance` datetime(3) DEFAULT NULL,
  `opera_no_cash_drawer_open` tinyint DEFAULT '0',
  `branch_no` int UNSIGNED DEFAULT '0',
  `opera_image` longblob,
  `opera_dispensing_system_operator_no` smallint UNSIGNED DEFAULT NULL,
  `opera_dispensing_system_operator_is_service` tinyint DEFAULT '0',
  `opera_table_group_external` int DEFAULT '0',
  `opera_table_group_internal` int DEFAULT '0',
  `opera_last_login` datetime(3) DEFAULT NULL,
  `opera_temporary_job` tinyint DEFAULT '0',
  `opera_employee_discount_in_percent` float DEFAULT '0',
  PRIMARY KEY (`opera_id`),
  UNIQUE KEY `opera_no` (`opera_no`),
  UNIQUE KEY `commp_no` (`commp_no`),
  UNIQUE KEY `opera_login_name` (`opera_login_name`),
  UNIQUE KEY `opera_ref_no` (`opera_ref_no`),
  UNIQUE KEY `opera_composite_no_login_name` (`opera_composite_no_login_name`),
  KEY `WDIDX1691098196171` (`perm_no`),
  KEY `WDIDX1691098196172` (`opera_birthday`),
  KEY `WDIDX1691098196173` (`opera_code`),
  KEY `WDIDX1691098196174` (`opera_password`),
  KEY `WDIDX1691098196175` (`opera_transponder_code`),
  KEY `WDIDX1691098196176` (`opera_sort`),
  KEY `WDIDX1691098197177` (`operaw_no`),
  KEY `WDIDX1691098197178` (`opera_limit_tables`),
  KEY `WDIDX1691098197179` (`branch_no`),
  KEY `WDIDX1691098197180` (`opera_dispensing_system_operator_no`),
  KEY `WDIDX1691098197181` (`opera_table_group_external`),
  KEY `WDIDX1691098197182` (`opera_table_group_internal`),
  KEY `WDIDX1691098197183` (`opera_last_login`),
  KEY `opera_key_branch_sort` (`branch_no`,`opera_sort`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `operator_coms`
--

DROP TABLE IF EXISTS `operator_coms`;
CREATE TABLE IF NOT EXISTS `operator_coms` (
  `operac_id` bigint NOT NULL AUTO_INCREMENT,
  `opera_no` smallint UNSIGNED DEFAULT NULL,
  `table_no` int UNSIGNED DEFAULT NULL,
  `operac_date_time` datetime(3) DEFAULT NULL,
  `operac_call_type` tinyint UNSIGNED DEFAULT NULL,
  `operac_done` tinyint DEFAULT '0',
  PRIMARY KEY (`operac_id`),
  KEY `WDIDX1691098196165` (`opera_no`),
  KEY `WDIDX1691098196166` (`table_no`),
  KEY `WDIDX1691098196167` (`operac_date_time`),
  KEY `WDIDX1691098196168` (`operac_done`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `operator_tables`
--

DROP TABLE IF EXISTS `operator_tables`;
CREATE TABLE IF NOT EXISTS `operator_tables` (
  `operat_id` bigint NOT NULL AUTO_INCREMENT,
  `opera_no` smallint UNSIGNED DEFAULT NULL,
  `table_no` int UNSIGNED DEFAULT NULL,
  `operat_allowed` tinyint DEFAULT '0',
  PRIMARY KEY (`operat_id`),
  UNIQUE KEY `operat_key` (`opera_no`,`table_no`),
  KEY `WDIDX1691098196169` (`opera_no`),
  KEY `WDIDX1691098196170` (`table_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `operator_work_types`
--

DROP TABLE IF EXISTS `operator_work_types`;
CREATE TABLE IF NOT EXISTS `operator_work_types` (
  `operaw_id` bigint NOT NULL AUTO_INCREMENT,
  `operaw_no` int NOT NULL DEFAULT '0',
  `operaw_description` varchar(50) DEFAULT NULL,
  `operaw_normal_work_time_from` time DEFAULT NULL,
  `operaw_normal_work_time_to` time DEFAULT NULL,
  `operaw_public_holiday_surcharge` tinyint DEFAULT '0',
  `operaw_public_holiday_surcharge_percent` float DEFAULT '0',
  `operaw_saturday_surcharge` tinyint DEFAULT '0',
  `operaw_saturday_surcharge_percent` float DEFAULT '0',
  `operaw_saturday_from` time DEFAULT NULL,
  `operaw_saturday_to` time DEFAULT NULL,
  `operaw_sunday_surcharge` tinyint DEFAULT '0',
  `operaw_sunday_surcharge_percent` float DEFAULT '0',
  `operaw_weekend_work` tinyint DEFAULT '0',
  `operaw_public_holiday_work` tinyint DEFAULT '0',
  `operaw_weekly_hours` float DEFAULT '0',
  `operaw_hours_per_month` float DEFAULT '0',
  `operaw_maximum_hours_per_day` float DEFAULT '0',
  `operaw_maximum_hours_per_week` float DEFAULT '0',
  `operaw_maximum_hours_per_month` float DEFAULT '0',
  `operaw_night_surcharge` tinyint DEFAULT '0',
  `operaw_night_surcharge_percent` float DEFAULT '0',
  `operaw_night_surcharge_from` time DEFAULT NULL,
  `operaw_night_surcharge_to` time DEFAULT NULL,
  `operaw_additional_surcharge_1` tinyint DEFAULT '0',
  `operaw_additional_surcharge_1_percent` float DEFAULT '0',
  `operaw_additional_surcharge_1_from_weekly_hours` float DEFAULT '0',
  `operaw_additional_surcharge_2` tinyint DEFAULT '0',
  `operaw_additional_surcharge_2_percent` float DEFAULT '0',
  `operaw_additional_surcharge_2_from_weekly_hours` float DEFAULT '0',
  `operaw_additional_surcharge_3` tinyint DEFAULT '0',
  `operaw_additional_surcharge_3_percent` float DEFAULT '0',
  `operaw_additional_surcharge_3_from_weekly_hours` float DEFAULT '0',
  `operaw_break_at_least_hours` float DEFAULT '0',
  `operaw_break_at_least_minutes` tinyint UNSIGNED DEFAULT '0',
  `operaw_break_at_least_minutes_paid` tinyint UNSIGNED DEFAULT '0',
  PRIMARY KEY (`operaw_id`),
  UNIQUE KEY `operaw_no` (`operaw_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `order_details`
--

DROP TABLE IF EXISTS `order_details`;
CREATE TABLE IF NOT EXISTS `order_details` (
  `orderd_id` bigint NOT NULL AUTO_INCREMENT,
  `orderm_id` bigint DEFAULT NULL,
  `orderd_description` longtext,
  `opera_no` smallint UNSIGNED DEFAULT NULL,
  `prod_no` bigint UNSIGNED DEFAULT NULL,
  `orderd_quantity` double DEFAULT '0',
  `orderd_new` tinyint DEFAULT '0',
  PRIMARY KEY (`orderd_id`),
  UNIQUE KEY `orderm_id` (`orderm_id`),
  KEY `WDIDX1691098197184` (`opera_no`),
  KEY `WDIDX1691098197185` (`prod_no`),
  KEY `orderd_key` (`orderm_id`,`prod_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `order_form_details`
--

DROP TABLE IF EXISTS `order_form_details`;
CREATE TABLE IF NOT EXISTS `order_form_details` (
  `orderfd_id` bigint NOT NULL AUTO_INCREMENT,
  `orderfm_id` bigint DEFAULT NULL,
  `orderfd_description` longtext,
  `orderfd_line_no` int DEFAULT '0',
  `prod_no` bigint UNSIGNED DEFAULT '0',
  `orderfd_order_pack_size` smallint UNSIGNED DEFAULT '0',
  PRIMARY KEY (`orderfd_id`),
  KEY `WDIDX1691098197186` (`orderfm_id`),
  KEY `WDIDX1691098197187` (`orderfd_line_no`),
  KEY `WDIDX1691098197188` (`prod_no`),
  KEY `orderfd_key` (`orderfm_id`,`orderfd_line_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `order_form_master`
--

DROP TABLE IF EXISTS `order_form_master`;
CREATE TABLE IF NOT EXISTS `order_form_master` (
  `orderfm_id` bigint NOT NULL AUTO_INCREMENT,
  `orderfm_description` varchar(128) DEFAULT NULL,
  `orderfm_email` varchar(128) DEFAULT NULL,
  `orderfm_branches` varchar(255) DEFAULT NULL,
  `orderfm_header_image` longblob,
  `orderfm_footer_image` longblob,
  `orderfm_alert_time` time DEFAULT NULL,
  `orderfm_border_left` float DEFAULT '13',
  `orderfm_border_right` float DEFAULT '13',
  `orderfm_product_column_width` float DEFAULT '25',
  `orderfm_quantity_column_width` float DEFAULT '25',
  `orderfm_normal_font_name` varchar(50) DEFAULT 'Helvetica',
  `orderfm_bold_font_name` varchar(50) DEFAULT 'Helvetica-Bold',
  `orderfm_italic_font_name` varchar(50) DEFAULT 'Helvetica',
  `orderfm_bold_italic_font_name` varchar(50) DEFAULT 'Helvetica',
  `orderfm_font_size` float DEFAULT '14',
  PRIMARY KEY (`orderfm_id`),
  KEY `WDIDX1691098197189` (`orderfm_description`),
  KEY `WDIDX1691098197190` (`orderfm_email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `order_master`
--

DROP TABLE IF EXISTS `order_master`;
CREATE TABLE IF NOT EXISTS `order_master` (
  `orderm_id` bigint NOT NULL AUTO_INCREMENT,
  `orderm_order_no` varchar(9) NOT NULL DEFAULT '',
  `orderfm_id` bigint DEFAULT NULL,
  `orderm_date` datetime(3) DEFAULT NULL,
  `station_no` int UNSIGNED DEFAULT NULL,
  `branch_no` int UNSIGNED DEFAULT NULL,
  `opera_no` smallint UNSIGNED DEFAULT NULL,
  `orderm_date_created` datetime(3) DEFAULT NULL,
  `orderm_date_send` datetime(3) DEFAULT NULL,
  `orderm_email` varchar(128) DEFAULT NULL,
  `orderm_description` varchar(128) DEFAULT NULL,
  `orderm_alert_time` time DEFAULT NULL,
  `orderm_send` tinyint DEFAULT NULL,
  PRIMARY KEY (`orderm_id`),
  UNIQUE KEY `orderm_order_no` (`orderm_order_no`),
  UNIQUE KEY `orderm_key` (`branch_no`,`orderfm_id`,`orderm_date`),
  KEY `WDIDX1691098197191` (`orderfm_id`),
  KEY `WDIDX1691098197192` (`orderm_date`),
  KEY `WDIDX1691098197193` (`station_no`),
  KEY `WDIDX1691098197194` (`branch_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `part_lists`
--

DROP TABLE IF EXISTS `part_lists`;
CREATE TABLE IF NOT EXISTS `part_lists` (
  `partl_id` bigint NOT NULL AUTO_INCREMENT,
  `prod_no` bigint UNSIGNED DEFAULT NULL,
  `partl_line_no` int UNSIGNED DEFAULT '0',
  `partl_quantity` double DEFAULT '0',
  `prod_no_destination` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`partl_id`),
  KEY `WDIDX1691098197195` (`prod_no`),
  KEY `WDIDX1691098197196` (`partl_line_no`),
  KEY `partl_key` (`prod_no`,`partl_line_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `payment_types`
--

DROP TABLE IF EXISTS `payment_types`;
CREATE TABLE IF NOT EXISTS `payment_types` (
  `payt_id` bigint NOT NULL AUTO_INCREMENT,
  `branch_no` int UNSIGNED NOT NULL DEFAULT '0',
  `payt_type` smallint DEFAULT NULL,
  `payt_description` varchar(50) DEFAULT NULL,
  `payt_category_type` tinyint UNSIGNED DEFAULT NULL,
  `payt_object_accounts` int UNSIGNED DEFAULT '0',
  `payt_posting_text` varchar(50) DEFAULT NULL,
  `payt_posting_code` smallint UNSIGNED DEFAULT '0',
  `payt_cash` tinyint NOT NULL DEFAULT '1',
  `payt_collect_on_delivery` tinyint DEFAULT '0',
  PRIMARY KEY (`payt_id`),
  UNIQUE KEY `payt_key` (`branch_no`,`payt_type`),
  KEY `WDIDX1691098197197` (`branch_no`),
  KEY `WDIDX1691098197198` (`payt_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `permissions`
--

DROP TABLE IF EXISTS `permissions`;
CREATE TABLE IF NOT EXISTS `permissions` (
  `perm_id` bigint NOT NULL AUTO_INCREMENT,
  `perm_no` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `perm_description` varchar(35) DEFAULT NULL,
  `perm_composite_no_description` varchar(50) DEFAULT NULL,
  `perm_admin` tinyint DEFAULT '1',
  `perm_change_permissions` tinyint DEFAULT '1',
  `perm_reporter` tinyint DEFAULT '1',
  `perm_mobile_app` tinyint DEFAULT '1',
  `perm_add_products_on_pos` tinyint DEFAULT '1',
  `perm_add_customers_on_pos` tinyint DEFAULT '1',
  `perm_ownconsumption` tinyint DEFAULT '1',
  `perm_rejects` tinyint DEFAULT '1',
  `perm_personnel_sales` tinyint DEFAULT '1',
  `perm_orders` tinyint DEFAULT '1',
  `perm_returns` tinyint DEFAULT '1',
  `perm_rotten_food` tinyint DEFAULT '1',
  `perm_standing_orders` tinyint DEFAULT '1',
  `perm_goods_receipt` tinyint DEFAULT '0',
  `perm_cancel_a_slip` tinyint DEFAULT '1',
  `perm_cancel_a_product` tinyint DEFAULT '1',
  `perm_cancel_a_slip_line` tinyint DEFAULT '1',
  `perm_pos_final_report` tinyint DEFAULT '1',
  `perm_product_group_journal` tinyint DEFAULT '1',
  `perm_product_journal` tinyint DEFAULT '1',
  `perm_entry_change` tinyint DEFAULT '1',
  `perm_operator_payroll` tinyint DEFAULT '1',
  `perm_cash_counting` tinyint DEFAULT '1',
  `perm_cash_counting_differences` tinyint DEFAULT '1',
  `perm_pos_sales` tinyint DEFAULT '1',
  `perm_inventory_postings` tinyint DEFAULT '1',
  `perm_warehouse_booking` tinyint DEFAULT '1',
  `perm_stock_status_printing` tinyint DEFAULT '1',
  `perm_stock_movement_printing` tinyint DEFAULT '1',
  `perm_see_stock_locations` tinyint DEFAULT '1',
  `perm_store_warehouse_transfer` tinyint DEFAULT '1',
  `perm_cash_withdrawals` tinyint DEFAULT '1',
  `perm_cash_deposits` tinyint DEFAULT '1',
  `perm_voucher_sale` tinyint DEFAULT '1',
  `perm_voucher_create` tinyint DEFAULT '1',
  `perm_inventory` tinyint DEFAULT '1',
  `perm_switch_off_receipt_printing` tinyint DEFAULT '1',
  `perm_invoice_printing` tinyint DEFAULT '1',
  `perm_see_cancellation_information` tinyint DEFAULT '1',
  `perm_price_correction` tinyint DEFAULT '1',
  `perm_change_product_description` tinyint DEFAULT '1',
  `perm_receipt_discount` tinyint DEFAULT '1',
  `perm_product_single_discount` tinyint DEFAULT '1',
  `perm_open_cash_drawer` tinyint DEFAULT '1',
  `perm_waiters_assign_tables` tinyint DEFAULT '1',
  `perm_assign_billed_receipts_to_new_waiters` tinyint DEFAULT '1',
  `perm_time_recording_entry` tinyint DEFAULT '1',
  `perm_shelf_labelling_print` tinyint DEFAULT '1',
  `perm_label_print` tinyint DEFAULT '1',
  `perm_warehouse_authorization_list` varchar(120) DEFAULT NULL,
  PRIMARY KEY (`perm_id`),
  UNIQUE KEY `perm_no` (`perm_no`),
  KEY `WDIDX1691098197201` (`perm_composite_no_description`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `permission_elements`
--

DROP TABLE IF EXISTS `permission_elements`;
CREATE TABLE IF NOT EXISTS `permission_elements` (
  `perme_id` bigint NOT NULL AUTO_INCREMENT,
  `perm_no` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `perme_window_name` varchar(100) DEFAULT NULL,
  `perme_state` tinyint UNSIGNED DEFAULT '0',
  `perme_name` varchar(250) DEFAULT NULL,
  PRIMARY KEY (`perme_id`),
  UNIQUE KEY `perm_no` (`perm_no`),
  UNIQUE KEY `perme_key` (`perm_no`,`perme_name`),
  KEY `WDIDX1691098197199` (`perme_window_name`),
  KEY `WDIDX1691098197200` (`perme_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `phone_list`
--

DROP TABLE IF EXISTS `phone_list`;
CREATE TABLE IF NOT EXISTS `phone_list` (
  `phonel_id` bigint NOT NULL AUTO_INCREMENT,
  `phonel_guid` varchar(32) DEFAULT NULL,
  `phonel_time` bigint UNSIGNED DEFAULT NULL,
  `phonel_date_time` datetime(3) DEFAULT NULL,
  `phonel_ok` tinyint DEFAULT '0',
  `phonel_phone_number` varchar(50) DEFAULT NULL,
  `salesm_guid` varchar(32) DEFAULT NULL,
  `cust_no` int UNSIGNED DEFAULT NULL,
  PRIMARY KEY (`phonel_id`),
  KEY `WDIDX1691098197202` (`phonel_guid`),
  KEY `WDIDX1691098197203` (`phonel_time`),
  KEY `WDIDX1691098197204` (`phonel_date_time`),
  KEY `WDIDX1691098197205` (`phonel_ok`),
  KEY `WDIDX1691098197206` (`phonel_phone_number`),
  KEY `WDIDX1691098197207` (`salesm_guid`),
  KEY `WDIDX1691098197208` (`cust_no`),
  KEY `phonel_key` (`phonel_guid`,`phonel_date_time`),
  KEY `phonel_key_2` (`phonel_guid`,`phonel_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `postcodes`
--

DROP TABLE IF EXISTS `postcodes`;
CREATE TABLE IF NOT EXISTS `postcodes` (
  `postc_id` bigint NOT NULL AUTO_INCREMENT,
  `count_no` varchar(2) NOT NULL DEFAULT '',
  `postc_no` varchar(8) DEFAULT NULL,
  `postc_city` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`postc_id`),
  UNIQUE KEY `postc_key` (`postc_no`,`postc_city`),
  KEY `WDIDX1691098198232` (`count_no`),
  KEY `WDIDX1691098198233` (`postc_no`),
  KEY `WDIDX1691098198234` (`postc_city`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `pos_keyboard_buttons`
--

DROP TABLE IF EXISTS `pos_keyboard_buttons`;
CREATE TABLE IF NOT EXISTS `pos_keyboard_buttons` (
  `posb_id` bigint NOT NULL AUTO_INCREMENT,
  `posb_no` int NOT NULL DEFAULT '0',
  `posb_description` varchar(50) DEFAULT 'Standard',
  `posb_image` longblob,
  `posb_image_mask` longblob,
  `posb_display_type` tinyint UNSIGNED DEFAULT '1',
  `posb_inner_color` tinyint UNSIGNED DEFAULT '1',
  `posb_destination_color_top` int UNSIGNED DEFAULT '16777215',
  `posb_destination_color_bottom` int UNSIGNED DEFAULT '16777215',
  `posb_destination_color_hoover` int UNSIGNED DEFAULT '16777215',
  `posb_destination_color_disabled` int UNSIGNED DEFAULT '16777215',
  `posb_reverse_color` tinyint DEFAULT '1',
  `posb_border_x` tinyint UNSIGNED DEFAULT '1',
  `posb_border_y` tinyint UNSIGNED DEFAULT '1',
  `posb_caption_x` tinyint UNSIGNED DEFAULT '2',
  `posb_caption_y` tinyint UNSIGNED DEFAULT '2',
  `posb_width` smallint UNSIGNED DEFAULT '1',
  `posb_height` smallint UNSIGNED DEFAULT '1',
  `posb_border_color_x` tinyint UNSIGNED DEFAULT '1',
  `posb_border_color_y` tinyint UNSIGNED DEFAULT '1',
  `posb_shape_type` tinyint UNSIGNED DEFAULT '1',
  `posb_roundness` tinyint UNSIGNED DEFAULT '1',
  `posb_gap_x` smallint DEFAULT '2',
  `posb_gap_y` smallint DEFAULT '2',
  `posb_info_x` smallint DEFAULT '127',
  `posb_info_y` smallint DEFAULT '88',
  `posb_stock_x` smallint DEFAULT '2',
  `posb_stock_y` smallint DEFAULT '3',
  `posb_price_x` smallint DEFAULT '0',
  `posb_price_y` smallint DEFAULT '0',
  `posb_prod_no_x` smallint DEFAULT '0',
  `posb_prod_no_y` smallint DEFAULT '0',
  PRIMARY KEY (`posb_id`),
  UNIQUE KEY `posb_no` (`posb_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `pos_keyboard_copy_lists`
--

DROP TABLE IF EXISTS `pos_keyboard_copy_lists`;
CREATE TABLE IF NOT EXISTS `pos_keyboard_copy_lists` (
  `posc_id` bigint NOT NULL AUTO_INCREMENT,
  `posc_source_station_no` tinyint UNSIGNED DEFAULT NULL,
  `posc_source_layout_no` smallint UNSIGNED DEFAULT NULL,
  `posc_destination_station_no` tinyint UNSIGNED DEFAULT NULL,
  `posc_destination_layout_no` smallint UNSIGNED DEFAULT NULL,
  `posc_new_description` varchar(60) DEFAULT NULL,
  PRIMARY KEY (`posc_id`),
  KEY `WDIDX1691098197209` (`posc_source_station_no`),
  KEY `WDIDX1691098197210` (`posc_source_layout_no`),
  KEY `WDIDX1691098197211` (`posc_destination_station_no`),
  KEY `WDIDX1691098197212` (`posc_destination_layout_no`),
  KEY `posc_key_source` (`posc_source_station_no`,`posc_source_layout_no`),
  KEY `posc_key_destination` (`posc_destination_station_no`,`posc_destination_layout_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `pos_keyboard_details`
--

DROP TABLE IF EXISTS `pos_keyboard_details`;
CREATE TABLE IF NOT EXISTS `pos_keyboard_details` (
  `poskd_id` bigint NOT NULL AUTO_INCREMENT,
  `station_no` int UNSIGNED DEFAULT NULL,
  `poskm_no` smallint UNSIGNED DEFAULT NULL,
  `poskd_type` int DEFAULT NULL,
  `poskd_prod_group` int DEFAULT NULL,
  `poskd_no` int UNSIGNED NOT NULL DEFAULT '0',
  `poskd_height` float DEFAULT '1',
  `poskd_width` float NOT NULL DEFAULT '1',
  `poskd_program` varchar(255) DEFAULT NULL,
  `poskd_description` longtext,
  `prod_no` bigint UNSIGNED DEFAULT NULL,
  `prodg_no` int DEFAULT '0',
  `poskd_background_color` int UNSIGNED DEFAULT '0',
  `poskd_font_color` int UNSIGNED DEFAULT '0',
  `poskd_enabled` tinyint NOT NULL DEFAULT '1',
  `poskd_image` longblob,
  `poskd_image_file_name` varchar(50) DEFAULT NULL,
  `poskd_invisible` tinyint NOT NULL DEFAULT '0',
  `poskd_font_name` varchar(50) DEFAULT 'Arial',
  `poskd_font_size` float DEFAULT '8',
  `poskd_font_bold` tinyint DEFAULT '0',
  `poskd_font_italic` tinyint DEFAULT '0',
  `poskd_font_underlined` tinyint DEFAULT '0',
  `poskd_use_font` tinyint DEFAULT '0',
  `poskd_stock` float DEFAULT '0',
  `poskd_stock_entry_date_time` datetime(3) DEFAULT NULL,
  `poskd_stock_enable` tinyint DEFAULT '1',
  `posb_no` int DEFAULT '0',
  `poskd_enabled_date_from` datetime(3) DEFAULT NULL,
  `poskd_enabled_date_to` datetime(3) DEFAULT NULL,
  `poskd_enabled_weekday_1` tinyint DEFAULT '0',
  `poskd_enabled_weekday_2` tinyint DEFAULT '0',
  `poskd_enabled_weekday_3` tinyint DEFAULT '0',
  `poskd_enabled_weekday_4` tinyint DEFAULT '0',
  `poskd_enabled_weekday_5` tinyint DEFAULT '0',
  `poskd_enabled_weekday_6` tinyint DEFAULT '0',
  `poskd_enabled_weekday_7` tinyint DEFAULT '0',
  `poskd_each_day_process` tinyint DEFAULT '0',
  `poskd_image_full_size` tinyint DEFAULT '0',
  `poskd_font_posistion_type` tinyint UNSIGNED DEFAULT '0',
  `poskd_font_posistion_y` smallint UNSIGNED DEFAULT '0',
  `poskd_keyboard_code` varchar(2) DEFAULT NULL,
  `poskd_keyboard_shift` tinyint DEFAULT '0',
  `poskd_keyboard_ctrl` tinyint DEFAULT '0',
  `poskd_keyboard_alt` tinyint DEFAULT '0',
  PRIMARY KEY (`poskd_id`),
  UNIQUE KEY `poskd_key` (`station_no`,`poskm_no`,`poskd_type`,`poskd_prod_group`,`poskd_no`),
  KEY `WDIDX1691098198213` (`station_no`),
  KEY `WDIDX1691098198214` (`poskm_no`),
  KEY `WDIDX1691098198215` (`poskd_type`),
  KEY `WDIDX1691098198216` (`poskd_prod_group`),
  KEY `WDIDX1691098198217` (`prod_no`),
  KEY `WDIDX1691098198218` (`prodg_no`),
  KEY `WDIDX1691098198219` (`posb_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `pos_keyboard_dialog_details`
--

DROP TABLE IF EXISTS `pos_keyboard_dialog_details`;
CREATE TABLE IF NOT EXISTS `pos_keyboard_dialog_details` (
  `poskdd_id` bigint NOT NULL AUTO_INCREMENT,
  `station_no` int UNSIGNED DEFAULT NULL,
  `poskm_no` smallint UNSIGNED DEFAULT NULL,
  `poskdm_no` int UNSIGNED DEFAULT NULL,
  `poskdd_page_no` smallint UNSIGNED DEFAULT NULL,
  `poskdd_no` int UNSIGNED DEFAULT NULL,
  `poskdd_program` varchar(255) DEFAULT NULL,
  `poskdd_description` varchar(64) DEFAULT NULL,
  `prod_no` bigint UNSIGNED DEFAULT NULL,
  `poskdd_background_color` int UNSIGNED DEFAULT '0',
  `poskdd_font_color` int UNSIGNED DEFAULT '0',
  `poskdd_enabled` tinyint NOT NULL DEFAULT '1',
  `poskdd_visible` tinyint NOT NULL DEFAULT '1',
  `poskdd_image` longblob,
  `poskdd_image_file_name` varchar(50) DEFAULT NULL,
  `poskdd_use_font` tinyint DEFAULT '0',
  `poskdd_font_name` varchar(50) DEFAULT 'Arial',
  `poskdd_font_size` float DEFAULT '12',
  `poskdd_font_bold` tinyint DEFAULT '1',
  `poskdd_font_italic` tinyint DEFAULT '0',
  `poskdd_font_underlined` tinyint DEFAULT '0',
  `poskdd_x` smallint UNSIGNED DEFAULT '0',
  `poskdd_y` smallint UNSIGNED DEFAULT '0',
  `poskdd_width` smallint UNSIGNED DEFAULT '0',
  `poskdd_height` smallint UNSIGNED DEFAULT '0',
  PRIMARY KEY (`poskdd_id`),
  UNIQUE KEY `poskdd_key_page` (`station_no`,`poskm_no`,`poskdm_no`,`poskdd_page_no`,`poskdd_no`),
  KEY `WDIDX1691098198220` (`station_no`),
  KEY `WDIDX1691098198221` (`poskm_no`),
  KEY `WDIDX1691098198222` (`poskdm_no`),
  KEY `WDIDX1691098198223` (`poskdd_page_no`),
  KEY `WDIDX1691098198224` (`poskdd_no`),
  KEY `WDIDX1691098198225` (`prod_no`),
  KEY `poskdd_key` (`station_no`,`poskm_no`,`poskdm_no`,`poskdd_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `pos_keyboard_dialog_master`
--

DROP TABLE IF EXISTS `pos_keyboard_dialog_master`;
CREATE TABLE IF NOT EXISTS `pos_keyboard_dialog_master` (
  `poskdm_id` bigint NOT NULL AUTO_INCREMENT,
  `station_no` int UNSIGNED DEFAULT NULL,
  `poskm_no` smallint UNSIGNED DEFAULT NULL,
  `poskdm_no` int UNSIGNED DEFAULT NULL,
  `poskdm_description` varchar(50) DEFAULT NULL,
  `poskdm_y` smallint UNSIGNED DEFAULT '0',
  `poskdm_x` smallint UNSIGNED DEFAULT '0',
  `poskdm_font_name` varchar(50) DEFAULT 'Arial',
  `poskdm_font_size` float DEFAULT '8',
  `poskdm_font_bold` tinyint DEFAULT '0',
  `poskdm_font_italic` tinyint DEFAULT '0',
  `poskdm_font_underline` tinyint DEFAULT '0',
  `poskdm_operator_logoff` tinyint DEFAULT '0',
  `poskdm_program_type` tinyint UNSIGNED DEFAULT '1',
  PRIMARY KEY (`poskdm_id`),
  UNIQUE KEY `poskdm_key_dialog_no` (`station_no`,`poskm_no`,`poskdm_no`),
  KEY `WDIDX1691098198226` (`station_no`),
  KEY `WDIDX1691098198227` (`poskm_no`),
  KEY `WDIDX1691098198228` (`poskdm_no`),
  KEY `poskdm_key` (`station_no`,`poskm_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `pos_keyboard_master`
--

DROP TABLE IF EXISTS `pos_keyboard_master`;
CREATE TABLE IF NOT EXISTS `pos_keyboard_master` (
  `poskm_id` bigint NOT NULL AUTO_INCREMENT,
  `station_no` int UNSIGNED DEFAULT NULL,
  `poskm_no` smallint UNSIGNED DEFAULT NULL,
  `selm_no` int UNSIGNED DEFAULT NULL,
  `poskm_description` varchar(50) DEFAULT 'Tastaturlayout',
  `poskm_background_image` longblob,
  `poskm_products_style` smallint UNSIGNED DEFAULT '1',
  `poskm_product_main_groups_style` smallint UNSIGNED DEFAULT '1',
  `poskm_product_groups_style` smallint UNSIGNED DEFAULT '1',
  `poskm_display_main_groups_instead_of_product_groups` tinyint DEFAULT '0',
  `poskm_numeric_keypad_style` smallint UNSIGNED DEFAULT '1',
  `poskm_quick_access_keys_style` smallint UNSIGNED DEFAULT '1',
  `poskm_hide_quick_access_keys` tinyint DEFAULT '0',
  `poskm_slip_table_style` smallint UNSIGNED DEFAULT '1',
  `poskm_display_keys_style` smallint UNSIGNED DEFAULT '1',
  `poskm_command_keys_style` smallint UNSIGNED DEFAULT '1',
  `poskm_key_count_x` smallint UNSIGNED DEFAULT '12',
  `poskm_key_count_y` smallint UNSIGNED DEFAULT '13',
  `poskm_physical_pos_width` smallint UNSIGNED DEFAULT '0',
  `poskm_physical_pos_height` smallint UNSIGNED DEFAULT '0',
  `poskm_product_keys_left` tinyint UNSIGNED DEFAULT '1',
  `poskm_product_keys_top_` tinyint UNSIGNED DEFAULT '2',
  `poskm_product_keys_width` tinyint UNSIGNED DEFAULT '8',
  `poskm_product_keys_height` tinyint UNSIGNED DEFAULT '10',
  `poskm_product_keys_new_inner_dimensions` tinyint DEFAULT '1',
  `poskm_product_keys_new_width` tinyint UNSIGNED DEFAULT '6',
  `poskm_product_keys_new_height` tinyint UNSIGNED DEFAULT '7',
  `poskm_product_keys_font_name` varchar(50) DEFAULT 'Arial',
  `poskm_product_keys_font_size` float DEFAULT '12',
  `poskm_product_keys_font_bold` tinyint DEFAULT '1',
  `poskm_product_keys_font_italic` tinyint DEFAULT '0',
  `poskm_product_keys_font_underlined` tinyint DEFAULT '0',
  `poskm_product_keys_more_color` int DEFAULT '13290441',
  `poskm_product_keys_back_image` longblob,
  `poskm_product_keys_next_image` longblob,
  `poskm_product_keys_price_display` tinyint UNSIGNED DEFAULT '1',
  `poskm_product_keys_price_image` longblob,
  `poskm_product_keys_price_font_name` varchar(50) DEFAULT 'Arial',
  `poskm_product_keys_price_font_size` float DEFAULT '12',
  `poskm_product_keys_price_font_bold` tinyint DEFAULT '0',
  `poskm_product_keys_price_font_underlined` tinyint DEFAULT '0',
  `poskm_product_keys_price_font_italic` tinyint DEFAULT '0',
  `poskm_product_keys_price_delimiter_before` varchar(50) DEFAULT NULL,
  `poskm_product_keys_price_delimiter_after` varchar(50) DEFAULT NULL,
  `poskm_product_keys_prod_no_display` tinyint DEFAULT '0',
  `poskm_product_keys_prod_no_image` longblob,
  `poskm_product_keys_prod_no_pos_on_key` tinyint UNSIGNED DEFAULT '0',
  `poskm_product_keys_prod_no_font_color` int DEFAULT '0',
  `poskm_product_keys_prod_no_font_name` varchar(50) DEFAULT '',
  `poskm_product_keys_prod_no_font_size` float DEFAULT '0',
  `poskm_product_keys_prod_no_font_bold` tinyint DEFAULT '0',
  `poskm_product_keys_prod_no_font_underlined` tinyint DEFAULT '0',
  `poskm_product_keys_prod_no_font_italic` tinyint DEFAULT '0',
  `poskm_keypad_x` tinyint UNSIGNED DEFAULT '9',
  `poskm_keypad_y` tinyint UNSIGNED DEFAULT '7',
  `poskm_keypad_width` tinyint UNSIGNED DEFAULT '4',
  `poskm_keypad_height` tinyint UNSIGNED DEFAULT '5',
  `poskm_keypad_override` tinyint NOT NULL DEFAULT '1',
  `poskm_keypad_new_width` tinyint UNSIGNED DEFAULT '5',
  `poskm_keypad_new_height` tinyint UNSIGNED DEFAULT '5',
  `poskm_keypad_font_name` varchar(50) DEFAULT 'Arial',
  `poskm_keypad_font_size` float DEFAULT '24',
  `poskm_keypad_font_bold` tinyint DEFAULT '1',
  `poskm_keypad_font_italic` tinyint DEFAULT '0',
  `poskm_keypad_font_underlined` tinyint DEFAULT '0',
  `poskm_slip_table_x` tinyint UNSIGNED DEFAULT '9',
  `poskm_slip_table_y` tinyint UNSIGNED DEFAULT '2',
  `poskm_slip_table_width` tinyint UNSIGNED DEFAULT '4',
  `poskm_slip_table_height` tinyint UNSIGNED DEFAULT '5',
  `poskm_info_x` tinyint UNSIGNED DEFAULT '1',
  `poskm_info_y` tinyint UNSIGNED DEFAULT '1',
  `poskm_info_width` tinyint UNSIGNED DEFAULT '12',
  `poskm_info_height` tinyint UNSIGNED DEFAULT '1',
  `poskm_info_font_name` varchar(50) DEFAULT 'Arial',
  `poskm_info_font_size` float DEFAULT '11',
  `poskm_info_font_bold` tinyint DEFAULT '1',
  `poskm_info_font_italic` tinyint DEFAULT '0',
  `poskm_info_font_underlined` tinyint DEFAULT '0',
  `poskm_prod_group_x` tinyint UNSIGNED DEFAULT '2',
  `poskm_prod_group_y` tinyint UNSIGNED DEFAULT '12',
  `poskm_prod_group_width` tinyint UNSIGNED DEFAULT '11',
  `poskm_prod_group_height` tinyint UNSIGNED DEFAULT '1',
  `poskm_prod_group_font_name` varchar(50) DEFAULT 'Arial',
  `poskm_prod_group_font_size` float DEFAULT '11',
  `poskm_prod_group_font_bold` tinyint DEFAULT '1',
  `poskm_prod_group_font_italic` tinyint DEFAULT '0',
  `poskm_prod_group_font_underlined` tinyint DEFAULT '0',
  `poskm_prod_group_more_background_color` int DEFAULT '13290441',
  `poskm_prod_group_more_previous_image` longblob,
  `poskm_prod_group_more_next_image` longblob,
  `poskm_functions_x` tinyint UNSIGNED DEFAULT '1',
  `poskm_functions_y` tinyint UNSIGNED DEFAULT '13',
  `poskm_functions_width` tinyint UNSIGNED DEFAULT '12',
  `poskm_functions_height` tinyint UNSIGNED DEFAULT '1',
  `poskm_functions_more_background_color` int DEFAULT '13290441',
  `poskm_functions_more_previous_image` longblob,
  `poskm_functions_more_next_image` longblob,
  `poskm_functions_font_name` varchar(50) DEFAULT 'Arial',
  `poskm_functions_font_size` float DEFAULT '11',
  `poskm_functions_font_bold` tinyint DEFAULT '1',
  `poskm_functions_font_italic` tinyint DEFAULT '0',
  `poskm_functions_font_underlined` tinyint DEFAULT '0',
  `poskm_common_used_products_x` tinyint UNSIGNED DEFAULT '1',
  `poskm_common_used_products_y` tinyint UNSIGNED DEFAULT '12',
  `poskm_common_used_products_width` tinyint UNSIGNED DEFAULT '1',
  `poskm_common_used_products_height` tinyint UNSIGNED DEFAULT '1',
  `poskm_slip_table_font_size` float DEFAULT '8',
  `poskm_entry_controls_font_name` varchar(50) DEFAULT 'Verdana',
  `poskm_entry_controls_font_size` float DEFAULT '18',
  `poskm_entry_controls_font_bold` tinyint DEFAULT '1',
  `poskm_entry_controls_font_italic` tinyint DEFAULT '0',
  `poskm_entry_controls_font_underlined` tinyint DEFAULT '0',
  `poskm_entry_controls_column` tinyint UNSIGNED DEFAULT '4',
  `poskm_slip_table_content_1` tinyint UNSIGNED DEFAULT '1',
  `poskm_slip_table_content_2` tinyint UNSIGNED DEFAULT '2',
  `poskm_slip_table_content_3` tinyint UNSIGNED DEFAULT '3',
  `poskm_slip_table_content_4` tinyint UNSIGNED DEFAULT '4',
  `poskm_slip_table_content_5` tinyint UNSIGNED DEFAULT '5',
  `poskm_slip_table_content_6` tinyint UNSIGNED DEFAULT '6',
  `poskm_slip_table_width_in_percent_1` float DEFAULT '10',
  `poskm_slip_table_width_in_percent_2` float DEFAULT '50',
  `poskm_slip_table_width_in_percent_3` float DEFAULT '20',
  `poskm_slip_table_width_in_percent_4` float DEFAULT '20',
  `poskm_slip_table_width_in_percent_5` float DEFAULT '0',
  `poskm_slip_table_width_in_percent_6` float DEFAULT '0',
  `poskm_slip_table_description_1_german` varchar(20) NOT NULL DEFAULT 'Stk',
  `poskm_slip_table_description_2_german` varchar(20) NOT NULL DEFAULT 'Bezeichnung',
  `poskm_slip_table_description_3_german` varchar(20) NOT NULL DEFAULT 'Preis',
  `poskm_slip_table_description_4_german` varchar(20) NOT NULL DEFAULT 'Summe',
  `poskm_slip_table_description_5_german` varchar(20) NOT NULL DEFAULT 'Rab%',
  `poskm_slip_table_description_6_german` varchar(20) NOT NULL DEFAULT 'Art-Nr',
  `poskm_slip_table_description_1_english` varchar(20) NOT NULL DEFAULT 'Amount',
  `poskm_slip_table_description_2_english` varchar(20) NOT NULL DEFAULT 'Description',
  `poskm_slip_table_description_3_english` varchar(20) NOT NULL DEFAULT 'Value',
  `poskm_slip_table_description_4_english` varchar(20) NOT NULL DEFAULT 'Sum',
  `poskm_slip_table_description_5_english` varchar(20) NOT NULL DEFAULT 'Reb%',
  `poskm_slip_table_description_6_english` varchar(20) NOT NULL DEFAULT 'Prod-No.',
  `poskm_slip_table_display_scrollbar` tinyint NOT NULL DEFAULT '0',
  `poskm_vice_pos_pole_payment_display` tinyint NOT NULL DEFAULT '1',
  `poskm_vice_pos_pole_payment_image` longblob,
  `poskm_vice_pos_pole_atm_payment_image` longblob,
  `poskm_vice_pos_pole_bluecode_payment_` longblob,
  `poskm_vice_pos_pole_payment_display_total` tinyint NOT NULL DEFAULT '1',
  `poskm_vice_pos_pole_payment_display_given` tinyint NOT NULL DEFAULT '1',
  `poskm_vice_pos_pole_payment_change_display` tinyint NOT NULL DEFAULT '1',
  `poskm_vice_pos_pole_payment_total_x` smallint UNSIGNED NOT NULL DEFAULT '750',
  `poskm_vice_pos_pole_payment_total_y` smallint UNSIGNED NOT NULL DEFAULT '248',
  `poskm_vice_pos_pole_payment_total_font_name` varchar(50) NOT NULL DEFAULT 'Arial',
  `poskm_vice_pos_pole_payment_total_font_size` float NOT NULL DEFAULT '48',
  `poskm_vice_pos_pole_payment_total_font_bold` tinyint NOT NULL DEFAULT '1',
  `poskm_vice_pos_pole_payment_total_font_color` int UNSIGNED NOT NULL DEFAULT '16777215',
  `poskm_vice_pos_pole_payment_given_x` smallint UNSIGNED NOT NULL DEFAULT '750',
  `poskm_vice_pos_pole_payment_given_y` smallint UNSIGNED NOT NULL DEFAULT '348',
  `poskm_vice_pos_pole_payment_given_font_name` varchar(50) NOT NULL DEFAULT 'Arial',
  `poskm_vice_pos_pole_payment_given_font_size` float NOT NULL DEFAULT '48',
  `poskm_vice_pos_pole_payment_given_font_bold` tinyint NOT NULL DEFAULT '1',
  `poskm_vice_pos_pole_payment_given_font_color` int UNSIGNED NOT NULL DEFAULT '16777215',
  `poskm_vice_pos_pole_payment_change_x` smallint UNSIGNED NOT NULL DEFAULT '750',
  `poskm_vice_pos_pole_payment_change_y` smallint UNSIGNED NOT NULL DEFAULT '448',
  `poskm_vice_pos_pole_payment_change_font_name` varchar(50) NOT NULL DEFAULT 'Arial',
  `poskm_vice_pos_pole_payment_change_font_size` float NOT NULL DEFAULT '48',
  `poskm_vice_pos_pole_payment_change_font_bold` tinyint NOT NULL DEFAULT '1',
  `poskm_vice_pos_pole_payment_change_font_color` int UNSIGNED NOT NULL DEFAULT '16777215',
  `poskm_round_the_clock_product_browse` tinyint DEFAULT '1',
  `poskm_product_display_page_no` tinyint UNSIGNED DEFAULT '1',
  `poskm_keyboard_stock_ok_image` longblob,
  `poskm_keyboard_stock_warning_image` longblob,
  `poskm_keyboard_stock_zero_image` longblob,
  `poskm_stock_ok_image` longblob,
  `poskm_stock_stock_warning_image` longblob,
  `poskm_stock_stock_zero_image` longblob,
  `poskm_stock_font_name` varchar(50) DEFAULT 'Arial',
  `poskm_stock_font_size` float DEFAULT '8',
  `poskm_stock_font_bold` tinyint DEFAULT '1',
  `poskm_stock_font_underlined` tinyint DEFAULT '0',
  `poskm_stock_font_italic` tinyint DEFAULT '0',
  `poskm_stock_ok_font_color` int UNSIGNED DEFAULT '16777215',
  `poskm_stock_warning_font_color` int UNSIGNED DEFAULT '16777215',
  `poskm_stock_zero_font_color` int UNSIGNED DEFAULT '0',
  `poskm_stock_image_width` smallint UNSIGNED DEFAULT '60',
  `poskm_stock_image_height` smallint UNSIGNED DEFAULT '20',
  `poskm_stock_display_zero` tinyint DEFAULT '1',
  `poskm_vice_pos_pole_running_total_display` tinyint DEFAULT '1',
  `poskm_vice_pos_pole_running_total_x` smallint UNSIGNED NOT NULL DEFAULT '170',
  `poskm_vice_pos_pole_running_total_y` smallint UNSIGNED NOT NULL DEFAULT '18',
  `poskm_vice_pos_pole_running_total_font_name` varchar(50) NOT NULL DEFAULT 'Arial',
  `poskm_vice_pos_pole_running_total_font_size` float NOT NULL DEFAULT '38',
  `poskm_vice_pos_pole_running_total_bold` tinyint NOT NULL DEFAULT '1',
  `poskm_vice_pos_pole_running_total_underlined` tinyint NOT NULL DEFAULT '0',
  `poskm_vice_pos_pole_running_total_italic` tinyint NOT NULL DEFAULT '0',
  `poskm_vice_pos_pole_running_total_color` int UNSIGNED NOT NULL DEFAULT '0',
  `poskm_vice_pos_pole_running_total_image` longblob,
  `poskm_vice_pos_pole_running_products_x` smallint UNSIGNED NOT NULL DEFAULT '20',
  `poskm_vice_pos_pole_running_products_y` smallint UNSIGNED NOT NULL DEFAULT '110',
  `poskm_vice_pos_pole_running_products_font_name` varchar(50) NOT NULL DEFAULT 'Arial',
  `poskm_vice_pos_pole_running_products_font_size` float NOT NULL DEFAULT '32',
  `poskm_vice_pos_pole_running_products_font_bold` tinyint NOT NULL DEFAULT '1',
  `poskm_vice_pos_pole_running_products_font_underlined` tinyint NOT NULL DEFAULT '0',
  `poskm_vice_pos_pole_running_products_italic` tinyint NOT NULL DEFAULT '0',
  `poskm_vice_pos_pole_running_products_font_color` int UNSIGNED NOT NULL DEFAULT '0',
  `poskm_vice_pos_pole_running_products_line_spacing` smallint UNSIGNED NOT NULL DEFAULT '34',
  `poskm_vice_pos_pole_running_products_lines_count` tinyint UNSIGNED NOT NULL DEFAULT '13',
  `poskm_vice_pos_pole_running_products_pixel_width` smallint UNSIGNED DEFAULT '340',
  `poskm_vice_pos_pole_running_quantity_pixel_width` smallint UNSIGNED DEFAULT '130',
  `poskm_vice_pos_pole_running_price_pixel_width` smallint UNSIGNED DEFAULT '130',
  `poskm_vice_pos_pole_product_display` tinyint DEFAULT '0',
  `poskm_vice_pos_pole_product_x` smallint UNSIGNED DEFAULT '20',
  `poskm_vice_pos_pole_product_y` smallint UNSIGNED DEFAULT '685',
  `poskm_vice_pos_pole_product_font_name` varchar(50) DEFAULT 'Arial',
  `poskm_vice_pos_pole_product_font_size` float DEFAULT '38',
  `poskm_vice_pos_pole_product_font_bold` tinyint DEFAULT '1',
  `poskm_vice_pos_pole_product_font_underlined` tinyint DEFAULT '0',
  `poskm_vice_pos_pole_product_font_italic` tinyint DEFAULT '0',
  `poskm_vice_pos_pole_product_font_color` int UNSIGNED DEFAULT '0',
  `poskm_vice_pos_pole_product_image_display` tinyint DEFAULT '0',
  `poskm_vice_pos_pole_product_image_x` smallint UNSIGNED DEFAULT '0',
  `poskm_vice_pos_pole_product_image_y` smallint UNSIGNED DEFAULT '0',
  `poskm_vice_pos_pole_product_image_width` smallint UNSIGNED DEFAULT '0',
  `poskm_vice_pos_pole_product_image_height` smallint UNSIGNED DEFAULT '0',
  `poskm_vice_pos_pole_product_info_display` tinyint DEFAULT '0',
  `poskm_vice_pos_pole_product_info_x` smallint UNSIGNED DEFAULT '0',
  `poskm_vice_pos_pole_product_info_y` smallint UNSIGNED DEFAULT '0',
  `poskm_vice_pos_pole_product_info_width` smallint UNSIGNED DEFAULT '0',
  `poskm_vice_pos_pole_product_info_height` smallint UNSIGNED DEFAULT '0',
  `poskm_vice_pos_pole_product_info_font_name` varchar(50) DEFAULT 'Arial',
  `poskm_vice_pos_pole_product_info_font_size` float DEFAULT '0',
  `poskm_vice_pos_pole_product_info_font_bold` tinyint DEFAULT '0',
  `poskm_vice_pos_pole_product_info_font_underlined` tinyint DEFAULT '0',
  `poskm_vice_pos_pole_product_info_font_italic` tinyint DEFAULT '0',
  `poskm_vice_pos_pole_product_info_font_color` int UNSIGNED DEFAULT '0',
  PRIMARY KEY (`poskm_id`),
  UNIQUE KEY `poskm_key` (`station_no`,`poskm_no`),
  KEY `WDIDX1691098198229` (`station_no`),
  KEY `WDIDX1691098198230` (`poskm_no`),
  KEY `WDIDX1691098198231` (`selm_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `price_list_assignments`
--

DROP TABLE IF EXISTS `price_list_assignments`;
CREATE TABLE IF NOT EXISTS `price_list_assignments` (
  `pricea_id` bigint NOT NULL AUTO_INCREMENT,
  `cref_no` int UNSIGNED DEFAULT NULL,
  `pricea_base_pricem_no` int UNSIGNED DEFAULT NULL,
  `pricea_special_pricem_no` int UNSIGNED DEFAULT NULL,
  `pricea_description` longtext,
  `pricea_from_date` date DEFAULT NULL,
  `pricea_change_possible` tinyint DEFAULT '1',
  PRIMARY KEY (`pricea_id`),
  UNIQUE KEY `pricea_key` (`cref_no`,`pricea_from_date`),
  KEY `WDIDX1691098198235` (`cref_no`),
  KEY `WDIDX1691098198236` (`pricea_base_pricem_no`),
  KEY `WDIDX1691098198237` (`pricea_special_pricem_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `price_list_characteristic_details`
--

DROP TABLE IF EXISTS `price_list_characteristic_details`;
CREATE TABLE IF NOT EXISTS `price_list_characteristic_details` (
  `pricec_id` bigint NOT NULL AUTO_INCREMENT,
  `pricem_no` int UNSIGNED DEFAULT NULL,
  `prod_no` bigint UNSIGNED DEFAULT NULL,
  `prodc_guid` varchar(32) DEFAULT NULL,
  `pricec_price` decimal(24,6) DEFAULT '0.000000',
  `pricec_discount_locked` tinyint DEFAULT '0',
  `pricec_returns_limit` tinyint DEFAULT '0',
  `pricec_discount_percent` float DEFAULT '0',
  `pricec_print_zero_price` tinyint DEFAULT '0',
  `pricec_comission_discount` float DEFAULT '0',
  `pricec_comission_locked` tinyint DEFAULT '0',
  PRIMARY KEY (`pricec_id`),
  KEY `WDIDX1691098199238` (`pricem_no`),
  KEY `WDIDX1691098199239` (`prod_no`),
  KEY `WDIDX1691098199240` (`prodc_guid`),
  KEY `pricec_key` (`pricem_no`,`prod_no`,`prodc_guid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `price_list_details`
--

DROP TABLE IF EXISTS `price_list_details`;
CREATE TABLE IF NOT EXISTS `price_list_details` (
  `priced_id` bigint NOT NULL AUTO_INCREMENT,
  `pricem_no` int UNSIGNED DEFAULT NULL,
  `prod_no` bigint UNSIGNED DEFAULT NULL,
  `priced_price` decimal(24,6) DEFAULT '0.000000',
  `priced_discount_locked` tinyint DEFAULT '0',
  `priced_returns_limit` tinyint DEFAULT '1',
  `priced_discount_percent` float DEFAULT '0',
  `priced_print_zero_price` tinyint DEFAULT '0',
  `priced_comission_discount` float DEFAULT '0',
  `priced_comission_locked` tinyint DEFAULT '0',
  PRIMARY KEY (`priced_id`),
  UNIQUE KEY `priced_key` (`pricem_no`,`prod_no`),
  KEY `WDIDX1691098199241` (`pricem_no`),
  KEY `WDIDX1691098199242` (`prod_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `price_list_master`
--

DROP TABLE IF EXISTS `price_list_master`;
CREATE TABLE IF NOT EXISTS `price_list_master` (
  `pricem_id` bigint NOT NULL AUTO_INCREMENT,
  `pricem_no` int UNSIGNED NOT NULL DEFAULT '0',
  `pricem_composite_description_no` varchar(50) DEFAULT NULL,
  `pricem_description` longtext,
  `pricem_decimal_places` tinyint UNSIGNED DEFAULT '1',
  PRIMARY KEY (`pricem_id`),
  UNIQUE KEY `pricem_no` (`pricem_no`),
  KEY `WDIDX1691098199243` (`pricem_composite_description_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `printers`
--

DROP TABLE IF EXISTS `printers`;
CREATE TABLE IF NOT EXISTS `printers` (
  `printer_id` bigint NOT NULL AUTO_INCREMENT,
  `devicem_no` int DEFAULT NULL,
  `station_no` int UNSIGNED DEFAULT NULL,
  `printer_type` tinyint UNSIGNED DEFAULT NULL,
  `printer_connection_com_port` tinyint UNSIGNED DEFAULT '0',
  `printer_connection_parameter` varchar(50) DEFAULT NULL,
  `printer_use` tinyint DEFAULT '1',
  `printer_warn_paper_low` tinyint DEFAULT '1',
  `printer_com_parameter` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`printer_id`),
  UNIQUE KEY `printer_key` (`station_no`,`printer_type`),
  KEY `WDIDX1691098199244` (`devicem_no`),
  KEY `WDIDX1691098199245` (`station_no`),
  KEY `WDIDX1691098199246` (`printer_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `printer_types`
--

DROP TABLE IF EXISTS `printer_types`;
CREATE TABLE IF NOT EXISTS `printer_types` (
  `printert_id` bigint NOT NULL AUTO_INCREMENT,
  `printert_no` int DEFAULT '0',
  `printert_type` tinyint UNSIGNED DEFAULT NULL,
  `printert_description` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`printert_id`),
  UNIQUE KEY `printert_type` (`printert_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `producer`
--

DROP TABLE IF EXISTS `producer`;
CREATE TABLE IF NOT EXISTS `producer` (
  `produ_id` bigint NOT NULL AUTO_INCREMENT,
  `produ_no` int DEFAULT '0',
  `produ_description` varchar(50) DEFAULT '',
  PRIMARY KEY (`produ_id`),
  UNIQUE KEY `produ_no` (`produ_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `products`
--

DROP TABLE IF EXISTS `products`;
CREATE TABLE IF NOT EXISTS `products` (
  `prod_id` bigint NOT NULL AUTO_INCREMENT,
  `cours_no` smallint UNSIGNED DEFAULT NULL,
  `prod_no` bigint UNSIGNED NOT NULL DEFAULT '0',
  `prod_guid` varchar(32) DEFAULT NULL,
  `prod_composite_no_description` varchar(50) DEFAULT NULL,
  `prodg_no` int DEFAULT NULL,
  `prod_match_code` varchar(10) DEFAULT NULL,
  `prod_ean` varchar(14) DEFAULT NULL,
  `prod_description` longtext,
  `prod_description_pos` longtext,
  `prod_text` longtext,
  `vat_no` tinyint UNSIGNED DEFAULT NULL,
  `produ_no` int DEFAULT '0',
  `prod_production_type` tinyint UNSIGNED DEFAULT '1',
  `prod_properties` tinyint UNSIGNED DEFAULT '0',
  `prod_printer_type` tinyint UNSIGNED DEFAULT NULL,
  `prod_price_type` tinyint UNSIGNED DEFAULT '1',
  `shop_id` bigint DEFAULT NULL,
  `prod_shop_mapping` tinyint UNSIGNED DEFAULT '0',
  `prod_allow_split_amount` tinyint DEFAULT '0',
  `prod_negative_price` tinyint DEFAULT '0',
  `prod_frequency_product` tinyint DEFAULT '1',
  `prod_discount_lock` tinyint DEFAULT '0',
  `prod_change_description_allowed` tinyint DEFAULT '0',
  `prod_operator_commission_allowed` tinyint DEFAULT '1',
  `prod_print_main_menu_product` tinyint DEFAULT '1',
  `prod_calculate_menu_price` tinyint DEFAULT '1',
  `prod_print_menu_price_but_no_calculation` tinyint DEFAULT '0',
  `prod_print_product_on_kitchen_order` tinyint DEFAULT '1',
  `prod_print_product_on_receipt` tinyint DEFAULT '1',
  `revenuea_no` int UNSIGNED DEFAULT NULL,
  `prod_storable` tinyint DEFAULT '1',
  `prod_stock_duration` int UNSIGNED DEFAULT '0',
  `prod_allow_negative_inventory` tinyint DEFAULT '1',
  `commg_no` smallint UNSIGNED DEFAULT NULL,
  `prod_barcode_scales_item` tinyint DEFAULT '0',
  `prod_bar_items` tinyint DEFAULT '0',
  `prod_minors_protection` tinyint UNSIGNED DEFAULT '1',
  `prod_scale_item` tinyint DEFAULT '0',
  `prod_scale_item_tare` double DEFAULT '0',
  `prod_season_item` tinyint UNSIGNED DEFAULT '0',
  `prod_kitchen_order_group` varchar(10) DEFAULT NULL,
  `prod_table_or_kitchen_receipt_description` longtext,
  `prod_sub_article` tinyint DEFAULT '0',
  `sup_no` int UNSIGNED DEFAULT NULL,
  `prod_property_ean_type` tinyint UNSIGNED DEFAULT NULL,
  `prod_property_composition` varchar(50) DEFAULT NULL,
  `prod_last_purchase_price` decimal(24,6) DEFAULT '0.000000',
  `prod_average_purchase_price` decimal(24,6) DEFAULT '0.000000',
  `prod_allergens` varchar(26) DEFAULT NULL,
  `unit_no` smallint UNSIGNED DEFAULT NULL,
  `prod_unit_per_piece` decimal(24,6) DEFAULT '0.000000',
  `prod_adding_stock_units_instead_of_quantity` tinyint DEFAULT '0',
  `prod_convert_to_quantity` decimal(24,6) DEFAULT '0.000000',
  `prod_entry_group_for_export_2003` tinyint UNSIGNED DEFAULT '0',
  `prod_do_not_transfer_items_for_returns` tinyint DEFAULT '0',
  `stocks_no` int DEFAULT NULL,
  `selm_no` int UNSIGNED DEFAULT NULL,
  `prod_article_has_parts_list` tinyint DEFAULT '0',
  `prod_stock_parts_list_book_directly` tinyint DEFAULT '0',
  `prod_enter_additional_description` tinyint DEFAULT '0',
  `prod_kitchen_slip_only` tinyint DEFAULT '0',
  `prod_add_one_to_subtotal_line` tinyint DEFAULT '0',
  `prod_reservation_allowed` tinyint DEFAULT '0',
  `vouchm_no` int UNSIGNED DEFAULT NULL,
  `prod_create_voucher` tinyint DEFAULT '0',
  `prod_set_course_no_no_adding` tinyint DEFAULT '0',
  `prod_blue_code_enabled` tinyint DEFAULT '0',
  `prod_blue_code_voucher` tinyint DEFAULT '0',
  `prod_add_or_draw_image` tinyint DEFAULT '0',
  `prod_domestic_product` tinyint DEFAULT '0',
  `prod_organic_product` tinyint DEFAULT '0',
  `prod_shipping_item` tinyint DEFAULT '0',
  `prod_download_item` tinyint DEFAULT '0',
  `prod_no_reservation` tinyint DEFAULT '0',
  `count_no` varchar(2) DEFAULT NULL,
  `prod_vegan` tinyint UNSIGNED DEFAULT NULL,
  PRIMARY KEY (`prod_id`),
  UNIQUE KEY `prod_no` (`prod_no`),
  KEY `WDIDX1691098200275` (`cours_no`),
  KEY `WDIDX1691098200276` (`prod_composite_no_description`),
  KEY `WDIDX1691098200277` (`prodg_no`),
  KEY `WDIDX1691098200278` (`prod_match_code`),
  KEY `WDIDX1691098200279` (`prod_ean`),
  KEY `WDIDX1691098200280` (`vat_no`),
  KEY `WDIDX1691098200281` (`produ_no`),
  KEY `WDIDX1691098200282` (`prod_printer_type`),
  KEY `WDIDX1691098200283` (`shop_id`),
  KEY `WDIDX1691098200284` (`revenuea_no`),
  KEY `WDIDX1691098200285` (`commg_no`),
  KEY `WDIDX1691098200286` (`sup_no`),
  KEY `WDIDX1691098200287` (`unit_no`),
  KEY `WDIDX1691098200288` (`stocks_no`),
  KEY `WDIDX1691098200289` (`selm_no`),
  KEY `WDIDX1691098200290` (`vouchm_no`),
  KEY `WDIDX1691098200291` (`count_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `product_barcodes`
--

DROP TABLE IF EXISTS `product_barcodes`;
CREATE TABLE IF NOT EXISTS `product_barcodes` (
  `prodb_id` bigint NOT NULL AUTO_INCREMENT,
  `prod_no` bigint UNSIGNED DEFAULT NULL,
  `prodb_ean` varchar(14) DEFAULT NULL,
  PRIMARY KEY (`prodb_id`),
  UNIQUE KEY `prodb_key` (`prod_no`,`prodb_ean`),
  KEY `WDIDX1691098199247` (`prod_no`),
  KEY `WDIDX1691098199248` (`prodb_ean`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `product_characteristics`
--

DROP TABLE IF EXISTS `product_characteristics`;
CREATE TABLE IF NOT EXISTS `product_characteristics` (
  `prodc_id` bigint NOT NULL AUTO_INCREMENT,
  `prodc_guid` varchar(32) NOT NULL DEFAULT '',
  `chard_no` int DEFAULT NULL,
  `prod_no` bigint UNSIGNED DEFAULT NULL,
  `prodc_ean` varchar(14) DEFAULT NULL,
  `prodc_prod_no_destination` bigint UNSIGNED DEFAULT '0',
  PRIMARY KEY (`prodc_id`),
  UNIQUE KEY `prodc_guid` (`prodc_guid`),
  UNIQUE KEY `prodc_key` (`prod_no`,`chard_no`),
  KEY `WDIDX1691098199249` (`chard_no`),
  KEY `WDIDX1691098199250` (`prod_no`),
  KEY `WDIDX1691098199251` (`prodc_ean`),
  KEY `prodc_key_destination` (`prodc_prod_no_destination`,`chard_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `product_characteristics_translations`
--

DROP TABLE IF EXISTS `product_characteristics_translations`;
CREATE TABLE IF NOT EXISTS `product_characteristics_translations` (
  `prodct_id` bigint NOT NULL AUTO_INCREMENT,
  `prodc_guid` varchar(32) NOT NULL DEFAULT '',
  `prodct_description` varchar(50) DEFAULT '',
  `lang_no` int DEFAULT '0',
  `prodct_image` longblob,
  `prodct_image_file_name` varchar(128) DEFAULT NULL,
  `prodct_image_width` int UNSIGNED DEFAULT '0',
  `prodct_image_heigth` int UNSIGNED DEFAULT '0',
  PRIMARY KEY (`prodct_id`),
  UNIQUE KEY `prodct_key` (`prodc_guid`,`lang_no`),
  KEY `WDIDX1691098199252` (`prodc_guid`),
  KEY `WDIDX1691098199253` (`lang_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `product_foreign_numbers`
--

DROP TABLE IF EXISTS `product_foreign_numbers`;
CREATE TABLE IF NOT EXISTS `product_foreign_numbers` (
  `prodfn_id` bigint NOT NULL AUTO_INCREMENT,
  `prodfn_no` int UNSIGNED DEFAULT NULL,
  `prod_no` bigint UNSIGNED DEFAULT NULL,
  `prodfn_foreign_product_no` bigint UNSIGNED DEFAULT NULL,
  `prodfn_bar_system_start` tinyint DEFAULT '0',
  `prodfn_bar_system_end` tinyint DEFAULT '0',
  PRIMARY KEY (`prodfn_id`),
  KEY `WDIDX1691098199254` (`prodfn_no`),
  KEY `WDIDX1691098199255` (`prod_no`),
  KEY `WDIDX1691098199256` (`prodfn_foreign_product_no`),
  KEY `prodfn_key` (`prodfn_no`,`prod_no`),
  KEY `prodfn_key_foreign` (`prodfn_no`,`prodfn_foreign_product_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `product_groups`
--

DROP TABLE IF EXISTS `product_groups`;
CREATE TABLE IF NOT EXISTS `product_groups` (
  `prodg_id` bigint NOT NULL AUTO_INCREMENT,
  `prodg_no` int NOT NULL DEFAULT '0',
  `prodg_father_no` int DEFAULT '0',
  `prodm_no` int DEFAULT NULL,
  `prodg_description` varchar(50) DEFAULT NULL,
  `prodg_start_prod_no` int DEFAULT '0',
  `prodg_type` tinyint UNSIGNED DEFAULT '1',
  `vat_no` tinyint UNSIGNED DEFAULT NULL,
  `prodg_key_color` int UNSIGNED DEFAULT NULL,
  `prodg_font_color` int UNSIGNED DEFAULT NULL,
  `prodg_operator_commission_allowed` tinyint DEFAULT '1',
  `prodg_composite_no_description` varchar(50) DEFAULT NULL,
  `prodg_printer_type` tinyint UNSIGNED DEFAULT NULL,
  `prodg_sort` longtext,
  `prodg_lock_workstation` longtext,
  `shop_id` bigint DEFAULT NULL,
  PRIMARY KEY (`prodg_id`),
  KEY `product_groups_prodg_no_key` (`prodg_no`),
  KEY `product_groups_prodg_father_no_ckey` (`prodg_father_no`),
  KEY `product_groups_prodm_no_ckey` (`prodm_no`),
  KEY `product_groups_prodg_description_ckey` (`prodg_description`),
  KEY `product_groups_vat_no_ckey` (`vat_no`),
  KEY `product_groups_prodg_composite_no_description_ckey` (`prodg_composite_no_description`),
  KEY `product_groups_prodg_printer_type_ckey` (`prodg_printer_type`),
  KEY `product_groups_shop_id_ckey` (`shop_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `product_group_links`
--

DROP TABLE IF EXISTS `product_group_links`;
CREATE TABLE IF NOT EXISTS `product_group_links` (
  `prodl_id` bigint NOT NULL AUTO_INCREMENT,
  `prodg_no` int DEFAULT '0',
  `prod_no` bigint UNSIGNED DEFAULT '0',
  PRIMARY KEY (`prodl_id`),
  UNIQUE KEY `prodl_key` (`prodg_no`,`prod_no`),
  UNIQUE KEY `prodl_mkey` (`prod_no`,`prodg_no`),
  KEY `WDIDX1691098199257` (`prodg_no`),
  KEY `WDIDX1691098199258` (`prod_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `product_group_translations`
--

DROP TABLE IF EXISTS `product_group_translations`;
CREATE TABLE IF NOT EXISTS `product_group_translations` (
  `prodgt_id` bigint NOT NULL AUTO_INCREMENT,
  `lang_no` int DEFAULT '0',
  `prodgt_description` varchar(50) DEFAULT '',
  `prodg_no` int NOT NULL DEFAULT '0',
  PRIMARY KEY (`prodgt_id`),
  KEY `WDIDX1691098199259` (`lang_no`),
  KEY `WDIDX1691098199260` (`prodg_no`),
  KEY `prodgt_key` (`prodg_no`,`lang_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `product_images`
--

DROP TABLE IF EXISTS `product_images`;
CREATE TABLE IF NOT EXISTS `product_images` (
  `prodi_id` bigint NOT NULL AUTO_INCREMENT,
  `prod_no` bigint UNSIGNED DEFAULT NULL,
  `prodi_type` tinyint UNSIGNED DEFAULT NULL,
  `prodi_image` longblob,
  `prodi_image_file_name` varchar(128) DEFAULT NULL,
  `prodi_width` smallint UNSIGNED DEFAULT '0',
  `prodi_height` smallint UNSIGNED DEFAULT '0',
  `lang_no` int DEFAULT '0',
  PRIMARY KEY (`prodi_id`),
  UNIQUE KEY `prodi_key` (`prod_no`,`lang_no`,`prodi_type`),
  KEY `WDIDX1691098199267` (`prod_no`),
  KEY `WDIDX1691098199268` (`prodi_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `product_main_groups`
--

DROP TABLE IF EXISTS `product_main_groups`;
CREATE TABLE IF NOT EXISTS `product_main_groups` (
  `prodm_id` bigint NOT NULL AUTO_INCREMENT,
  `prodm_no` int NOT NULL DEFAULT '0',
  `shop_no` int DEFAULT NULL,
  `prodm_description` varchar(50) DEFAULT NULL,
  `prodm_type` tinyint UNSIGNED DEFAULT '0',
  `prodm_composite_no_description` varchar(56) DEFAULT NULL,
  `prodm_button_background_color` int UNSIGNED DEFAULT '0',
  `prodm_font_color` int UNSIGNED DEFAULT '0',
  PRIMARY KEY (`prodm_id`),
  UNIQUE KEY `prodm_no` (`prodm_no`),
  KEY `WDIDX1691098199269` (`shop_no`),
  KEY `WDIDX1691098199270` (`prodm_description`),
  KEY `WDIDX1691098199271` (`prodm_composite_no_description`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `product_translations`
--

DROP TABLE IF EXISTS `product_translations`;
CREATE TABLE IF NOT EXISTS `product_translations` (
  `prodt_id` bigint NOT NULL AUTO_INCREMENT,
  `prodt_type` tinyint UNSIGNED DEFAULT '0',
  `lang_no` int DEFAULT '0',
  `prod_no` bigint UNSIGNED DEFAULT '0',
  `prodt_description` longtext,
  PRIMARY KEY (`prodt_id`),
  KEY `WDIDX1691098199272` (`prodt_type`),
  KEY `WDIDX1691098199273` (`lang_no`),
  KEY `WDIDX1691098199274` (`prod_no`),
  KEY `prodt_key` (`prod_no`,`lang_no`,`prodt_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `public_holidays`
--

DROP TABLE IF EXISTS `public_holidays`;
CREATE TABLE IF NOT EXISTS `public_holidays` (
  `pubhol_id` bigint NOT NULL AUTO_INCREMENT,
  `count_no` varchar(2) DEFAULT NULL,
  `pubhol_neujahrstag` tinyint DEFAULT '0',
  `pubhol_oster_montag` tinyint DEFAULT '0',
  `pubhol_heilige_3_koenige` tinyint DEFAULT '0',
  `pubhol_staatsfeiertag` tinyint DEFAULT '0',
  `pubhol_christi_himmelfahrtstag` tinyint DEFAULT '0',
  `pubhol_fron_leichnam` tinyint DEFAULT '0',
  `pubhol_maria_himmelfahrt` tinyint DEFAULT '0',
  `pubhol_nationalfeiertag` tinyint DEFAULT '0',
  `pubhol_allerheiligen` tinyint DEFAULT '0',
  `pubhol_naria_empfaengnis` tinyint DEFAULT '0',
  `pubhol_christtag` tinyint DEFAULT '0',
  `pubhol_stefanitag` tinyint DEFAULT '0',
  `pubhol_reformationstag` tinyint DEFAULT '0',
  `pubhol_bet_und_busstag` tinyint DEFAULT '0',
  `pubhol_friedens_fest` tinyint DEFAULT '0',
  `pubhol_berchtoldstag` tinyint DEFAULT '0',
  `pubhol_tag_der_arbeit` tinyint DEFAULT '0',
  `pubhol_pfingst_montag` tinyint DEFAULT '0',
  `pubhol_karfreitag` tinyint DEFAULT '0',
  `pubhol_josefstag` tinyint DEFAULT '0',
  `pubhol_florianitag` tinyint DEFAULT '0',
  `pubhol_rupertitag` tinyint DEFAULT '0',
  `pubhol_tag_der_volksabstimmung` tinyint DEFAULT '0',
  `pubhol_martinstag` tinyint DEFAULT '0',
  `pubhol_leopoldi_tag` tinyint DEFAULT '0',
  `pubhol_bundesfeier` tinyint DEFAULT '0',
  `pubhol_feiertag_1` tinyint DEFAULT '0',
  `pubhol_feiertag_1_date` date DEFAULT NULL,
  `pubhol_feiertag_2` tinyint DEFAULT '0',
  `pubhol_feiertag_2_date` date DEFAULT NULL,
  `pubhol_feiertag_3` tinyint DEFAULT '0',
  `pubhol_feiertag_3_date` date DEFAULT NULL,
  PRIMARY KEY (`pubhol_id`),
  KEY `WDIDX1691098200292` (`count_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `revenue_accounts`
--

DROP TABLE IF EXISTS `revenue_accounts`;
CREATE TABLE IF NOT EXISTS `revenue_accounts` (
  `revenuea_id` bigint NOT NULL AUTO_INCREMENT,
  `revenuea_no` int UNSIGNED NOT NULL DEFAULT '0',
  `revenuea_description` varchar(50) DEFAULT NULL,
  `vat_no` tinyint UNSIGNED DEFAULT NULL,
  `revenuea_booking_reference` smallint UNSIGNED DEFAULT NULL,
  `revenuea_no_accounting_transfer` tinyint DEFAULT '0',
  PRIMARY KEY (`revenuea_id`),
  UNIQUE KEY `revenuea_no` (`revenuea_no`),
  KEY `WDIDX1691098200293` (`revenuea_description`),
  KEY `WDIDX1691098200294` (`vat_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `rksv_dep`
--

DROP TABLE IF EXISTS `rksv_dep`;
CREATE TABLE IF NOT EXISTS `rksv_dep` (
  `rksvd_id` bigint NOT NULL AUTO_INCREMENT,
  `rksvd_no` bigint UNSIGNED DEFAULT NULL,
  `branch_no` int UNSIGNED DEFAULT NULL,
  `station_no` int UNSIGNED DEFAULT NULL,
  `salesm_guid` varchar(32) DEFAULT NULL,
  `salesm_slip_no` bigint UNSIGNED DEFAULT NULL,
  `salesm_date` date DEFAULT NULL,
  `salesm_time` time DEFAULT NULL,
  `rksvd_turnover_total` decimal(24,6) DEFAULT '0.000000',
  `rksvd_turnover_slip` decimal(24,6) DEFAULT '0.000000',
  `rksvd_turnover_total_aes` varchar(50) DEFAULT NULL,
  `rksvd_signature_hex` varchar(18) DEFAULT NULL,
  `rksvd_text` longtext,
  `salesm_rksv_turnover_1` decimal(24,6) DEFAULT '0.000000',
  `salesm_rksv_turnover_2` decimal(24,6) DEFAULT '0.000000',
  `salesm_rksv_turnover_3` decimal(24,6) DEFAULT '0.000000',
  `salesm_rksv_turnover_4` decimal(24,6) DEFAULT '0.000000',
  `salesm_rksv_turnover_5` decimal(24,6) DEFAULT '0.000000',
  `rksvd_training` tinyint DEFAULT '0',
  `rksvd_signature_device_failed` tinyint DEFAULT '0',
  `rksvd_state` tinyint UNSIGNED DEFAULT NULL,
  `rksvd_transfered` datetime(3) DEFAULT NULL,
  `rksvd_fon_transfered` datetime(3) DEFAULT NULL,
  PRIMARY KEY (`rksvd_id`),
  UNIQUE KEY `rksvd_key` (`station_no`,`rksvd_no`),
  KEY `WDIDX1691098200295` (`rksvd_no`),
  KEY `WDIDX1691098200296` (`branch_no`),
  KEY `WDIDX1691098200297` (`station_no`),
  KEY `WDIDX1691098200298` (`salesm_guid`),
  KEY `WDIDX1691098200299` (`salesm_slip_no`),
  KEY `WDIDX1691098200300` (`salesm_date`),
  KEY `WDIDX1691098200301` (`salesm_time`),
  KEY `WDIDX1691098200302` (`rksvd_state`),
  KEY `WDIDX1691098200303` (`rksvd_transfered`),
  KEY `rksvd_status_key` (`station_no`,`rksvd_state`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `rksv_online_tax_authorities`
--

DROP TABLE IF EXISTS `rksv_online_tax_authorities`;
CREATE TABLE IF NOT EXISTS `rksv_online_tax_authorities` (
  `rksvo_id` bigint NOT NULL AUTO_INCREMENT,
  `rksvo_type` tinyint UNSIGNED DEFAULT '0',
  `rksvo_sequence_no` varchar(50) DEFAULT NULL,
  `rksvo_return_code` longtext,
  `rksvo_message` longtext,
  `rksvo_result_list` longtext,
  `rksvo_error_code` varchar(50) DEFAULT NULL,
  `rksvo_success` tinyint DEFAULT '0',
  `rksvo_error` tinyint DEFAULT '0',
  `rksvo_transferred` datetime(3) DEFAULT NULL,
  `branch_no` int UNSIGNED DEFAULT NULL,
  `station_no` int UNSIGNED DEFAULT NULL,
  PRIMARY KEY (`rksvo_id`),
  KEY `WDIDX1691098200304` (`rksvo_transferred`),
  KEY `WDIDX1691098201305` (`branch_no`),
  KEY `WDIDX1691098201306` (`station_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `room_rentals`
--

DROP TABLE IF EXISTS `room_rentals`;
CREATE TABLE IF NOT EXISTS `room_rentals` (
  `room_id` bigint NOT NULL AUTO_INCREMENT,
  `room_no` int UNSIGNED NOT NULL DEFAULT '0',
  `branch_no` int UNSIGNED NOT NULL DEFAULT '0',
  `build_no` int UNSIGNED NOT NULL DEFAULT '0',
  `room_sort` varchar(8) DEFAULT NULL,
  `room_reference_no` int UNSIGNED NOT NULL DEFAULT '0',
  `room_composite_no_description` varchar(59) DEFAULT NULL,
  `description` varchar(50) DEFAULT NULL,
  `room_number_beds` int DEFAULT NULL,
  `room_x` int DEFAULT '0',
  `room_y` int DEFAULT '0',
  `room_width` int DEFAULT '0',
  `room_height` int DEFAULT '0',
  `room_image` longblob,
  `room_image_occupied` longblob,
  `room_image_reservated` longblob,
  `room_image_reservated_occupied` longblob,
  `room_icon_calendar` longblob,
  `room_image_file_name` varchar(255) DEFAULT NULL,
  `room_image_occupied_file_name` varchar(255) DEFAULT NULL,
  `room_image_reservated_file_name` varchar(255) DEFAULT NULL,
  `room_image_reservated_occupied_file_name` varchar(255) DEFAULT NULL,
  `room_icon_calendar_file_name` varchar(255) DEFAULT NULL,
  `room_color` int UNSIGNED DEFAULT '0',
  `room_font_color` int UNSIGNED DEFAULT '0',
  `room_font_name` varchar(50) DEFAULT NULL,
  `room_font_size` float DEFAULT '10',
  `room_font_bold` tinyint DEFAULT '0',
  `room_font_italic` tinyint DEFAULT '0',
  `room_font_underlined` tinyint DEFAULT '0',
  `opera_no` smallint UNSIGNED DEFAULT '0',
  `cust_no` int UNSIGNED DEFAULT '0',
  `room_calendar_width` smallint UNSIGNED DEFAULT '100',
  PRIMARY KEY (`room_id`),
  UNIQUE KEY `room_no` (`room_no`),
  UNIQUE KEY `room_key` (`branch_no`,`build_no`,`room_no`),
  KEY `WDIDX1691098201307` (`branch_no`),
  KEY `WDIDX1691098201308` (`build_no`),
  KEY `WDIDX1691098201309` (`room_reference_no`),
  KEY `WDIDX1691098201310` (`room_composite_no_description`),
  KEY `WDIDX1691098201311` (`room_number_beds`),
  KEY `WDIDX1691098201312` (`opera_no`),
  KEY `WDIDX1691098201313` (`cust_no`),
  KEY `room_key_branch_room_no` (`branch_no`,`room_no`),
  KEY `room_key_branch_sort` (`branch_no`,`room_sort`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `route_details`
--

DROP TABLE IF EXISTS `route_details`;
CREATE TABLE IF NOT EXISTS `route_details` (
  `routed_id` bigint NOT NULL AUTO_INCREMENT,
  `cust_no` int UNSIGNED DEFAULT NULL,
  `routed_order_no` int DEFAULT NULL,
  `routed_money_due` decimal(24,6) DEFAULT NULL,
  `routed_turnover` decimal(24,6) DEFAULT NULL,
  `routed_money_dept` decimal(24,6) DEFAULT NULL,
  `routed_money_payed` decimal(24,6) DEFAULT NULL,
  `routed_payment_cust_no` bigint DEFAULT '0',
  `routed_dept_cust_no` bigint DEFAULT '0',
  `routed_turnover_no` bigint DEFAULT '0',
  `routem_no` int NOT NULL DEFAULT '0',
  PRIMARY KEY (`routed_id`),
  UNIQUE KEY `routem_no` (`routem_no`),
  KEY `WDIDX1691098201314` (`cust_no`),
  KEY `WDIDX1691098201315` (`routed_order_no`),
  KEY `routed_key` (`routem_no`,`cust_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `route_groups`
--

DROP TABLE IF EXISTS `route_groups`;
CREATE TABLE IF NOT EXISTS `route_groups` (
  `routeg_id` bigint NOT NULL AUTO_INCREMENT,
  `routeg_no` int NOT NULL DEFAULT '0',
  `routeg_description` varchar(50) DEFAULT NULL,
  `routeg_weekday_1` tinyint DEFAULT '0',
  `routeg_weekday_2` tinyint DEFAULT '0',
  `routeg_weekday_3` tinyint DEFAULT '0',
  `routeg_weekday_4` tinyint DEFAULT '0',
  `routeg_weekday_5` tinyint DEFAULT '0',
  `routeg_weekday_6` tinyint DEFAULT '0',
  `routeg_weekday_7` tinyint DEFAULT '0',
  `opera_no` smallint UNSIGNED DEFAULT NULL,
  `routeg_license_plate` varchar(12) DEFAULT NULL,
  `routeg_region_no` int UNSIGNED DEFAULT NULL,
  PRIMARY KEY (`routeg_id`),
  UNIQUE KEY `routeg_no` (`routeg_no`),
  KEY `WDIDX1691098201316` (`opera_no`),
  KEY `WDIDX1691098201317` (`routeg_license_plate`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `route_master`
--

DROP TABLE IF EXISTS `route_master`;
CREATE TABLE IF NOT EXISTS `route_master` (
  `routem_id` bigint NOT NULL AUTO_INCREMENT,
  `routeg_no` int NOT NULL DEFAULT '0',
  `routem_date` date DEFAULT NULL,
  `opera_no` smallint UNSIGNED DEFAULT NULL,
  `routeg_license_plate` varchar(12) DEFAULT NULL,
  `routem_mileage_start` int UNSIGNED DEFAULT NULL,
  `routem_mileage_end` int UNSIGNED DEFAULT NULL,
  `routem_mileage` int UNSIGNED DEFAULT NULL,
  `routem_time_start` time DEFAULT NULL,
  `routem_time_end` time DEFAULT NULL,
  `routem_hours` decimal(24,6) DEFAULT NULL,
  `routem_balance_still_open` decimal(24,6) DEFAULT NULL,
  `routem_total_still_open` decimal(24,6) DEFAULT NULL,
  `routem_total_turnover` decimal(24,6) DEFAULT NULL,
  `routem_total_money_due` decimal(24,6) DEFAULT NULL,
  `routem_total_money_dept` decimal(24,6) DEFAULT NULL,
  `routem_route_id` bigint DEFAULT NULL,
  `routem_no` int NOT NULL DEFAULT '0',
  PRIMARY KEY (`routem_id`),
  UNIQUE KEY `routem_no` (`routem_no`),
  UNIQUE KEY `routem_key` (`routeg_no`,`routem_date`),
  KEY `WDIDX1691098201318` (`routeg_no`),
  KEY `WDIDX1691098201319` (`routem_date`),
  KEY `WDIDX1691098201320` (`opera_no`),
  KEY `WDIDX1691098201321` (`routeg_license_plate`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `sales_details`
--

DROP TABLE IF EXISTS `sales_details`;
CREATE TABLE IF NOT EXISTS `sales_details` (
  `salesd_id` bigint NOT NULL AUTO_INCREMENT,
  `prodc_guid` varchar(32) DEFAULT NULL,
  `salesm_guid` varchar(32) DEFAULT NULL,
  `vouchd_no` int UNSIGNED DEFAULT NULL,
  `salesd_line_no` int DEFAULT NULL,
  `prod_no` bigint UNSIGNED DEFAULT NULL,
  `salesd_changed_date` datetime(3) DEFAULT NULL,
  `salesd_changed_station` smallint UNSIGNED DEFAULT '0',
  `salesd_changed_version` int UNSIGNED DEFAULT '0',
  `salesd_date` date DEFAULT NULL,
  `salesd_time` time DEFAULT NULL,
  `salesd_barcode` varchar(14) DEFAULT NULL,
  `salesd_amount` double DEFAULT '0',
  `stockm_reserved` double DEFAULT '0',
  `stockr_guid` varchar(32) DEFAULT '',
  `salesd_price_total` decimal(24,6) DEFAULT '0.000000',
  `salesd_price_one_unit` decimal(24,6) DEFAULT '0.000000',
  `vat_no` tinyint UNSIGNED DEFAULT NULL,
  `salesd_product_description` varchar(255) DEFAULT NULL,
  `opera_no` smallint UNSIGNED DEFAULT NULL,
  `salesd_kitchen_order_no` int DEFAULT '0',
  `salesd_discount_locked` tinyint DEFAULT '0',
  `salesd_line_discount_amount` decimal(24,6) DEFAULT '0.000000',
  `salesd_line_discount_percent` double DEFAULT '0',
  `salesd_invoice_split_part_no` smallint UNSIGNED DEFAULT '0',
  `salesd_line_cancellation` tinyint UNSIGNED DEFAULT '0',
  `salesd_cancellation_slip_no` int UNSIGNED DEFAULT '0',
  `salesd_cancellation_type` tinyint UNSIGNED DEFAULT '0',
  `salesd_print_line_on_slip` tinyint DEFAULT '1',
  `salesd_print_price_on_slip` tinyint DEFAULT '1',
  `salesd_print_on_kitchen_order` tinyint DEFAULT '1',
  `salesd_menue_no` int UNSIGNED DEFAULT '0',
  `salesd_accounting_operator_single_no` int UNSIGNED DEFAULT '0',
  `salesd_accounting_operator_total_no` int UNSIGNED DEFAULT '0',
  `salesd_accounting_product_groups_no` int UNSIGNED DEFAULT '0',
  `salesd_accounting_products_no` int UNSIGNED DEFAULT '0',
  `salesd_accounting_hourly_no` int UNSIGNED DEFAULT '0',
  `salesd_accounting_selled_products_no` int UNSIGNED DEFAULT '0',
  `salesd_accounting_products_selled_each_operator_no` int UNSIGNED DEFAULT '0',
  `salesd_counting_list_no` int UNSIGNED DEFAULT '0',
  `commg_no` smallint UNSIGNED DEFAULT '0',
  `salesd_accounting_commision_no` int UNSIGNED DEFAULT '0',
  `salesd_commision_amount` decimal(24,6) DEFAULT '0.000000',
  `salesd_key_pressed` varchar(15) DEFAULT NULL,
  `salesd_subtotal_line_no` int DEFAULT '0',
  `salesd_stock_level_target` double DEFAULT '0',
  `salesd_final_total` decimal(24,6) DEFAULT '0.000000',
  `salesd_net_final_total` decimal(24,6) DEFAULT '0.000000',
  `salesd_vat_final_total` decimal(24,6) DEFAULT '0.000000',
  `salesd_brut_final_total` decimal(24,6) DEFAULT '0.000000',
  `salesd_discount_total` decimal(24,6) DEFAULT '0.000000',
  `salesd_final_total_before_discount` decimal(24,6) DEFAULT '0.000000',
  `salesd_product_group` int DEFAULT '0',
  `sup_no` int UNSIGNED DEFAULT '0',
  `salesd_purchasing_price_net` decimal(24,6) DEFAULT '0.000000',
  `salesd_amount_source_from_scale` tinyint DEFAULT '0',
  `salesd_erp_delivery_note_no` int UNSIGNED DEFAULT '0',
  `salesd_erp_delivery_note_date` date DEFAULT NULL,
  `salesd_erp_delivery_note_customer_no` int UNSIGNED DEFAULT '0',
  `salesd_erp_line_no` int UNSIGNED DEFAULT '0',
  `salesd_erp_delivery_note_data_acquisition_group` tinyint UNSIGNED DEFAULT '0',
  `salesd_erp_invoice_no` int UNSIGNED DEFAULT '0',
  `salesd_was_transferred` tinyint DEFAULT '0',
  `salesd_product_only_on_kitchen_order` tinyint DEFAULT '0',
  `salesd_voucher_barcode` varchar(14) DEFAULT NULL,
  `salesd_foreign_article_number` varchar(80) DEFAULT NULL,
  `salesd_dispensing_system_ok` tinyint DEFAULT '0',
  `salesd_selection_no` int UNSIGNED DEFAULT '0',
  `salesd_course_no` smallint UNSIGNED DEFAULT '0',
  `salesd_kitchen_order_image` longblob,
  `salesd_kitchen_order_image_changed` datetime(3) DEFAULT NULL,
  `salesd_kitchen_order_image_changed_station` smallint UNSIGNED DEFAULT '0',
  `salesd_kitchen_order_image_changed_version` int UNSIGNED DEFAULT '0',
  `salesd_line_no_from_main_product` int DEFAULT '0',
  `salesd_staggered_price` tinyint DEFAULT '0',
  `salesd_bluecode_voucher` tinyint DEFAULT '0',
  `salesd_bluecode_product_no` varchar(36) DEFAULT NULL,
  `revenuea_no` int UNSIGNED DEFAULT '0',
  PRIMARY KEY (`salesd_id`),
  UNIQUE KEY `salesd_key` (`salesm_guid`,`salesd_line_no`),
  KEY `WDIDX1691098201322` (`prodc_guid`),
  KEY `WDIDX1691098201323` (`salesm_guid`),
  KEY `WDIDX1691098201324` (`vouchd_no`),
  KEY `WDIDX1691098201325` (`salesd_line_no`),
  KEY `WDIDX1691098201326` (`prod_no`),
  KEY `WDIDX1691098201327` (`salesd_changed_date`),
  KEY `WDIDX1691098201328` (`salesd_changed_station`),
  KEY `WDIDX1691098201329` (`salesd_changed_version`),
  KEY `WDIDX1691098201330` (`salesd_date`),
  KEY `WDIDX1691098201331` (`vat_no`),
  KEY `WDIDX1691098201332` (`opera_no`),
  KEY `WDIDX1691098201333` (`sup_no`),
  KEY `WDIDX1691098201334` (`revenuea_no`),
  KEY `salesd_key_date_time` (`salesd_date`,`salesd_time`),
  KEY `salesd_key_barcode` (`salesm_guid`,`salesd_barcode`),
  KEY `salesd_key_changed` (`salesd_changed_station`,`salesd_changed_version`),
  KEY `salesd_key_changed_version` (`salesd_changed_version`,`salesd_changed_station`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `sales_discount`
--

DROP TABLE IF EXISTS `sales_discount`;
CREATE TABLE IF NOT EXISTS `sales_discount` (
  `salesdc_id` bigint NOT NULL AUTO_INCREMENT,
  `salesdc_no` int NOT NULL DEFAULT '0',
  `salesdc_description` varchar(50) DEFAULT '',
  `salesdc_discount_percent` float NOT NULL DEFAULT '0',
  `salesdc_discount_payment_terms` int UNSIGNED DEFAULT '7',
  `salesdc_net_payment_terms` int UNSIGNED DEFAULT '14',
  PRIMARY KEY (`salesdc_id`),
  UNIQUE KEY `salesdc_no` (`salesdc_no`),
  KEY `WDIDX1691098202335` (`salesdc_description`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `sales_master`
--

DROP TABLE IF EXISTS `sales_master`;
CREATE TABLE IF NOT EXISTS `sales_master` (
  `salesm_id` bigint NOT NULL AUTO_INCREMENT,
  `salesm_guid` varchar(32) DEFAULT NULL,
  `salesm_changed_date` datetime DEFAULT NULL,
  `salesm_changed_station` int UNSIGNED DEFAULT '0',
  `salesm_changed_version` int UNSIGNED DEFAULT '0',
  `salesm_state` int DEFAULT '0',
  `salesm_type` tinyint UNSIGNED DEFAULT '1',
  `salesm_slip_no` bigint UNSIGNED DEFAULT '0',
  `salesm_invoice_no` int DEFAULT '0',
  `salesm_table_no` decimal(18,6) DEFAULT '0.000000',
  `salesm_table_no_integer` int UNSIGNED DEFAULT '0',
  `waitl_last_no` tinyint UNSIGNED DEFAULT NULL,
  `branch_no` int UNSIGNED DEFAULT NULL,
  `station_no` int UNSIGNED DEFAULT NULL,
  `opera_no` int UNSIGNED DEFAULT NULL,
  `salesm_station_finished_document` int UNSIGNED DEFAULT '0',
  `employee_no` int UNSIGNED DEFAULT NULL,
  `salesm_date` date DEFAULT NULL,
  `salesm_date_logic` date DEFAULT NULL,
  `salesm_time` time DEFAULT NULL,
  `salesm_line_count` int DEFAULT '0',
  `salesm_payment_type` int DEFAULT NULL,
  `delt_no` int DEFAULT '0',
  `salesm_delivery_date_time` datetime DEFAULT NULL,
  `salesm_delivery_opera_no` int UNSIGNED DEFAULT '0',
  `salesm_subtotal` decimal(18,6) DEFAULT '0.000000',
  `salesm_cash_given_history_1` decimal(18,6) DEFAULT '0.000000',
  `salesm_cash_given_history_2` decimal(18,6) DEFAULT '0.000000',
  `salesm_cash_given_history_3` decimal(18,6) DEFAULT '0.000000',
  `salesm_cash_given_history_4` decimal(18,6) DEFAULT '0.000000',
  `salesm_cash_given_history_5` decimal(18,6) DEFAULT '0.000000',
  `salesm_cash_given_history_6` decimal(18,6) DEFAULT '0.000000',
  `salesm_cash_given_history_7` decimal(18,6) DEFAULT '0.000000',
  `salesm_cash_given_history_8` decimal(18,6) DEFAULT '0.000000',
  `salesm_cash_given_history_9` decimal(18,6) DEFAULT '0.000000',
  `salesm_cash_given_history_10` decimal(18,6) DEFAULT '0.000000',
  `salesm_cash_change` decimal(18,6) DEFAULT '0.000000',
  `cust_no` int UNSIGNED DEFAULT NULL,
  `custdel_no` int DEFAULT '0',
  `salesm_customer_delivery_address_different` tinyint DEFAULT '0',
  `salesm_company` varchar(50) DEFAULT NULL,
  `salesm_company_department` varchar(50) DEFAULT '',
  `sal_no` int DEFAULT '0',
  `tit_no` int DEFAULT '0',
  `salesm_first_name` varchar(40) DEFAULT NULL,
  `salesm_last_name` varchar(40) DEFAULT NULL,
  `salesm_street` varchar(50) DEFAULT NULL,
  `postc_no` varchar(8) DEFAULT NULL,
  `cust_city` varchar(50) DEFAULT NULL,
  `count_no` varchar(2) DEFAULT NULL,
  `salesm_last_product_group` int DEFAULT '0',
  `salesm_last_product_group_offset` int DEFAULT '0',
  `salesm_last_product_screen_dialog` int DEFAULT '0',
  `salesm_quantity` double NOT NULL DEFAULT '0',
  `salesm_net_total` decimal(18,6) DEFAULT '0.000000',
  `salesm_vat_total` decimal(18,6) DEFAULT '0.000000',
  `salesm_cancellation` tinyint DEFAULT '0',
  `salesm_transferred` tinyint DEFAULT '0',
  `salesm_transferred_station` int DEFAULT '0',
  `salesm_transferred_date` date DEFAULT NULL,
  `salesm_transferred_time` time DEFAULT NULL,
  `salesm_transferred_from_station` int DEFAULT '0',
  `salesm_transferred_from_date` date DEFAULT NULL,
  `salesm_transferred_from_time` time DEFAULT NULL,
  `salesm_transferred_in_progress` tinyint DEFAULT '0',
  `salesm_discount_amount` decimal(18,6) DEFAULT '0.000000',
  `salesm_discount_percent` double DEFAULT '0',
  `salesm_voucher_redeemed` tinyint DEFAULT '0',
  `salesm_voucher_description` varchar(50) DEFAULT NULL,
  `salesm_voucher_ean` varchar(80) DEFAULT NULL,
  `salesm_total` decimal(18,6) DEFAULT '0.000000',
  `salesm_decimal_places` tinyint UNSIGNED DEFAULT '2',
  `salesm_printed` tinyint DEFAULT '0',
  `salesm_customer_account_booked` tinyint DEFAULT '0',
  `salesm_ignore_working_hours` tinyint DEFAULT '0',
  `salesm_kitchen_order_printed` tinyint DEFAULT '0',
  `salesm_erp_invoice_no` int UNSIGNED DEFAULT '0',
  `salesm_tip` decimal(18,6) DEFAULT '0.000000',
  `salesm_get_signature` tinyint DEFAULT '0',
  `salesm_get_signature_and_invoice` tinyint DEFAULT '0',
  `salesm_get_kitchen_order` tinyint DEFAULT '0',
  `salesm_get_bluecode` tinyint DEFAULT '0',
  `salesm_get_bluecode_ok` tinyint DEFAULT '0',
  `salesm_bluecode_tan` varchar(40) DEFAULT NULL,
  `salesm_bluecode_barcode` varchar(24) DEFAULT NULL,
  `salesm_bluecode_end_to_end_id` varchar(50) DEFAULT NULL,
  `salesm_bluecode_refund_ok` tinyint DEFAULT '0',
  `salesm_bluecode_voucher_ok` tinyint DEFAULT '0',
  `salesm_rksv_signature` longtext,
  `salesm_rksv_signature_mobile` longtext,
  `salesm_rksv_status` tinyint UNSIGNED DEFAULT '0',
  `salesm_rksv_failed` tinyint DEFAULT '0',
  `salesm_rksv_collective_receipt` tinyint DEFAULT '0',
  `salesm_rksv_turnover_1` decimal(18,6) DEFAULT '0.000000',
  `salesm_rksv_turnover_2` decimal(18,6) DEFAULT '0.000000',
  `salesm_rksv_turnover_3` decimal(18,6) DEFAULT '0.000000',
  `salesm_rksv_turnover_4` decimal(18,6) DEFAULT '0.000000',
  `salesm_rksv_turnover_5` decimal(18,6) DEFAULT '0.000000',
  `salesm_fon_transfer_ok` tinyint DEFAULT '0',
  `salesm_fon_transfer_error_code` varchar(5) DEFAULT NULL,
  `salesm_fon_transfer_date` datetime DEFAULT NULL,
  `salesm_atm_customer_slip` longtext,
  `salesm_atm_merchant_slip` longtext,
  `salesm_atm_terminal_id` varchar(50) DEFAULT NULL,
  `salesm_atm_cash_partial_payment_amount` decimal(18,6) DEFAULT '0.000000',
  `salesm_atm_cash_partial_payment` tinyint DEFAULT '0',
  `salesm_atm_transaction_no` varchar(50) DEFAULT NULL,
  `salesm_atm_reference_no` varchar(20) DEFAULT NULL,
  `salesm_atm_authentication_no` varchar(10) DEFAULT NULL,
  `salesm_atm_acquire_no` varchar(12) DEFAULT NULL,
  `salesm_atm_payment_method` varchar(15) DEFAULT NULL,
  `salesm_atm_aid` varchar(24) DEFAULT NULL,
  `salesm_atm_refund_ok` tinyint DEFAULT '0',
  `salesm_sync_station` int UNSIGNED DEFAULT '0',
  `salesm_sync_started` datetime DEFAULT NULL,
  `salesm_back_plus_import_date` datetime DEFAULT NULL,
  `salesm_webshop_order_id` varchar(12) DEFAULT NULL,
  `salesm_webshop_customer_remark` longtext,
  `salesm_total_invoice_from` date DEFAULT NULL,
  `salesm_total_invoice_to` date DEFAULT NULL,
  `salesm_tse_start` datetime DEFAULT NULL,
  `salesm_tse_stop` datetime DEFAULT NULL,
  `salesm_tse_transaction_no` bigint DEFAULT '0',
  `salesm_tse_signature_counter` bigint DEFAULT '0',
  `salesm_tse_serial_no` varchar(64) DEFAULT '0',
  `salesm_tse_type` tinyint UNSIGNED DEFAULT '0',
  `salesm_tse_signature` longtext,
  `salesm_tse_status` tinyint UNSIGNED DEFAULT '0',
  `salesm_tse_turnover_1` decimal(18,6) DEFAULT '0.000000',
  `salesm_tse_turnover_2` decimal(18,6) DEFAULT '0.000000',
  `salesm_tse_turnover_3` decimal(18,6) DEFAULT '0.000000',
  `salesm_tse_turnover_4` decimal(18,6) DEFAULT '0.000000',
  `salesm_tse_turnover_5` decimal(18,6) DEFAULT '0.000000',
  PRIMARY KEY (`salesm_id`),
  KEY `sales_master_salesm_guid_key` (`salesm_guid`),
  KEY `sales_master_salesm_changed_date_ckey` (`salesm_changed_date`),
  KEY `sales_master_salesm_changed_station_ckey` (`salesm_changed_station`),
  KEY `sales_master_salesm_changed_version_ckey` (`salesm_changed_version`),
  KEY `sales_master_salesm_state_ckey` (`salesm_state`),
  KEY `sales_master_salesm_type_ckey` (`salesm_type`),
  KEY `sales_master_salesm_slip_no_ckey` (`salesm_slip_no`),
  KEY `sales_master_salesm_invoice_no_ckey` (`salesm_invoice_no`),
  KEY `sales_master_salesm_table_no_ckey` (`salesm_table_no`),
  KEY `sales_master_salesm_table_no_integer_ckey` (`salesm_table_no_integer`),
  KEY `sales_master_branch_no_ckey` (`branch_no`),
  KEY `sales_master_station_no_ckey` (`station_no`),
  KEY `sales_master_opera_no_ckey` (`opera_no`),
  KEY `sales_master_employee_no_ckey` (`employee_no`),
  KEY `sales_master_salesm_date_ckey` (`salesm_date`),
  KEY `sales_master_salesm_date_logic_ckey` (`salesm_date_logic`),
  KEY `sales_master_salesm_time_ckey` (`salesm_time`),
  KEY `sales_master_salesm_payment_type_ckey` (`salesm_payment_type`),
  KEY `sales_master_delt_no_ckey` (`delt_no`),
  KEY `sales_master_cust_no_ckey` (`cust_no`),
  KEY `sales_master_custdel_no_ckey` (`custdel_no`),
  KEY `sales_master_sal_no_ckey` (`sal_no`),
  KEY `sales_master_tit_no_ckey` (`tit_no`),
  KEY `sales_master_postc_no_ckey` (`postc_no`),
  KEY `sales_master_cust_city_ckey` (`cust_city`),
  KEY `sales_master_count_no_ckey` (`count_no`),
  KEY `sales_master_salesm_get_signature_ckey` (`salesm_get_signature`),
  KEY `sales_master_salesm_get_signature_and_invoice_ckey` (`salesm_get_signature_and_invoice`),
  KEY `sales_master_salesm_get_kitchen_order_ckey` (`salesm_get_kitchen_order`),
  KEY `sales_master_salesm_rksv_status_ckey` (`salesm_rksv_status`),
  KEY `sales_master_salesm_key_key` (`station_no`,`salesm_slip_no`),
  KEY `sales_master_salesm_key_operator_ckey` (`station_no`,`employee_no`,`salesm_state`),
  KEY `sales_master_salesm_key_table_no_ckey` (`branch_no`,`salesm_cancellation`,`salesm_state`,`salesm_table_no`),
  KEY `sales_master_salesm_key_table_no_integer_ckey` (`branch_no`,`salesm_table_no_integer`,`salesm_cancellation`,`salesm_state`),
  KEY `sales_master_salesm_key_date_time_ckey` (`salesm_date`,`salesm_time`),
  KEY `sales_master_salesm_key_date_time_logic_ckey` (`salesm_date_logic`,`salesm_time`),
  KEY `sales_master_salesm_key_branch_station_ckey` (`branch_no`,`station_no`,`salesm_slip_no`),
  KEY `sales_master_salesm_key_branch_date_logic_ckey` (`branch_no`,`station_no`,`salesm_date_logic`,`salesm_time`),
  KEY `sales_master_salesm_key_changed_ckey` (`salesm_changed_station`,`salesm_changed_version`),
  KEY `sales_master_salesm_ley_changed_version_ckey` (`salesm_changed_version`,`salesm_changed_station`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `sales_operations`
--

DROP TABLE IF EXISTS `sales_operations`;
CREATE TABLE IF NOT EXISTS `sales_operations` (
  `saleso_id` bigint NOT NULL AUTO_INCREMENT,
  `saleso_guid` varchar(32) DEFAULT NULL,
  `saleso_changed_date` datetime(3) DEFAULT NULL,
  `saleso_changed_station` smallint UNSIGNED DEFAULT '0',
  `saleso_changed_version` int UNSIGNED DEFAULT '0',
  `saleso_state` int DEFAULT '0',
  `saleso_type` tinyint UNSIGNED DEFAULT '1',
  `saleso_no` bigint UNSIGNED DEFAULT '0',
  `branch_no` int UNSIGNED DEFAULT NULL,
  `station_no` int UNSIGNED DEFAULT NULL,
  `opera_no` smallint UNSIGNED DEFAULT NULL,
  `saleso_date` date DEFAULT NULL,
  `saleso_time` time DEFAULT NULL,
  `saleso_date_logic` date DEFAULT NULL,
  `saleso_line_count` int DEFAULT '0',
  `cust_no` int UNSIGNED DEFAULT NULL,
  `saleso_company` varchar(50) DEFAULT NULL,
  `saleso_company_department` varchar(50) DEFAULT '',
  `sal_no` int DEFAULT '0',
  `tit_no` int DEFAULT '0',
  `saleso_first_name` varchar(40) DEFAULT NULL,
  `saleso_last_name` varchar(40) DEFAULT NULL,
  `saleso_street` varchar(50) DEFAULT NULL,
  `postc_no` varchar(8) DEFAULT NULL,
  `cust_city` varchar(50) DEFAULT NULL,
  `count_no` varchar(2) DEFAULT NULL,
  `saleso_quantity` double NOT NULL DEFAULT '0',
  `saleso_cancellation` tinyint DEFAULT '0',
  `saleso_subtotal` decimal(24,6) DEFAULT '0.000000',
  `saleso_discount_percent` float DEFAULT '0',
  `saleso_discount_amount` decimal(24,6) DEFAULT '0.000000',
  `saleso_total` decimal(24,6) DEFAULT '0.000000',
  `saleso_cash_drawer_open` tinyint DEFAULT '0',
  `saleso_destination_date` date DEFAULT NULL,
  `saleso_destination_time` time DEFAULT NULL,
  `saleso_type_no` bigint UNSIGNED NOT NULL DEFAULT '0',
  `saleso_table_no` decimal(24,6) NOT NULL DEFAULT '0.000000',
  `sup_no` int UNSIGNED DEFAULT '0',
  `saleso_source_cref_no` int UNSIGNED NOT NULL DEFAULT '0',
  `saleso_destination_cref_no` int UNSIGNED NOT NULL DEFAULT '0',
  `saleso_working_hours_type` int NOT NULL DEFAULT '0',
  `saleso_working_hours_adjustment` tinyint NOT NULL DEFAULT '0',
  `saleso_working_hours_automatic_insert` tinyint NOT NULL DEFAULT '0',
  `saleso_cash_given_history_1` decimal(24,6) DEFAULT '0.000000',
  `saleso_cash_given_history_2` decimal(24,6) DEFAULT '0.000000',
  `saleso_cash_given_history_3` decimal(24,6) DEFAULT '0.000000',
  `saleso_cash_given_history_4` decimal(24,6) DEFAULT '0.000000',
  `saleso_cash_given_history_5` decimal(24,6) DEFAULT '0.000000',
  `saleso_cash_given_history_6` decimal(24,6) DEFAULT '0.000000',
  `saleso_cash_given_history_7` decimal(24,6) DEFAULT '0.000000',
  `saleso_cash_given_history_8` decimal(24,6) DEFAULT '0.000000',
  `saleso_cash_given_history_9` decimal(24,6) DEFAULT '0.000000',
  `saleso_cash_given_history_10` decimal(24,6) DEFAULT '0.000000',
  `saleso_cash_change` decimal(24,6) DEFAULT '0.000000',
  `saleso_delivery_note_no` int UNSIGNED DEFAULT '0',
  `saleso_delivery_note_cust_no` int UNSIGNED DEFAULT '0',
  `saleso_delivery_note_date` date DEFAULT NULL,
  `saleso_erp_invoice_no` int UNSIGNED DEFAULT '0',
  `saleso_stock_goods_receipt_guid` varchar(32) DEFAULT NULL,
  `saleso_decimal_places` tinyint UNSIGNED DEFAULT '0',
  PRIMARY KEY (`saleso_id`),
  UNIQUE KEY `saleso_guid` (`saleso_guid`),
  UNIQUE KEY `saleso_key` (`station_no`,`saleso_no`),
  KEY `WDIDX1691098204364` (`saleso_changed_date`),
  KEY `WDIDX1691098204365` (`saleso_changed_station`),
  KEY `WDIDX1691098204366` (`saleso_changed_version`),
  KEY `WDIDX1691098204367` (`saleso_state`),
  KEY `WDIDX1691098204368` (`saleso_type`),
  KEY `WDIDX1691098204369` (`saleso_no`),
  KEY `WDIDX1691098204370` (`branch_no`),
  KEY `WDIDX1691098204371` (`station_no`),
  KEY `WDIDX1691098204372` (`opera_no`),
  KEY `WDIDX1691098204373` (`saleso_date`),
  KEY `WDIDX1691098204374` (`saleso_date_logic`),
  KEY `WDIDX1691098204375` (`cust_no`),
  KEY `WDIDX1691098204376` (`sal_no`),
  KEY `WDIDX1691098204377` (`tit_no`),
  KEY `WDIDX1691098204378` (`postc_no`),
  KEY `WDIDX1691098204379` (`cust_city`),
  KEY `WDIDX1691098204380` (`count_no`),
  KEY `WDIDX1691098204381` (`saleso_destination_date`),
  KEY `WDIDX1691098204382` (`saleso_destination_time`),
  KEY `WDIDX1691098204383` (`saleso_type_no`),
  KEY `WDIDX1691098204384` (`saleso_table_no`),
  KEY `WDIDX1691098204385` (`sup_no`),
  KEY `WDIDX1691098204386` (`saleso_source_cref_no`),
  KEY `WDIDX1691098204387` (`saleso_destination_cref_no`),
  KEY `WDIDX1691098204388` (`saleso_working_hours_type`),
  KEY `WDIDX1691098204389` (`saleso_working_hours_adjustment`),
  KEY `WDIDX1691098204390` (`saleso_stock_goods_receipt_guid`),
  KEY `saleso_key_operator` (`station_no`,`opera_no`,`saleso_state`),
  KEY `saleso_key_type_no` (`station_no`,`saleso_type`,`saleso_type_no`),
  KEY `saleso_key_station_type_date` (`station_no`,`saleso_type`,`saleso_date`),
  KEY `saleso_key_table` (`branch_no`,`saleso_cancellation`,`saleso_state`,`saleso_table_no`),
  KEY `saleso_key_station_operator` (`branch_no`,`saleso_date`,`saleso_time`,`opera_no`,`saleso_type`),
  KEY `saleso_key_cross_reference` (`saleso_type`,`saleso_source_cref_no`,`saleso_destination_cref_no`),
  KEY `saleso_key_delivery_receipt` (`branch_no`,`saleso_date`,`saleso_type`,`saleso_delivery_note_cust_no`,`saleso_delivery_note_no`),
  KEY `saleso_key_date_time` (`saleso_date`,`saleso_time`),
  KEY `saleso_key_destination_date_time` (`saleso_destination_date`,`saleso_destination_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `sales_proposals`
--

DROP TABLE IF EXISTS `sales_proposals`;
CREATE TABLE IF NOT EXISTS `sales_proposals` (
  `salesp_id` bigint NOT NULL AUTO_INCREMENT,
  `cref_no` int UNSIGNED DEFAULT NULL,
  `salesp_weekday` tinyint UNSIGNED DEFAULT NULL,
  `routeg_no` int DEFAULT '0',
  `prod_no` bigint UNSIGNED DEFAULT NULL,
  `salesp_quantity` double DEFAULT '0',
  `salesp_discount_percent` decimal(24,6) DEFAULT '0.000000',
  PRIMARY KEY (`salesp_id`),
  KEY `WDIDX1691098205391` (`cref_no`),
  KEY `WDIDX1691098205392` (`salesp_weekday`),
  KEY `WDIDX1691098205393` (`routeg_no`),
  KEY `WDIDX1691098205394` (`prod_no`),
  KEY `salesp_key` (`cref_no`,`salesp_weekday`,`prod_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `salutations`
--

DROP TABLE IF EXISTS `salutations`;
CREATE TABLE IF NOT EXISTS `salutations` (
  `sal_id` bigint NOT NULL AUTO_INCREMENT,
  `sal_no` int NOT NULL DEFAULT '0',
  `sal_description` varchar(60) DEFAULT '',
  PRIMARY KEY (`sal_id`),
  UNIQUE KEY `sal_no` (`sal_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `scales`
--

DROP TABLE IF EXISTS `scales`;
CREATE TABLE IF NOT EXISTS `scales` (
  `scale_id` bigint NOT NULL AUTO_INCREMENT,
  `scale_barcode` varchar(14) DEFAULT NULL,
  `prod_no` bigint UNSIGNED DEFAULT NULL,
  `scale_character_start` tinyint UNSIGNED DEFAULT '8',
  `scale_character_length` tinyint UNSIGNED DEFAULT '5',
  `scale_divisor` double DEFAULT '100',
  `scale_positive_sign` tinyint DEFAULT '1',
  `scale_price_or_quantity` tinyint UNSIGNED DEFAULT '1',
  PRIMARY KEY (`scale_id`),
  UNIQUE KEY `scale_barcode` (`scale_barcode`),
  KEY `WDIDX1691098205395` (`prod_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `selection_details`
--

DROP TABLE IF EXISTS `selection_details`;
CREATE TABLE IF NOT EXISTS `selection_details` (
  `seld_id` bigint NOT NULL AUTO_INCREMENT,
  `selm_no` int UNSIGNED DEFAULT NULL,
  `seld_sort` int UNSIGNED DEFAULT NULL,
  `seld_object_no` bigint UNSIGNED DEFAULT NULL,
  `seld_flag` varchar(12) DEFAULT '',
  `seld_shop_id_exclude_surcharge` bigint DEFAULT NULL,
  `seld_shop_id_include_surcharge` bigint DEFAULT NULL,
  PRIMARY KEY (`seld_id`),
  UNIQUE KEY `seld_object_no_key` (`selm_no`,`seld_object_no`),
  KEY `WDIDX1691098205396` (`selm_no`),
  KEY `WDIDX1691098205397` (`seld_sort`),
  KEY `WDIDX1691098205398` (`seld_object_no`),
  KEY `WDIDX1691098205399` (`seld_shop_id_exclude_surcharge`),
  KEY `WDIDX1691098205400` (`seld_shop_id_include_surcharge`),
  KEY `seld_key` (`selm_no`,`seld_sort`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `selection_master`
--

DROP TABLE IF EXISTS `selection_master`;
CREATE TABLE IF NOT EXISTS `selection_master` (
  `selm_id` bigint NOT NULL AUTO_INCREMENT,
  `selm_no` int UNSIGNED NOT NULL DEFAULT '0',
  `selm_description` varchar(50) DEFAULT NULL,
  `selm_composite_no_description` varchar(50) DEFAULT NULL,
  `selm_type` tinyint UNSIGNED DEFAULT NULL,
  `selm_shop_id_exclude_surcharge` bigint DEFAULT NULL,
  `selm_shop_id_include_surcharge` bigint DEFAULT '0',
  `selm_selection_sell` int DEFAULT '107',
  PRIMARY KEY (`selm_id`),
  UNIQUE KEY `selm_no` (`selm_no`),
  KEY `WDIDX1691098205401` (`selm_composite_no_description`),
  KEY `WDIDX1691098205402` (`selm_type`),
  KEY `WDIDX1691098205403` (`selm_selection_sell`),
  KEY `selm_key` (`selm_type`,`selm_selection_sell`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `sepa_bank_directory`
--

DROP TABLE IF EXISTS `sepa_bank_directory`;
CREATE TABLE IF NOT EXISTS `sepa_bank_directory` (
  `sepa_id` bigint NOT NULL AUTO_INCREMENT,
  `sepa_bank_code` varchar(8) DEFAULT NULL,
  `sepa_description` varchar(80) DEFAULT NULL,
  `sepa_bic` varchar(11) DEFAULT NULL,
  PRIMARY KEY (`sepa_id`),
  UNIQUE KEY `sepa_bank_code` (`sepa_bank_code`),
  KEY `WDIDX1691098205404` (`sepa_description`),
  KEY `WDIDX1691098205405` (`sepa_bic`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `shops`
--

DROP TABLE IF EXISTS `shops`;
CREATE TABLE IF NOT EXISTS `shops` (
  `shop_id` bigint NOT NULL AUTO_INCREMENT,
  `shop_no` int NOT NULL DEFAULT '0',
  `shop_description` varchar(64) DEFAULT NULL,
  PRIMARY KEY (`shop_id`),
  UNIQUE KEY `shop_no` (`shop_no`),
  KEY `WDIDX1691098205406` (`shop_description`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `smart_card_devices`
--

DROP TABLE IF EXISTS `smart_card_devices`;
CREATE TABLE IF NOT EXISTS `smart_card_devices` (
  `smartcd_id` bigint NOT NULL AUTO_INCREMENT,
  `smartcd_hex` varchar(64) DEFAULT NULL,
  `smartcd_certificate` longtext,
  `smartcd_public_key` longtext,
  `smartcd_authority` longtext,
  `branch_no` int UNSIGNED DEFAULT NULL,
  `station_no` int UNSIGNED DEFAULT NULL,
  `smartcd_transferred` datetime(3) DEFAULT NULL,
  `smartcd_tax_authorities_transferred` datetime(3) DEFAULT NULL,
  PRIMARY KEY (`smartcd_id`),
  UNIQUE KEY `smartcd_hex` (`smartcd_hex`),
  KEY `WDIDX1691098205407` (`branch_no`),
  KEY `WDIDX1691098205408` (`station_no`),
  KEY `WDIDX1691098205409` (`smartcd_transferred`),
  KEY `smartcd_key` (`station_no`,`smartcd_hex`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `special_offers`
--

DROP TABLE IF EXISTS `special_offers`;
CREATE TABLE IF NOT EXISTS `special_offers` (
  `spoff_id` bigint NOT NULL AUTO_INCREMENT,
  `spoff_date_from` varchar(12) DEFAULT NULL,
  `spoff_date_to` varchar(12) DEFAULT NULL,
  `spoff_price` decimal(24,6) DEFAULT '0.000000',
  `spoff_discount_percent` float DEFAULT '0',
  `spoff_discount_amount` varchar(50) DEFAULT NULL,
  `spoff_price_null_ok` tinyint DEFAULT '0',
  `spoff_discount_not_granted` tinyint DEFAULT '0',
  `spoff_reference_product_date` varchar(34) DEFAULT NULL,
  `cref_no` int UNSIGNED DEFAULT NULL,
  `prod_no` bigint UNSIGNED DEFAULT NULL,
  `spoff_slip_text` longtext,
  `spoff_take_quantity` smallint UNSIGNED DEFAULT '0',
  `spoff_pay_quantity` smallint UNSIGNED DEFAULT '0',
  `spoff_everyday_itself` tinyint DEFAULT '0',
  `spoff_selection_type` tinyint UNSIGNED DEFAULT '1',
  `selm_no` int UNSIGNED DEFAULT NULL,
  `prodg_no` int DEFAULT NULL,
  `spoff_composite_ref_selection_date` varchar(28) DEFAULT NULL,
  `spoff_composite_ref_product_group_date` varchar(28) DEFAULT NULL,
  `spoff_type` tinyint UNSIGNED DEFAULT '1',
  `pricem_no` int UNSIGNED DEFAULT NULL,
  `spoff_weekday_1` tinyint DEFAULT '0',
  `spoff_weekday_2` tinyint DEFAULT '0',
  `spoff_weekday_3` tinyint DEFAULT '0',
  `spoff_weekday_4` tinyint DEFAULT '0',
  `spoff_weekday_5` tinyint DEFAULT '0',
  `spoff_weekday_6` tinyint DEFAULT '0',
  `spoff_weekday_7` tinyint DEFAULT '0',
  `spoff_weekday_8` tinyint DEFAULT '0',
  PRIMARY KEY (`spoff_id`),
  KEY `WDIDX1691098205410` (`spoff_date_from`),
  KEY `WDIDX1691098205411` (`spoff_date_to`),
  KEY `WDIDX1691098205412` (`spoff_reference_product_date`),
  KEY `WDIDX1691098205413` (`cref_no`),
  KEY `WDIDX1691098205414` (`prod_no`),
  KEY `WDIDX1691098205415` (`selm_no`),
  KEY `WDIDX1691098205416` (`prodg_no`),
  KEY `WDIDX1691098205417` (`spoff_composite_ref_selection_date`),
  KEY `WDIDX1691098206418` (`spoff_composite_ref_product_group_date`),
  KEY `WDIDX1691098206419` (`pricem_no`),
  KEY `spoff_key_product_no` (`cref_no`,`prod_no`,`spoff_date_from`,`spoff_date_to`),
  KEY `spoff_key_selection_no` (`cref_no`,`selm_no`,`spoff_date_from`,`spoff_date_to`),
  KEY `spoff_key_product_group_no` (`cref_no`,`prodg_no`,`spoff_date_from`,`spoff_date_to`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `staggered_prices`
--

DROP TABLE IF EXISTS `staggered_prices`;
CREATE TABLE IF NOT EXISTS `staggered_prices` (
  `stagp_id` bigint NOT NULL AUTO_INCREMENT,
  `pricem_no` int UNSIGNED DEFAULT NULL,
  `prod_no` bigint UNSIGNED DEFAULT NULL,
  `stagp_from_quantity` decimal(24,6) DEFAULT NULL,
  `stagp_price` decimal(24,6) DEFAULT '0.000000',
  `stagp_discount_percent` float DEFAULT '0',
  PRIMARY KEY (`stagp_id`),
  KEY `WDIDX1691098206420` (`pricem_no`),
  KEY `WDIDX1691098206421` (`prod_no`),
  KEY `WDIDX1691098206422` (`stagp_from_quantity`),
  KEY `stagp_key` (`pricem_no`,`prod_no`,`stagp_from_quantity`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `stations`
--

DROP TABLE IF EXISTS `stations`;
CREATE TABLE IF NOT EXISTS `stations` (
  `station_id` bigint NOT NULL AUTO_INCREMENT,
  `station_no` int UNSIGNED DEFAULT NULL,
  `station_device_id` varchar(32) DEFAULT NULL,
  `branch_no` int UNSIGNED DEFAULT NULL,
  `station_composite_no_description` varchar(57) DEFAULT NULL,
  `station_description` varchar(50) DEFAULT NULL,
  `station_fiscal_authorities_description` varchar(9) DEFAULT '',
  `station_is_server` tinyint DEFAULT '0',
  `station_is_back_office` tinyint DEFAULT '0',
  `station_locked` tinyint DEFAULT '0',
  `station_mobile` tinyint DEFAULT '0',
  `station_warehouse_master` tinyint DEFAULT '0',
  `station_message_send_type` tinyint UNSIGNED DEFAULT '0',
  `station_messages_do_not_delete` tinyint DEFAULT '0',
  `station_email_address` varchar(128) DEFAULT NULL,
  `station_email_name` varchar(80) DEFAULT NULL,
  `station_pop_user_name` varchar(80) DEFAULT NULL,
  `station_pop_password` varchar(80) DEFAULT NULL,
  `station_pop_authentication` tinyint UNSIGNED DEFAULT '0',
  `station_pop_server` varchar(80) DEFAULT NULL,
  `station_pop_port` smallint UNSIGNED DEFAULT NULL,
  `station_pop_tls` tinyint UNSIGNED DEFAULT NULL,
  `station_smtp_user_name` varchar(80) DEFAULT NULL,
  `station_smtp_password` varchar(80) DEFAULT NULL,
  `station_smtp_authentication` tinyint UNSIGNED DEFAULT '0',
  `station_smtp_server` varchar(80) DEFAULT NULL,
  `station_smtp_port` smallint UNSIGNED DEFAULT NULL,
  `station_smtp_tls` tinyint UNSIGNED DEFAULT NULL,
  `station_fiscal_authorities_transferred` datetime(3) DEFAULT NULL,
  `station_last_logon` datetime(3) DEFAULT NULL,
  PRIMARY KEY (`station_id`),
  UNIQUE KEY `station_no` (`station_no`),
  UNIQUE KEY `station_composite_no_description` (`station_composite_no_description`),
  KEY `WDIDX16910981780` (`station_device_id`),
  KEY `WDIDX16910981781` (`branch_no`),
  KEY `WDIDX16910981782` (`station_is_server`),
  KEY `WDIDX16910981783` (`station_is_back_office`),
  KEY `WDIDX16910981794` (`station_mobile`),
  KEY `WDIDX16910981795` (`station_email_address`),
  KEY `station_master_key` (`branch_no`,`station_warehouse_master`),
  KEY `station_key` (`branch_no`,`station_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `station_emails`
--

DROP TABLE IF EXISTS `station_emails`;
CREATE TABLE IF NOT EXISTS `station_emails` (
  `statione_id` bigint NOT NULL AUTO_INCREMENT,
  `station_no` int UNSIGNED DEFAULT NULL,
  `statione_date` datetime(3) DEFAULT NULL,
  `statione_email_sender` varchar(128) DEFAULT NULL,
  `statione_email_sender_name` varchar(50) DEFAULT NULL,
  `statione_email_receiver` varchar(128) DEFAULT NULL,
  `statione_email_receiver_name` varchar(50) DEFAULT NULL,
  `statione_read` tinyint DEFAULT '0',
  `statione_send` tinyint DEFAULT '0',
  `statione_subject` varchar(256) DEFAULT NULL,
  `statione_message` longtext,
  PRIMARY KEY (`statione_id`),
  KEY `WDIDX1691098206423` (`station_no`),
  KEY `WDIDX1691098206424` (`statione_date`),
  KEY `WDIDX1691098206425` (`statione_email_sender`),
  KEY `WDIDX1691098206426` (`statione_email_sender_name`),
  KEY `WDIDX1691098206427` (`statione_email_receiver`),
  KEY `WDIDX1691098206428` (`statione_email_receiver_name`),
  KEY `WDIDX1691098206429` (`statione_read`),
  KEY `statione_key` (`station_no`,`statione_date`,`statione_email_sender`,`statione_email_receiver`),
  KEY `statione_date_key` (`station_no`,`statione_email_sender`,`statione_email_receiver`,`statione_date`),
  KEY `statione_read_key` (`station_no`,`statione_read`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `station_log`
--

DROP TABLE IF EXISTS `station_log`;
CREATE TABLE IF NOT EXISTS `station_log` (
  `statlog_id` bigint NOT NULL AUTO_INCREMENT,
  `station_no` int UNSIGNED DEFAULT NULL,
  `statlog_date` date DEFAULT NULL,
  `statlog_time` time DEFAULT NULL,
  `salesd_line_no` int DEFAULT NULL,
  `opera_no` smallint UNSIGNED DEFAULT NULL,
  `statlog_log_type` tinyint UNSIGNED DEFAULT NULL,
  `statlog_amount` float DEFAULT '0',
  `salesm_guid` varchar(32) DEFAULT NULL,
  `statlog_ip_address` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`statlog_id`),
  KEY `WDIDX1691098206430` (`station_no`),
  KEY `WDIDX1691098206431` (`statlog_date`),
  KEY `WDIDX1691098206432` (`statlog_time`),
  KEY `WDIDX1691098206433` (`salesd_line_no`),
  KEY `WDIDX1691098206434` (`opera_no`),
  KEY `WDIDX1691098206435` (`statlog_log_type`),
  KEY `WDIDX1691098206436` (`salesm_guid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `station_settings`
--

DROP TABLE IF EXISTS `station_settings`;
CREATE TABLE IF NOT EXISTS `station_settings` (
  `set_id` bigint NOT NULL AUTO_INCREMENT,
  `comset_no` int DEFAULT '0',
  `station_no` int UNSIGNED NOT NULL DEFAULT '0',
  `set_branch_name_prefix` varchar(4) DEFAULT '',
  `set_last_slip_no` bigint UNSIGNED DEFAULT '0',
  `set_last_invoice_no` bigint UNSIGNED DEFAULT '0',
  `set_invoice_city_text` varchar(24) DEFAULT '',
  `set_last_kitchen_order_no` bigint UNSIGNED DEFAULT '0',
  `set_last_sales_operation_no` bigint UNSIGNED DEFAULT '0',
  `set_last_cancellation_no` bigint UNSIGNED DEFAULT '0',
  `set_last_money_counting_list_no` bigint UNSIGNED DEFAULT '0',
  `set_last_product_accounting_no` bigint UNSIGNED DEFAULT '0',
  `set_last_product_group_accounting_no` bigint UNSIGNED DEFAULT '0',
  `set_last_hour_accounting_no` bigint UNSIGNED DEFAULT '0',
  `set_last_waiter_accounting_no` bigint UNSIGNED DEFAULT '0',
  `set_last_waiter_total_accounting_no` bigint UNSIGNED DEFAULT '0',
  `set_last_voucher_no` bigint UNSIGNED DEFAULT '0',
  `set_last_selled_products_accounting_no` bigint UNSIGNED DEFAULT '0',
  `set_last_product_operator_accounting_no` bigint UNSIGNED DEFAULT '0',
  `set_last_rksv_dep_no` bigint UNSIGNED DEFAULT '0',
  `set_email_order_no` smallint UNSIGNED DEFAULT '0',
  `set_sequence_slip_header_logo` tinyint UNSIGNED DEFAULT '1',
  `set_print_header_logo_from_printer` tinyint DEFAULT '0',
  `set_header_logo` longblob,
  `set_print_slip_text_header` tinyint DEFAULT '1',
  `set_sales_slip_header_1` varchar(62) DEFAULT '',
  `set_sales_slip_header_2` varchar(62) DEFAULT '',
  `set_sales_slip_header_3` varchar(62) DEFAULT '',
  `set_sales_slip_header_4` varchar(62) DEFAULT '',
  `set_sales_slip_header_5` varchar(62) DEFAULT '',
  `set_sales_slip_header_6` varchar(62) DEFAULT '',
  `set_sales_slip_header_7` varchar(62) DEFAULT '',
  `set_sales_slip_header_8` varchar(62) DEFAULT '',
  `set_sales_slip_header_9` varchar(62) DEFAULT '',
  `set_sales_slip_header_1_font_no` tinyint UNSIGNED NOT NULL DEFAULT '1',
  `set_sales_slip_header_1_font_name` varchar(50) DEFAULT 'Helvetica-Oblique;12;1',
  `set_sales_slip_header_1_font_bold` tinyint DEFAULT '1',
  `set_sales_slip_header_1_font_wide` tinyint DEFAULT '1',
  `set_sales_slip_header_1_font_centerd` tinyint DEFAULT '1',
  `set_sales_slip_header_1_font_italic` tinyint DEFAULT '0',
  `set_sales_slip_header_s_font_no` tinyint UNSIGNED NOT NULL DEFAULT '1',
  `set_sales_slip_header_2_font_name` varchar(50) DEFAULT 'Helvetica-Oblique;12;1',
  `set_sales_slip_header_2_font_bold` tinyint DEFAULT '1',
  `set_sales_slip_header_2_font_wide` tinyint DEFAULT '1',
  `set_sales_slip_header_2_font_centerd` tinyint DEFAULT '1',
  `set_sales_slip_header_2_font_italic` tinyint DEFAULT '0',
  `set_sales_slip_header_3_font_no` tinyint UNSIGNED NOT NULL DEFAULT '1',
  `set_sales_slip_header_3_font_name` varchar(50) DEFAULT 'Helvetica-Oblique;12;1',
  `set_sales_slip_header_3_font_bold` tinyint DEFAULT '0',
  `set_sales_slip_header_3_font_wide` tinyint DEFAULT '0',
  `set_sales_slip_header_3_font_centerd` tinyint DEFAULT '1',
  `set_sales_slip_header_3_font_italic` tinyint DEFAULT '0',
  `set_sales_slip_header_4_font_no` tinyint UNSIGNED NOT NULL DEFAULT '1',
  `set_sales_slip_header_4_font_name` varchar(50) DEFAULT 'Helvetica-Oblique;12;1',
  `set_sales_slip_header_4_font_bold` tinyint DEFAULT '0',
  `set_sales_slip_header_4_font_wide` tinyint DEFAULT '0',
  `set_sales_slip_header_4_font_centerd` tinyint DEFAULT '1',
  `set_sales_slip_header_4_font_italic` tinyint DEFAULT '0',
  `set_sales_slip_header_5_font_no` tinyint UNSIGNED NOT NULL DEFAULT '1',
  `set_sales_slip_header_5_font_name` varchar(50) DEFAULT 'Helvetica-Oblique;12;1',
  `set_sales_slip_header_5_font_bold` tinyint DEFAULT '0',
  `set_sales_slip_header_5_font_wide` tinyint DEFAULT '0',
  `set_sales_slip_header_5_font_centerd` tinyint DEFAULT '1',
  `set_sales_slip_header_5_font_italic` tinyint DEFAULT '0',
  `set_sales_slip_header_6_font_no` tinyint UNSIGNED NOT NULL DEFAULT '1',
  `set_sales_slip_header_6_font_name` varchar(50) DEFAULT 'Helvetica-Oblique;12;1',
  `set_sales_slip_header_6_font_bold` tinyint DEFAULT '0',
  `set_sales_slip_header_6_font_wide` tinyint DEFAULT '0',
  `set_sales_slip_header_6_font_centerd` tinyint DEFAULT '1',
  `set_sales_slip_header_6_font_italic` tinyint DEFAULT '0',
  `set_sales_slip_header_7_font_no` tinyint UNSIGNED NOT NULL DEFAULT '1',
  `set_sales_slip_header_7_font_name` varchar(50) DEFAULT 'Helvetica-Oblique;12;1',
  `set_sales_slip_header_7_font_bold` tinyint DEFAULT '0',
  `set_sales_slip_header_7_font_wide` tinyint DEFAULT '0',
  `set_sales_slip_header_7_font_centerd` tinyint DEFAULT '1',
  `set_sales_slip_header_7_font_italic` tinyint DEFAULT '0',
  `set_sales_slip_header_8_font_no` tinyint UNSIGNED NOT NULL DEFAULT '1',
  `set_sales_slip_header_8_font_name` varchar(50) DEFAULT 'Helvetica-Oblique;12;1',
  `set_sales_slip_header_8_font_bold` tinyint DEFAULT '0',
  `set_sales_slip_header_8_font_wide` tinyint DEFAULT '0',
  `set_sales_slip_header_8_font_centerd` tinyint DEFAULT '1',
  `set_sales_slip_header_8_font_italic` tinyint DEFAULT '0',
  `set_sales_slip_header_9_font_no` tinyint UNSIGNED NOT NULL DEFAULT '1',
  `set_sales_slip_header_9_font_name` varchar(50) DEFAULT 'Helvetica-Oblique;12;1',
  `set_sales_slip_header_9_font_bold` tinyint DEFAULT '0',
  `set_sales_slip_header_9_font_wide` tinyint DEFAULT '0',
  `set_sales_slip_header_9_font_centerd` tinyint DEFAULT '1',
  `set_sales_slip_header_9_font_italic` tinyint DEFAULT '0',
  `set_gdi_title_font_name` varchar(50) DEFAULT 'Arial;12',
  `set_gdi_title_subtitle_font_name` varchar(50) DEFAULT 'Arial;12',
  `set_gdi_title_copyright_font_name` varchar(50) DEFAULT 'Arial;8',
  `set_gdi_body_lines_font_name` varchar(50) DEFAULT 'Arial;10',
  `set_gdi_body_columns_font_name` varchar(50) DEFAULT '10;57;22;11',
  `set_gdi_body_grid_header_font_name` varchar(50) DEFAULT 'Arial;10',
  `set_gdi_footer_header_font_name` varchar(50) DEFAULT 'Arial;10',
  `set_gdi_footer_total_font_name` varchar(50) DEFAULT 'Arial;12',
  `set_gdi_footer_vat_total_font_name` varchar(50) DEFAULT 'Arial;10',
  `set_gdi_footer_rksv_qr_font_name` float DEFAULT '30',
  `set_sequence_slip_footer_logo` tinyint UNSIGNED DEFAULT '1',
  `set_print_footer_logo_from_printer` tinyint DEFAULT '0',
  `set_footer_logo` longblob,
  `set_print_footer_logo` tinyint DEFAULT '1',
  `set_sales_slip_footer_1` varchar(62) DEFAULT NULL,
  `set_sales_slip_footer_2` varchar(62) DEFAULT NULL,
  `set_sales_slip_footer_3` varchar(62) DEFAULT NULL,
  `set_sales_slip_footer_4` varchar(62) DEFAULT NULL,
  `set_sales_slip_footer_5` varchar(62) DEFAULT NULL,
  `set_sales_slip_footer_6` varchar(62) DEFAULT NULL,
  `set_sales_slip_footer_7` varchar(62) DEFAULT NULL,
  `set_sales_slip_footer_8` varchar(62) DEFAULT NULL,
  `set_sales_slip_footer_9` varchar(62) DEFAULT NULL,
  `set_sales_slip_footer_1_font_no` tinyint UNSIGNED NOT NULL DEFAULT '1',
  `set_sales_slip_footer_1_font_italic` tinyint DEFAULT '0',
  `set_sales_slip_footer_1_font_name` varchar(50) DEFAULT 'Helvetica-Oblique;12;1',
  `set_sales_slip_footer_1_font_bold` tinyint DEFAULT '0',
  `set_sales_slip_footer_1_font_wide` tinyint DEFAULT '0',
  `set_sales_slip_footer_1_font_centered` tinyint DEFAULT '1',
  `set_sales_slip_footer_2_font_no` tinyint UNSIGNED NOT NULL DEFAULT '1',
  `set_sales_slip_footer_2_font_italic` tinyint DEFAULT '0',
  `set_sales_slip_footer_2_font_name` varchar(50) DEFAULT 'Helvetica-Oblique;12;1',
  `set_sales_slip_footer_2_font_bold` tinyint DEFAULT '0',
  `set_sales_slip_footer_2_font_wide` tinyint DEFAULT '0',
  `set_sales_slip_footer_2_font_centered` tinyint DEFAULT '1',
  `set_sales_slip_footer_3_font_no` tinyint UNSIGNED NOT NULL DEFAULT '1',
  `set_sales_slip_footer_3_font_italic` tinyint DEFAULT '0',
  `set_sales_slip_footer_3_font_name` varchar(50) DEFAULT 'Helvetica-Oblique;12;1',
  `set_sales_slip_footer_3_font_bold` tinyint DEFAULT '0',
  `set_sales_slip_footer_3_font_wide` tinyint DEFAULT '0',
  `set_sales_slip_footer_4_font_no` tinyint UNSIGNED NOT NULL DEFAULT '1',
  `set_sales_slip_footer_4_font_italic` tinyint DEFAULT '0',
  `set_sales_slip_footer_4_font_name` varchar(50) DEFAULT 'Helvetica-Oblique;12;1',
  `set_sales_slip_footer_3_font_centered` tinyint DEFAULT '1',
  `set_sales_slip_footer_4_font_bold` tinyint DEFAULT '0',
  `set_sales_slip_footer_4_font_wide` tinyint DEFAULT '0',
  `set_sales_slip_footer_4_font_centered` tinyint DEFAULT '1',
  `set_sales_slip_footer_5_font_no` tinyint UNSIGNED NOT NULL DEFAULT '1',
  `set_sales_slip_footer_5_font_italic` tinyint DEFAULT '0',
  `set_sales_slip_footer_5_font_name` varchar(50) DEFAULT 'Helvetica-Oblique;12;1',
  `set_sales_slip_footer_5_font_bold` tinyint DEFAULT '0',
  `set_sales_slip_footer_5_font_wide` tinyint DEFAULT '0',
  `set_sales_slip_footer_5_font_centered` tinyint DEFAULT '1',
  `set_sales_slip_footer_6_font_no` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `set_sales_slip_footer_6_font_italic` tinyint DEFAULT '0',
  `set_sales_slip_footer_6_font_name` varchar(50) DEFAULT 'Helvetica-Oblique;12;1',
  `set_sales_slip_footer_6_font_bold` tinyint DEFAULT '0',
  `set_sales_slip_footer_6_font_wide` tinyint DEFAULT '0',
  `set_sales_slip_footer_6_font_centered` tinyint DEFAULT '0',
  `set_sales_slip_footer_7_font_no` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `set_sales_slip_footer_7_font_italic` tinyint DEFAULT '0',
  `set_sales_slip_footer_7_font_name` varchar(50) DEFAULT 'Helvetica-Oblique;12;1',
  `set_sales_slip_footer_7_font_bold` tinyint DEFAULT '0',
  `set_sales_slip_footer_7_font_wide` tinyint DEFAULT '0',
  `set_sales_slip_footer_7_font_centered` tinyint DEFAULT '0',
  `set_sales_slip_footer_8_font_no` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `set_sales_slip_footer_8_font_italic` tinyint DEFAULT '0',
  `set_sales_slip_footer_8_font_name` varchar(50) DEFAULT 'Helvetica-Oblique;12;1',
  `set_sales_slip_footer_8_font_bold` tinyint DEFAULT '0',
  `set_sales_slip_footer_8_font_wide` tinyint DEFAULT '0',
  `set_sales_slip_footer_8_font_centered` tinyint DEFAULT '0',
  `set_sales_slip_footer_9_font_no` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `set_sales_slip_footer_9_font_italic` tinyint DEFAULT '0',
  `set_sales_slip_footer_9_font_name` varchar(50) DEFAULT 'Helvetica-Oblique;12;1',
  `set_sales_slip_footer_9_font_bold` tinyint DEFAULT '0',
  `set_sales_slip_footer_9_font_wide` tinyint DEFAULT '0',
  `set_sales_slip_footer_9_font_centered` tinyint DEFAULT '0',
  `set_transponder_no` int DEFAULT NULL,
  `set_transponder_com` tinyint UNSIGNED DEFAULT '2',
  `set_transponder_com_settings` varchar(50) DEFAULT '9600,0,7,0',
  `set_transponder_with_keyboard` tinyint DEFAULT '1',
  `set_transponder_use` tinyint DEFAULT '0',
  `set_barcode_scanner_no` int DEFAULT NULL,
  `set_barcode_scanner_com` tinyint UNSIGNED DEFAULT '3',
  `set_barcode_scanner_com_settings` varchar(50) DEFAULT '9600,1,8,0',
  `set_barcode_scanner_use` tinyint DEFAULT '0',
  `set_pole_display_no` int DEFAULT NULL,
  `set_pole_display_com` tinyint UNSIGNED DEFAULT '4',
  `set_pole_display_com_settings` varchar(50) DEFAULT '9600,0,8,0',
  `set_pole_display_use` tinyint DEFAULT '0',
  `set_pole_display_text_1` varchar(100) DEFAULT '',
  `set_pole_display_text_2` varchar(100) DEFAULT '** Guten Tag ** ',
  `set_pole_display_text_speed_1` smallint UNSIGNED DEFAULT '60',
  `set_pole_display_text_speed_2` smallint UNSIGNED DEFAULT '60',
  `set_pole_display_type` tinyint UNSIGNED DEFAULT '2',
  `set_pole_display_text_direction_1` tinyint DEFAULT '1',
  `set_pole_display_text_direction_2` tinyint DEFAULT '0',
  `set_cash_drawer_no` int DEFAULT NULL,
  `set_cash_drawer_com` tinyint UNSIGNED DEFAULT '4',
  `set_cash_drawer_com_settings` varchar(50) DEFAULT '9600,0,8,0',
  `set_cash_drawer_use` tinyint DEFAULT '0',
  `set_second_screen_use` tinyint DEFAULT '0',
  `set_second_screen_type` tinyint UNSIGNED DEFAULT '1',
  `set_second_screen_speed` int UNSIGNED DEFAULT '0',
  `set_second_screen_random` tinyint DEFAULT '0',
  `set_second_screen_no` tinyint UNSIGNED DEFAULT '2',
  `set_second_screen_payment_delay` smallint UNSIGNED DEFAULT '30',
  `count_no` varchar(2) DEFAULT NULL,
  `set_payment_must_enter_before_total` tinyint DEFAULT '0',
  `set_cash_drawer_must_be_closed` tinyint DEFAULT '0',
  `set_slip_type` tinyint UNSIGNED DEFAULT '1',
  `set_currency_sign` varchar(3) DEFAULT 'EUR',
  `set_single_line_cancellation` tinyint DEFAULT '0',
  `set_whole_slip_cancellation` tinyint DEFAULT '0',
  `set_logon_twice_logoff` tinyint DEFAULT '1',
  `set_logon_automatic` tinyint DEFAULT '0',
  `set_logff_timer_minutes` int DEFAULT '10',
  `set_kitchen_order_type` tinyint UNSIGNED DEFAULT '1',
  `set_hide_mouse_arrow` tinyint DEFAULT '1',
  `set_slip_prod_no_width_in_characters` tinyint UNSIGNED DEFAULT '6',
  `set_start_with_product_group` int DEFAULT '0',
  `set_round_on_10_cent` tinyint DEFAULT '0',
  `set_no_cash_receipt_is_discountable` tinyint DEFAULT '0',
  `set_general_work_time_start` time DEFAULT '00:00:00',
  `set_general_work_time_hours` int DEFAULT '24',
  `set_operator_stays_logon_each_after_total` tinyint DEFAULT '1',
  `set_operator_accounts_for_each_product` tinyint DEFAULT '0',
  `set_use_synchronisation` tinyint DEFAULT '0',
  `set_display_exit_screen` tinyint DEFAULT '1',
  `set_pos_entry_mask_2_decimal_places` varchar(12) DEFAULT '10,2fS',
  `set_pos_entry_mask_3_decimal_places` varchar(12) DEFAULT '11,3fS',
  `set_slip_vat_width_in_characters` smallint UNSIGNED DEFAULT '1',
  `set_slip_prod_text_maximum_lines` tinyint UNSIGNED DEFAULT '2',
  `set_slip_prod_text_full_width` tinyint DEFAULT '0',
  `set_pos_quantity_entry_mask_on_screen` varchar(12) DEFAULT '11,3fS',
  `set_pos_price_entry_mask_on_screen` varchar(12) DEFAULT '11,3fS',
  `set_pos_total_mask_2_decimal_places` varchar(12) DEFAULT '10,2fS',
  `set_pos_total_mask_3_decimal_places` varchar(50) DEFAULT '11,2fS',
  `set_pos_display_cancelled_lines_bold` tinyint DEFAULT '0',
  `set_lock_pos_if_cash_given_wrong` tinyint DEFAULT '0',
  `set_new_customer_record_invoice_copies` tinyint UNSIGNED DEFAULT '2',
  `set_no_price_list_for_customers` tinyint DEFAULT '1',
  `set_new_customer_record_use_price_list_no` int UNSIGNED DEFAULT '0',
  `set_customer_address_font_no` tinyint UNSIGNED DEFAULT '1',
  `set_customer_address_font_bold` tinyint DEFAULT '0',
  `set_customer_address_font_cetered` tinyint DEFAULT '1',
  `set_customer_address_font_wide` tinyint DEFAULT '0',
  `set_use_money_count_list` tinyint UNSIGNED DEFAULT '1',
  `set_customer_telephone_font_no` tinyint UNSIGNED DEFAULT '1',
  `set_customer_telephone_font_bold` tinyint DEFAULT '1',
  `set_customer_telephone_font_centered` tinyint DEFAULT '1',
  `set_customer_telephone_font_wide` tinyint DEFAULT '0',
  `set_customer_info_font_no` int DEFAULT '1',
  `set_customer_info_font_bold` tinyint DEFAULT '0',
  `set_customer_info_font_centered` tinyint DEFAULT '1',
  `set_customer_info_font_wide` tinyint DEFAULT '0',
  `set_print_cancellation_information_on_accounting` tinyint DEFAULT '1',
  `set_quantity_on_slip_add` tinyint DEFAULT '1',
  `set_print_customer_address` tinyint DEFAULT '1',
  `set_print_customer_telephone` tinyint DEFAULT '0',
  `set_print_customer_info` tinyint DEFAULT '0',
  `set_cancellation_only_one_piece` tinyint DEFAULT '0',
  `set_shutdown_computer_after_exit` tinyint DEFAULT '0',
  `set_print_cancelled_products_on_slip` tinyint DEFAULT '0',
  `set_show_delivery_screen` tinyint UNSIGNED DEFAULT '0',
  `set_combo_meals_prod_no` bigint UNSIGNED DEFAULT '0',
  `set_image_pre_login_screen` longblob,
  `set_lock_pos_if_wrong_cash_given` tinyint DEFAULT '0',
  `set_imput_100_equals_1_quantity` tinyint DEFAULT '0',
  `set_new_customer_record_customer_group` int UNSIGNED DEFAULT '0',
  `set_customer_barcode_prefix` varchar(12) DEFAULT 'L',
  `set_cust_no_walk_in_customer` int UNSIGNED DEFAULT '0',
  `set_customer_barcode_prefix_before` tinyint DEFAULT '1',
  `set_keyboard_stock_display` tinyint DEFAULT '0',
  `set_keyboard_stock_enable` tinyint DEFAULT '0',
  `set_stock_display` tinyint DEFAULT '0',
  `set_stock_enable` tinyint DEFAULT '0',
  `set_standard_cash_for_money_change` decimal(24,6) DEFAULT '250.000000',
  `set_stock_evaluation_type` tinyint UNSIGNED DEFAULT '0',
  `set_stock_assessment_percent` float DEFAULT '0',
  `set_begin_of_the_year` date DEFAULT NULL,
  `set_stock_evaluation_price_list_no` int UNSIGNED DEFAULT '0',
  `stockl_no` int UNSIGNED DEFAULT '1',
  `set_stock_debug_mode` tinyint DEFAULT '0',
  `set_beverage_dispensing_system_no` int DEFAULT NULL,
  `set_beverage_dispensing_system_com` tinyint UNSIGNED DEFAULT '0',
  `set_beverage_dispensing_system_com_settings` varchar(50) DEFAULT '',
  `set_beverage_dispensing_system_use_with_com` tinyint DEFAULT '0',
  `set_beverage_dispensing_system_use_with_list` tinyint DEFAULT '0',
  `set_beverage_dispensing_system_foreign_nr_system` int UNSIGNED DEFAULT NULL,
  `set_use_operator_money_count_list` tinyint UNSIGNED DEFAULT '0',
  `set_display_protection_of_minors_warning` tinyint DEFAULT '1',
  `set_minutes_before_table_got_yellow` smallint UNSIGNED DEFAULT '10',
  `set_print_quantity_greater_than_1_as_a_new_line` tinyint DEFAULT '1',
  `set_display_protection_of_minors_refused_products` tinyint DEFAULT '1',
  `set_print_product_description_bold` tinyint DEFAULT '1',
  `set_print_text_for_interim_billing` varchar(300) DEFAULT '* Dieser Beleg dient nur der Vorabrechnung, bitte verlangen Sie eine Rechnung!',
  `set_reservate_each_slip_after_selecting` tinyint DEFAULT '0',
  `set_reservate_each_slip_with_table_no_after_selecting` tinyint DEFAULT '0',
  `set_scale_no` int DEFAULT NULL,
  `set_scale_com` tinyint UNSIGNED DEFAULT '0',
  `set_scale_com_settings` varchar(50) DEFAULT NULL,
  `set_scale_use` tinyint DEFAULT '0',
  `set_scale_foreign_no_system` int UNSIGNED DEFAULT NULL,
  `set_update_type` tinyint UNSIGNED DEFAULT '1',
  `set_pos_keyboard_keys_types` tinyint UNSIGNED DEFAULT '2',
  `set_debug_mode` tinyint DEFAULT '0',
  `set_customer_tables_are_listed_separately` tinyint DEFAULT '1',
  `set_empty_lines_on_slip` longtext,
  `set_print_accounting_only_main_product_groups` tinyint DEFAULT '0',
  `set_kitchen_order_print_info_instead_product_description` tinyint DEFAULT '0',
  `set_kitchen_order_product_description_maximum_lines` tinyint UNSIGNED DEFAULT '2',
  `set_print_slip_copy_without_header` tinyint DEFAULT '0',
  `set_print_slip_copy_with_large_i_for_sharing` tinyint DEFAULT '1',
  `set_do_not_use_more_than_target_stock_level` tinyint DEFAULT '0',
  `set_print_header_before_next_customer` tinyint DEFAULT '0',
  `set_print_each_product_line_live` tinyint DEFAULT '0',
  `set_show_stock_booking_info` tinyint DEFAULT '1',
  `set_default_stock_no_for_stock_transfers_from` int UNSIGNED DEFAULT '1',
  `set_default_stock_no_for_stock_transfers_to` int UNSIGNED DEFAULT '1',
  `set_background_image_before_logon_width` smallint UNSIGNED DEFAULT '0',
  `set_background_image_before_logon_height` smallint UNSIGNED DEFAULT '0',
  `set_work_time_direct_from_server` tinyint DEFAULT '0',
  `set_caller_identification_use` tinyint DEFAULT '0',
  `set_shared_tables_are_listed_separately` tinyint DEFAULT '1',
  `set_caller_identification_table_no_start` decimal(24,6) DEFAULT '100.000000',
  `set_print_work_time_on_accounting` tinyint DEFAULT '0',
  `set_print_slip_on_each_work_time_logon_logoff` tinyint DEFAULT '0',
  `set_display_stock_transfers_on_accounting` tinyint DEFAULT '0',
  `set_atm_no` int DEFAULT '0',
  `set_atm_com` tinyint UNSIGNED DEFAULT '0',
  `set_atm_com_settings` varchar(50) DEFAULT NULL,
  `set_atm_use` tinyint DEFAULT '0',
  `set_atm_refund_prod_no` bigint UNSIGNED DEFAULT '0',
  `set_lock_table_minutes_before_reservation` smallint UNSIGNED DEFAULT '30',
  `set_color_table_minutes_before_reservation` smallint UNSIGNED DEFAULT '90',
  `set_reservation_enable_from_time` time DEFAULT '11:00:00',
  `set_reservation_enable_until_time` time DEFAULT '22:00:00',
  `set_pos_dialog_page_for_product_characteristics` smallint UNSIGNED DEFAULT '103',
  `set_combo_meals_switch_screen_no` smallint UNSIGNED DEFAULT '7',
  `set_voucher_connect_to_server` tinyint DEFAULT '0',
  `set_scale_text` longtext,
  `set_scale_mark` varchar(4) DEFAULT NULL,
  `set_voucher_cancellation_with_new_voucher` tinyint DEFAULT '0',
  `set_voucher_titel_font_no` tinyint UNSIGNED DEFAULT '0',
  `set_voucher_header_font_bold` tinyint DEFAULT '0',
  `set_voucher_header_font_wide` tinyint DEFAULT '0',
  `set_voucher_header_font_centered` tinyint DEFAULT '0',
  `set_voucher_body_font_no` tinyint UNSIGNED DEFAULT '0',
  `set_voucher_body_font_bold` tinyint DEFAULT '0',
  `set_voucher_body_font_wide` tinyint DEFAULT '0',
  `set_voucher_body_font_centered` tinyint DEFAULT '0',
  `set_voucher_footer_font_no` tinyint UNSIGNED DEFAULT '0',
  `set_voucher_footer_font_bold` tinyint DEFAULT '0',
  `set_voucher_footer_font_wide` tinyint DEFAULT '0',
  `set_voucher_footer_font_centered` tinyint DEFAULT '0',
  `set_voucher_no_for_canncellation_slip` int DEFAULT '0',
  `set_print_operator_on_accounting` tinyint DEFAULT '1',
  `set_caller_identification_no` int DEFAULT '0',
  `set_caller_identification_com` int DEFAULT '0',
  `set_caller_identification_com_settings` varchar(50) DEFAULT NULL,
  `set_each_customer_can_only_pay_with_one_voucher` tinyint DEFAULT '0',
  `set_no_cash_payout_from_voucher` tinyint DEFAULT '0',
  `set_sort_slip_according_product_groups` tinyint DEFAULT '0',
  `set_print_slip_no_as_a_barcode_on_slip` tinyint DEFAULT '0',
  `set_voucher_no_for_generate_vouchers_from_the_level_of_sales` int DEFAULT '0',
  `set_generate_vouchers_from_the_level_of_sales` tinyint DEFAULT '0',
  `set_bonus_points_divider` decimal(38,6) DEFAULT '3.000000',
  `set_bonus_points_voucher_divider` decimal(38,6) DEFAULT '10.000000',
  `set_bonus_points_accouning_from` decimal(38,6) DEFAULT '30.000000',
  `set_operator_can_change_price_and_quantity` tinyint DEFAULT '1',
  `set_operator_switch_on_change_price_and_quantity` tinyint DEFAULT '0',
  `set_display_wait_screen_after_total` tinyint DEFAULT '1',
  `set_company_gln_13_for_product_barcode_no_rearrange` varchar(13) DEFAULT '',
  `set_customer_prepaid_prod_no` bigint UNSIGNED DEFAULT '0',
  `set_print_unit_of_measure_additional_to_product_description` tinyint UNSIGNED DEFAULT '1',
  `set_quantity_on_screen_add` tinyint DEFAULT '0',
  `set_print_confirmaton_after_adding_changing_a_product` tinyint DEFAULT '0',
  `set_print_allergens_on_slip` tinyint DEFAULT '0',
  `set_do_not_print_a_delivery_entrance_slip` tinyint DEFAULT '0',
  `set_unit_of_measure_width_on_slip` tinyint UNSIGNED DEFAULT '3',
  `set_warning_sound_type` tinyint UNSIGNED DEFAULT '1',
  `set_warning_sound_file_name` varchar(100) DEFAULT NULL,
  `set_product_sound_type` tinyint UNSIGNED DEFAULT '1',
  `set_product_sound_file_name` varchar(100) DEFAULT NULL,
  `set_print_daily_accounting_with_customer_payments` tinyint DEFAULT '1',
  `set_print_monthly_accounting_with_customer_payments` tinyint DEFAULT '1',
  `set_final_accounting_for_operators_only_with_handed_over_report` tinyint DEFAULT '1',
  `set_operator_pos_key_color_highlight` tinyint DEFAULT '0',
  `set_book_returns_with_actual_stock_level` tinyint DEFAULT '1',
  `set_accept_sales_proposals` tinyint UNSIGNED DEFAULT '2',
  `set_reminder_sound_type` tinyint UNSIGNED DEFAULT '0',
  `set_reminder_sound_file_name` varchar(100) DEFAULT NULL,
  `set_dayparts_definition` varchar(200) DEFAULT 'Morgen;06:00;08:59,Vormittag;09:00;11:59,Mittag;12:00;13:59,Nachmittag;14:00;17:59,Abend;18:00;20:59,Nacht;21:00;05:59',
  `set_print_inventory_on_windows_printer` tinyint DEFAULT '0',
  `set_windows_printer_for_inventory` varchar(128) DEFAULT NULL,
  `set_recalculate_slip_with_customer_prices` tinyint DEFAULT '1',
  `set_email_receipt_enable` tinyint DEFAULT '0',
  `set_email_receipt_interval` int DEFAULT '1500',
  `set_email_receipt_ignore_in_minutes` tinyint UNSIGNED DEFAULT '5',
  `set_email_sound_type` tinyint UNSIGNED DEFAULT '0',
  `set_email_sound_file_name` varchar(100) DEFAULT NULL,
  `set_customer_account_sign` varchar(10) DEFAULT NULL,
  `set_use_product_description_as_rtf_field` tinyint DEFAULT '1',
  `set_bluecode_product_no` bigint UNSIGNED DEFAULT '0',
  `set_bluecode_barcode_lenght` smallint UNSIGNED DEFAULT '3',
  `set_bluecode_use` tinyint DEFAULT '0',
  `set_bluecode_ping` varchar(70) DEFAULT 'https://merchant-api.bluecode.com/v4/ping',
  `set_bluecode_url` varchar(120) DEFAULT 'https://merchant-api.bluecode.com/v4',
  `set_bluecode_pay_endpoint` varchar(35) DEFAULT '/payment',
  `set_bluecode_listen_endpoint` varchar(35) DEFAULT '/status',
  `set_bluecode_register_endpoint` varchar(35) DEFAULT '/register',
  `set_bluecode_delete_endpoint` varchar(50) DEFAULT '/schemes/delete',
  `set_bluecode_code_endpoint` varchar(50) DEFAULT '/schemes/code',
  `set_bluecode_user_agent` varchar(120) DEFAULT 'Systemhaus_Predl_Touch_Extra_%1',
  `set_bluecode_merchant_id` varchar(50) DEFAULT '',
  `set_bluecode_merchant_security_key` varchar(40) DEFAULT '',
  `set_bluecode_branch_no` varchar(20) DEFAULT '',
  `set_bluecode_use_tip_in_pos` tinyint DEFAULT '0',
  `set_rksv_turnover_counter` bigint DEFAULT '0',
  `set_bluecode_timeout` int UNSIGNED DEFAULT '60',
  `set_accounting_debug_mode` tinyint DEFAULT '0',
  `set_list_all_products_wich_are_not_printed_on_kitchen_order` longtext,
  `set_fiscal_authorities_member_id` varchar(50) DEFAULT NULL,
  `set_fiscal_authorities_user_id` varchar(50) DEFAULT NULL,
  `set_fiscal_authorities_pin` varchar(50) DEFAULT NULL,
  `set_rksv_turnover_counter_aes_crypted` varchar(50) DEFAULT NULL,
  `set_rksv_aes_256_key` varchar(50) DEFAULT NULL,
  `set_rksv_turnover_last_slip_no` bigint UNSIGNED DEFAULT '0',
  `set_fiscal_authorities_uuid` varchar(14) DEFAULT NULL,
  `set_rksv_use` tinyint DEFAULT '0',
  `set_fiscal_authorities_gln` varchar(13) DEFAULT NULL,
  `set_fiscal_authorities_tax_number` varchar(14) DEFAULT NULL,
  `set_fiscal_authorities_order_type` tinyint UNSIGNED DEFAULT '1',
  `set_fiscal_authorities_smart_card_hex` varchar(12) DEFAULT NULL,
  `set_fiscal_authorities_smart_card_type` tinyint UNSIGNED DEFAULT '1',
  `set_fiscal_authorities_provider` tinyint UNSIGNED DEFAULT '1',
  `set_fiscal_authorities_use` tinyint DEFAULT '0',
  `set_fiscal_authorities_transmission_type` varchar(1) DEFAULT 'P',
  `set_fiscal_authorities_smart_card_certificate` longtext,
  `set_rksv_aes_256_checksum` varchar(4) DEFAULT NULL,
  `set_fiscal_authorities_transmission_url` varchar(128) DEFAULT NULL,
  `set_enable_keyboard_entry_on_pos_screen` tinyint DEFAULT '0',
  `set_enable_keyboard_entry_on_pos_payment_entry` tinyint DEFAULT '0',
  `set_automatic_accounting` tinyint DEFAULT '0',
  `set_automatic_accounting_time` time DEFAULT NULL,
  `set_quantity_on_kitchen_order_add` tinyint DEFAULT '0',
  `set_print_inventory_counting_with_target_stock_levels` tinyint NOT NULL DEFAULT '1',
  `set_print_ongoing_bonus_points_on_slip` tinyint NOT NULL DEFAULT '0',
  `set_fill_inventory_with_current_stock_level` tinyint DEFAULT '0',
  `set_print_inventory_counting_list` tinyint DEFAULT '1',
  `set_print_inventory_recording_list` tinyint DEFAULT '1',
  `set_direct_debit_id` varchar(35) DEFAULT '',
  `set_new_customer_records_no_from` int UNSIGNED DEFAULT NULL,
  `set_new_customer_records_no_` int UNSIGNED DEFAULT NULL,
  `set_call_server_on_new_customer_record` tinyint DEFAULT '1',
  `set_use_server_for_voucher_gernerate` tinyint DEFAULT '1',
  `set_customer_address_font_name` varchar(50) DEFAULT 'Helvetica-Oblique;12;1',
  `set_customer_telephone_font_name` varchar(50) DEFAULT 'Helvetica-Oblique;12;1',
  `set_customer_info_font_name` varchar(50) DEFAULT 'Helvetica-Oblique;12;1',
  `set_kitchen_order_body_column_width` varchar(50) DEFAULT '12;88',
  `set_kitchen_order_title_font_name` varchar(50) DEFAULT 'Helvetica-Oblique;12;1',
  `set_kitchen_order_body_header_font_name` varchar(50) DEFAULT 'Helvetica-Oblique;10;1',
  `set_kitchen_order_body_lines_font_name` varchar(50) DEFAULT 'Helvetica;10',
  `set_kitchen_order_footer_font_name` varchar(50) DEFAULT 'Helvetica;8',
  `set_kitchen_order_footer_total_font_name` varchar(50) DEFAULT 'Helvetica-Oblique;12;1',
  `set_voucher_header_font_name` varchar(50) DEFAULT 'Helvetica;12',
  `set_voucher_body_font_name` varchar(50) DEFAULT 'Helvetica;12',
  `set_voucher_footer_font_name` varchar(50) DEFAULT 'Helvetica;12',
  `set_voucher_titel_font_name` varchar(50) DEFAULT 'Helvetica-Oblique;12;1',
  `set_kitchen_order_line_spacing` float DEFAULT '0',
  `set_merge_port_use` tinyint DEFAULT '0',
  `set_merge_port_directory` varchar(128) DEFAULT NULL,
  `set_merge_port_device_id` varchar(25) DEFAULT NULL,
  `set_merge_port_url` varchar(128) DEFAULT 'http://localhost:8080/',
  `set_merge_port_request_token_url` varchar(50) DEFAULT 'oauth/token',
  `set_merge_port_refresh_token_url` varchar(50) DEFAULT 'oauth/token',
  `set_merge_port_payment_create_url` varchar(50) DEFAULT 'api/payment/%1/transactions',
  `set_merge_port_payment_get_transaction_url` varchar(50) DEFAULT 'api/payment/%1/transactions',
  `set_merge_port_payment_get_all_transactions_url` varchar(50) DEFAULT 'api/payment/%1/transactions',
  `set_merge_port_payment_delete_url` varchar(50) DEFAULT 'api/payment/%1/transactions',
  `set_merge_port_terminal_user` varchar(80) DEFAULT 'admin',
  `set_merge_port_terminal_password` varchar(50) DEFAULT 'admin',
  `set_merge_port_user` varchar(80) DEFAULT 'admin',
  `set_merge_port_password` varchar(50) DEFAULT 'admin',
  `set_merge_port_payment_provider` varchar(50) DEFAULT 'SIX',
  `set_merge_port_payment_transaction_type` varchar(200) DEFAULT 'PURCHASE;CANCEL;REFUND;PRE_AUTH;COMPLETE;END_OF_DAY',
  `set_webshop_use` tinyint DEFAULT '0',
  `set_webshop_shop_no` int DEFAULT '1',
  `set_webshop_language_no` int DEFAULT '1',
  `set_webshop_ftl_url` varchar(160) DEFAULT NULL,
  `set_webshop_ftp_username` varchar(50) DEFAULT NULL,
  `set_webshop_ftp_password` varchar(50) DEFAULT NULL,
  `set_webshop_import_orders` tinyint DEFAULT '0',
  `set_webshop_upload_url` varchar(160) DEFAULT NULL,
  `set_webshop_download_url` varchar(160) DEFAULT NULL,
  `set_webshop_query_each_seconds` int UNSIGNED DEFAULT '10',
  `set_webshop_type` tinyint UNSIGNED DEFAULT '1',
  `set_webshop_start_table_no` decimal(24,6) DEFAULT '100.000000',
  `set_webshop_start_table_type` tinyint UNSIGNED DEFAULT '1',
  `set_webshop_new_customers_customer_group` int UNSIGNED DEFAULT '0',
  `set_webshop_order_master_endpoint` varchar(50) DEFAULT NULL,
  `set_webshop_order_details_endpoint` varchar(50) DEFAULT NULL,
  `set_operators_cannot_use_same_table_groups` tinyint DEFAULT '0',
  `set_operators_logon_ask_table_group` tinyint DEFAULT '0',
  `set_tables_same_as_on_mobile_phone` tinyint DEFAULT '0',
  `set_before_accounting_repair_database` tinyint DEFAULT '0',
  `set_before_accounting_send_data_to_server` tinyint DEFAULT '0',
  `set_before_accounting_check_data_on_server` tinyint DEFAULT '0',
  `set_print_product_group_accounting_with_customers` tinyint DEFAULT '0',
  `set_print_product_group_accounting_customer_sum` tinyint DEFAULT '0',
  `set_print_product_group_accounting_customer_no_total` tinyint DEFAULT '0',
  `set_bluecode_cancel_endpoint` varchar(35) DEFAULT '/cancel',
  `set_bluecode_refund_endpoint` varchar(35) DEFAULT '/refund',
  `set_bluecode_heartbeat_endpoint` varchar(35) DEFAULT '/heartbeat',
  `set_bluecode_transaction_callback` varchar(50) DEFAULT '/determined-by-merchant',
  `set_bluecode_loyalty_status` varchar(50) DEFAULT '/loyalty/status',
  `set_bluecode_loyalty_update` varchar(50) DEFAULT '/loyalty/update',
  `set_bluecode_rewards_redeem` varchar(50) DEFAULT '/rewards/redeem',
  `set_bluecode_authorizations` varchar(50) DEFAULT '/authorizations',
  `set_bluecode_charges` varchar(50) DEFAULT '/charges',
  `set_bluecode_alipay_product_no` bigint UNSIGNED DEFAULT '0',
  `set_bluecode_alipay_barcode_lenght` tinyint UNSIGNED DEFAULT '2',
  `set_bluecode_alipay_timeout` smallint UNSIGNED DEFAULT '60',
  `set_bluecode_time_zone` varchar(80) DEFAULT 'Europe/Vienna',
  `set_bluecode_use_loyality_program` tinyint DEFAULT '0',
  `set_operator_price_list_no` tinyint UNSIGNED DEFAULT '0',
  `set_operator_price_list_valid_for_all_operators` tinyint UNSIGNED DEFAULT '1',
  `set_operator_price_list_percent_selection` tinyint UNSIGNED DEFAULT '0',
  `set_back_plus_use_rksv_for_driver` tinyint DEFAULT '0',
  `set_back_plus_use_rksv_for_cash_payment_invoice` tinyint DEFAULT '0',
  `set_back_plus_signatur_station_no` smallint UNSIGNED DEFAULT '0',
  `set_back_plus_signatur_branch_no` smallint UNSIGNED DEFAULT '0',
  `set_back_plus_signatur_program_directory` varchar(128) DEFAULT NULL,
  `set_back_plus_signatur_data_directory` varchar(128) DEFAULT NULL,
  `set_back_plus_signatur_query_every_ms` int UNSIGNED DEFAULT '500',
  `set_back_plus_signatur_operator_no` smallint UNSIGNED DEFAULT '0',
  `set_back_plus_rksv_turnover_10` bigint UNSIGNED DEFAULT '0',
  `set_back_plus_rksv_turnover_20` bigint UNSIGNED DEFAULT '0',
  `set_back_plus_rksv_turnover_13` bigint UNSIGNED DEFAULT '0',
  `set_back_plus_rksv_turnover_19` bigint UNSIGNED DEFAULT '0',
  `set_back_plus_rksv_turnover_0` bigint UNSIGNED DEFAULT '0',
  `set_use_mobile_pos_webservice` tinyint DEFAULT '0',
  `set_mobile_pos_webservice_type` tinyint UNSIGNED DEFAULT '1',
  `set_mobile_pos_webservice_ip` varchar(128) DEFAULT NULL,
  `set_mobile_pos_webservice_username` varchar(40) DEFAULT NULL,
  `set_mobile_pos_webservice_password` varchar(20) DEFAULT NULL,
  `set_mobile_pos_webservice_use_encryption` tinyint DEFAULT '0',
  `set_use_error_email_reports` longtext,
  `set_gdi_footer_atm_font_name` varchar(50) DEFAULT 'Courier New',
  `set_bluecode_slip_name` longtext,
  `set_bluecode_slip_street` varchar(255) DEFAULT NULL,
  `set_bluecode_slip_zip_code` varchar(20) DEFAULT NULL,
  `set_bluecode_slip_city` varchar(128) DEFAULT NULL,
  `set_bluecode_slip_phone` varchar(50) DEFAULT NULL,
  `set_bluecode_slip_website` varchar(128) DEFAULT NULL,
  `set_bluecode_slip_uid` varchar(12) DEFAULT NULL,
  `set_bluecode_slip_notes` longtext,
  `set_external_stock_use` tinyint DEFAULT '0',
  `set_extermal_stock_url` varchar(128) DEFAULT NULL,
  `set_external_stock_user_name` varchar(50) DEFAULT NULL,
  `set_external_stock_password` varchar(50) DEFAULT NULL,
  `set_external_stock_query_endpoint` varchar(50) DEFAULT 'query.php',
  `set_external_stock_debit_endpoint` varchar(50) DEFAULT 'debit.php',
  `set_external_stock_set_endpoint` varchar(50) DEFAULT 'set.php',
  `set_external_stock_reservation_endpoint` varchar(50) DEFAULT 'reservation.php',
  `set_external_stock_set_null_endpoint` varchar(50) DEFAULT 'set_null.php',
  `set_external_stock_adjust_endpoint` varchar(50) DEFAULT 'adjust.php',
  `set_external_stock_reservation_delete_endpoint` varchar(50) DEFAULT 'reservation_delete.php',
  `set_wait_list_use` tinyint DEFAULT '0',
  `set_tse_use` tinyint DEFAULT '0',
  `set_tse_type` tinyint UNSIGNED DEFAULT '0',
  `set_tse_public_key` longtext,
  `set_tse_serial_no` varchar(64) DEFAULT NULL,
  `set_tse_certificate` longtext,
  `set_tse_started_date_time` datetime(3) DEFAULT NULL,
  `set_tse_slip_counter` bigint DEFAULT '0',
  `set_tse_turnover_counter` bigint DEFAULT '0',
  `set_tse_drive_letter` varchar(1) DEFAULT NULL,
  `set_tse_seed` varchar(32) DEFAULT NULL,
  `set_tse_station_name` varchar(30) DEFAULT NULL,
  `set_tse_puk` varchar(6) DEFAULT NULL,
  `set_tse_admin_pin` varchar(5) DEFAULT NULL,
  `set_tse_time_admin_pin` varchar(5) DEFAULT NULL,
  `set_tse_salesm_guid` varchar(50) DEFAULT NULL,
  `set_back_plus_use_tse_for_driver` tinyint DEFAULT '0',
  `set_back_plus_use_tse_for_cash_payment_invoice` tinyint DEFAULT '0',
  `set_back_plus_tse_turnover_19` bigint DEFAULT '0',
  `set_back_plus_tse_turnover_7` bigint DEFAULT '0',
  `set_back_plus_tse_turnover_10_5` bigint DEFAULT '0',
  `set_back_plus_tse_turnover_5_5` bigint DEFAULT '0',
  `set_back_plus_tse_turnover_0` bigint DEFAULT '0',
  `set_import_external_database_use` tinyint DEFAULT '0',
  `set_import_external_database_url` varchar(128) DEFAULT NULL,
  `set_import_external_database_password` varchar(50) DEFAULT NULL,
  `set_import_external_database_user_name` varchar(50) DEFAULT NULL,
  `set_import_external_database_interval` int DEFAULT NULL,
  `set_import_external_database_stock_locations_endpoint` varchar(50) DEFAULT NULL,
  `set_import_external_database_product_groups_endpoint` varchar(50) DEFAULT NULL,
  `set_import_external_database_products_endpoint` varchar(50) DEFAULT NULL,
  `set_import_external_database_vat_endpoint` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`set_id`),
  UNIQUE KEY `station_no` (`station_no`),
  KEY `WDIDX1691098206437` (`comset_no`),
  KEY `WDIDX1691098206438` (`set_transponder_no`),
  KEY `WDIDX1691098206439` (`set_barcode_scanner_no`),
  KEY `WDIDX1691098207440` (`set_pole_display_no`),
  KEY `WDIDX1691098207441` (`set_cash_drawer_no`),
  KEY `WDIDX1691098207442` (`count_no`),
  KEY `WDIDX1691098207443` (`stockl_no`),
  KEY `WDIDX1691098207444` (`set_beverage_dispensing_system_no`),
  KEY `WDIDX1691098207445` (`set_beverage_dispensing_system_foreign_nr_system`),
  KEY `WDIDX1691098207446` (`set_scale_no`),
  KEY `WDIDX1691098207447` (`set_scale_foreign_no_system`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `stock_characteristics`
--

DROP TABLE IF EXISTS `stock_characteristics`;
CREATE TABLE IF NOT EXISTS `stock_characteristics` (
  `stockc_id` bigint NOT NULL AUTO_INCREMENT,
  `stockm_guid` varchar(32) DEFAULT NULL,
  `prodc_guid` varchar(32) DEFAULT NULL,
  `stockc_changed_date_time` datetime(3) DEFAULT NULL,
  `stockc_stock_level` double DEFAULT '0',
  `stockc_minimum_order_quantity` double DEFAULT '0',
  `stockc_minimum_stock_level` double DEFAULT '0',
  `stockc_target_stock_level` double DEFAULT '0',
  `stockc_minimum_stock_value` decimal(24,6) DEFAULT '0.000000',
  `stockc_average_stock_value` decimal(24,6) DEFAULT '0.000000',
  `stockc_maximum_stock_value` decimal(24,6) DEFAULT '0.000000',
  `stockc_average_purchasing_price_net` decimal(24,6) DEFAULT '0.000000',
  `stockc_average_purchasing_price_gross` decimal(24,6) DEFAULT '0.000000',
  PRIMARY KEY (`stockc_id`),
  KEY `WDIDX1691098208448` (`stockm_guid`),
  KEY `WDIDX1691098208449` (`prodc_guid`),
  KEY `WDIDX1691098208450` (`stockc_changed_date_time`),
  KEY `stockc_key` (`stockm_guid`,`prodc_guid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `stock_details`
--

DROP TABLE IF EXISTS `stock_details`;
CREATE TABLE IF NOT EXISTS `stock_details` (
  `stockd_id` bigint NOT NULL AUTO_INCREMENT,
  `prodc_guid` varchar(32) DEFAULT NULL,
  `salesm_guid` varchar(32) DEFAULT NULL,
  `stockd_guid` varchar(32) DEFAULT NULL,
  `stockm_guid` varchar(32) DEFAULT NULL,
  `stockd_source` int UNSIGNED DEFAULT NULL,
  `stockd_destination` int UNSIGNED DEFAULT NULL,
  `salesd_line_no` int DEFAULT '0',
  `opera_no` smallint UNSIGNED DEFAULT NULL,
  `stockd_date_time` datetime(3) DEFAULT NULL,
  `stockd_date_time_logic` datetime(3) DEFAULT NULL,
  `stockd_changed_date_time` datetime(3) DEFAULT NULL,
  `stockd_type` tinyint UNSIGNED DEFAULT '0',
  `stockd_amount` double DEFAULT '0',
  `stockd_retail_price_gross` decimal(24,6) DEFAULT '0.000000',
  `stockd_retail_price_net` decimal(24,6) DEFAULT '0.000000',
  `stockd_purchasing_price_net` decimal(24,6) DEFAULT '0.000000',
  `stockd_description` varchar(50) DEFAULT NULL,
  `sup_no` int UNSIGNED DEFAULT NULL,
  `stockd_uploaded` tinyint DEFAULT '0',
  `stockd_uploaded_date_time` datetime(3) DEFAULT NULL,
  PRIMARY KEY (`stockd_id`),
  KEY `WDIDX1691098208451` (`prodc_guid`),
  KEY `WDIDX1691098208452` (`salesm_guid`),
  KEY `WDIDX1691098208453` (`stockd_guid`),
  KEY `WDIDX1691098208454` (`stockm_guid`),
  KEY `WDIDX1691098208455` (`stockd_source`),
  KEY `WDIDX1691098208456` (`stockd_destination`),
  KEY `WDIDX1691098208457` (`salesd_line_no`),
  KEY `WDIDX1691098208458` (`opera_no`),
  KEY `WDIDX1691098208459` (`stockd_date_time`),
  KEY `WDIDX1691098208460` (`stockd_changed_date_time`),
  KEY `WDIDX1691098208461` (`sup_no`),
  KEY `WDIDX1691098208462` (`stockd_uploaded`),
  KEY `stockd_key` (`stockm_guid`,`stockd_guid`),
  KEY `stockd_key_slip` (`salesm_guid`,`salesd_line_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `stock_locations`
--

DROP TABLE IF EXISTS `stock_locations`;
CREATE TABLE IF NOT EXISTS `stock_locations` (
  `stockl_id` bigint NOT NULL AUTO_INCREMENT,
  `stockl_no` int UNSIGNED NOT NULL DEFAULT '0',
  `stockl_description` varchar(50) DEFAULT NULL,
  `stockl_ref_no` int UNSIGNED DEFAULT NULL,
  `stockl_composite_no_description` varchar(57) DEFAULT NULL,
  PRIMARY KEY (`stockl_id`),
  UNIQUE KEY `stockl_no` (`stockl_no`),
  KEY `WDIDX1691098208463` (`stockl_description`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `stock_log`
--

DROP TABLE IF EXISTS `stock_log`;
CREATE TABLE IF NOT EXISTS `stock_log` (
  `stocklog_id` bigint NOT NULL AUTO_INCREMENT,
  `stocklog_text` longtext,
  `stocklog_date_time` datetime(3) DEFAULT NULL,
  `stocklog_source_function` varchar(128) DEFAULT NULL,
  `station_no` int UNSIGNED DEFAULT '0',
  `stocklog_changed_date` datetime(3) DEFAULT NULL,
  `stocklog_changed_type` tinyint UNSIGNED DEFAULT '0',
  `stocklog_changed_operation` tinyint UNSIGNED DEFAULT '0',
  `stocklog_file` varchar(25) DEFAULT NULL,
  `stocklog_quantity_before` decimal(24,6) DEFAULT '0.000000',
  `stocklog_quantity_after` decimal(24,6) DEFAULT '0.000000',
  `stocklog_stock_master_guid` varchar(32) DEFAULT NULL,
  `stocklog_stock_details_guid` varchar(32) DEFAULT NULL,
  `prod_no` bigint UNSIGNED DEFAULT NULL,
  PRIMARY KEY (`stocklog_id`),
  KEY `WDIDX1691098208464` (`stocklog_date_time`),
  KEY `WDIDX1691098208465` (`station_no`),
  KEY `WDIDX1691098208466` (`prod_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `stock_master`
--

DROP TABLE IF EXISTS `stock_master`;
CREATE TABLE IF NOT EXISTS `stock_master` (
  `stockm_id` bigint NOT NULL AUTO_INCREMENT,
  `stockm_guid` varchar(32) NOT NULL DEFAULT '',
  `branch_no` int UNSIGNED NOT NULL DEFAULT '0',
  `stockl_no` int UNSIGNED NOT NULL DEFAULT '0',
  `prod_no` bigint UNSIGNED NOT NULL DEFAULT '0',
  `stockm_changed` datetime(3) DEFAULT NULL,
  `stockm_stock` double DEFAULT '0',
  `stockm_reserved` double DEFAULT '0',
  `stockm_last_stock` double DEFAULT '0',
  `stockm_last_stock_date` datetime(3) DEFAULT NULL,
  `stockm_minimum_order_quantity` double DEFAULT '0',
  `stockm_minimum_stock` double DEFAULT '0',
  `stockm_planned_stock_levelr` double DEFAULT '0',
  `stockm_minimum_stock_value` decimal(24,6) DEFAULT '0.000000',
  `stockm_average_stock_value` decimal(24,6) DEFAULT '0.000000',
  `stockm_maximum_stock_value` decimal(24,6) DEFAULT '0.000000',
  `stockm_average_stock_value_net` decimal(24,6) DEFAULT '0.000000',
  `stockm_average_stock_value_gross` decimal(24,6) DEFAULT '0.000000',
  PRIMARY KEY (`stockm_id`),
  UNIQUE KEY `stockm_guid` (`stockm_guid`),
  UNIQUE KEY `stockm_key` (`branch_no`,`stockl_no`,`prod_no`),
  KEY `WDIDX1691098208467` (`branch_no`),
  KEY `WDIDX1691098208468` (`stockl_no`),
  KEY `WDIDX1691098208469` (`prod_no`),
  KEY `WDIDX1691098208470` (`stockm_changed`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `stock_reservations`
--

DROP TABLE IF EXISTS `stock_reservations`;
CREATE TABLE IF NOT EXISTS `stock_reservations` (
  `stockr_id` bigint NOT NULL AUTO_INCREMENT,
  `stockl_no` int UNSIGNED DEFAULT '0',
  `prod_no` bigint UNSIGNED DEFAULT '0',
  `stockr_date_time` datetime(3) DEFAULT NULL,
  `stockr_guid` varchar(32) DEFAULT '',
  `stockm_guid` varchar(32) DEFAULT '',
  `salesm_guid` varchar(32) DEFAULT '',
  `salesd_line_no` int DEFAULT '0',
  `stockm_reserved` double DEFAULT '0',
  PRIMARY KEY (`stockr_id`),
  UNIQUE KEY `stockr_guid` (`stockr_guid`),
  KEY `WDIDX1691098208471` (`stockl_no`),
  KEY `WDIDX1691098208472` (`prod_no`),
  KEY `WDIDX1691098208473` (`stockr_date_time`),
  KEY `WDIDX1691098208474` (`stockm_guid`),
  KEY `WDIDX1691098208475` (`salesm_guid`),
  KEY `WDIDX1691098208476` (`salesd_line_no`),
  KEY `stockr_key_slip` (`salesm_guid`,`salesd_line_no`),
  KEY `stockr_key` (`stockl_no`,`prod_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `stock_states`
--

DROP TABLE IF EXISTS `stock_states`;
CREATE TABLE IF NOT EXISTS `stock_states` (
  `stocks_id` bigint NOT NULL AUTO_INCREMENT,
  `shop_no` int DEFAULT NULL,
  `stocks_no` int NOT NULL DEFAULT '0',
  `stocks_description` varchar(32) DEFAULT NULL,
  PRIMARY KEY (`stocks_id`),
  UNIQUE KEY `stocks_no` (`stocks_no`),
  KEY `WDIDX1691098208477` (`shop_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `suppliers`
--

DROP TABLE IF EXISTS `suppliers`;
CREATE TABLE IF NOT EXISTS `suppliers` (
  `sup_id` bigint NOT NULL AUTO_INCREMENT,
  `sup_no` int UNSIGNED NOT NULL DEFAULT '0',
  `sup_ref_no` int UNSIGNED DEFAULT NULL,
  `sup_composite_no_description` varchar(50) DEFAULT NULL,
  `sup_match_code` varchar(40) DEFAULT NULL,
  `sup_company` varchar(40) DEFAULT NULL,
  `sup_company_department` varchar(50) DEFAULT '',
  `sal_no` int DEFAULT '0',
  `tit_no` int DEFAULT '0',
  `sup_first_name` varchar(40) DEFAULT NULL,
  `sup_last_name` varchar(40) DEFAULT NULL,
  `sup_street` varchar(40) DEFAULT NULL,
  `sup_zip` varchar(8) DEFAULT NULL,
  `sup_city` varchar(30) DEFAULT NULL,
  `count_no` varchar(50) DEFAULT '',
  `sup_phone` varchar(50) DEFAULT NULL,
  `sup_fax` varchar(50) DEFAULT NULL,
  `sup_email` varchar(60) DEFAULT NULL,
  `sup_skype` varchar(100) DEFAULT NULL,
  `sup_suspend` tinyint DEFAULT '0',
  `sup_date_created` date DEFAULT NULL,
  `sup_date_last_delivery` datetime(3) DEFAULT NULL,
  `sup_annual_sales` decimal(24,6) DEFAULT NULL,
  `sup_total_revenue` decimal(24,6) DEFAULT NULL,
  `sup_contact_person` varchar(50) DEFAULT NULL,
  `sup_uid` varchar(20) DEFAULT NULL,
  `sup_bankname` varchar(60) DEFAULT NULL,
  `sup_bank_code` varchar(10) DEFAULT NULL,
  `sup_account_number` varchar(50) DEFAULT NULL,
  `sup_iban` varchar(25) DEFAULT NULL,
  `sup_bic_swift` varchar(12) DEFAULT NULL,
  PRIMARY KEY (`sup_id`),
  UNIQUE KEY `sup_no` (`sup_no`),
  KEY `WDIDX1691098208478` (`sup_ref_no`),
  KEY `WDIDX1691098208479` (`sup_composite_no_description`),
  KEY `WDIDX1691098209480` (`sup_match_code`),
  KEY `WDIDX1691098209481` (`sal_no`),
  KEY `WDIDX1691098209482` (`tit_no`),
  KEY `WDIDX1691098209483` (`sup_zip`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `synchronizations`
--

DROP TABLE IF EXISTS `synchronizations`;
CREATE TABLE IF NOT EXISTS `synchronizations` (
  `sync_id` bigint NOT NULL AUTO_INCREMENT,
  `station_no` int UNSIGNED DEFAULT NULL,
  `station_no_destination` int UNSIGNED DEFAULT NULL,
  `sync_enabled` tinyint DEFAULT '0',
  `sync_use_transfer_list` tinyint DEFAULT '0',
  `sync_receive_interval` smallint UNSIGNED DEFAULT '0',
  `sync_receive_send` smallint UNSIGNED DEFAULT '0',
  `sync_database` varchar(50) DEFAULT NULL,
  `sync_ip_address` varchar(50) DEFAULT NULL,
  `sync_provider` tinyint UNSIGNED DEFAULT '2',
  `sync_username` varchar(50) DEFAULT NULL,
  `sync_password` varchar(50) DEFAULT NULL,
  `extended_options` varchar(50) DEFAULT NULL,
  `sync_cursor_options` varchar(50) DEFAULT NULL,
  `sync_crypt_method` tinyint UNSIGNED DEFAULT '0',
  `sync_compression` tinyint DEFAULT '0',
  `sync_cache` smallint UNSIGNED DEFAULT '0',
  `sync_composite_no_name` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`sync_id`),
  UNIQUE KEY `sync_key` (`station_no`,`station_no_destination`),
  KEY `WDIDX1691098209486` (`station_no`),
  KEY `WDIDX1691098209487` (`station_no_destination`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `synchronization_transfer_lists`
--

DROP TABLE IF EXISTS `synchronization_transfer_lists`;
CREATE TABLE IF NOT EXISTS `synchronization_transfer_lists` (
  `trans_id` bigint NOT NULL AUTO_INCREMENT,
  `trans_line_no` smallint UNSIGNED DEFAULT NULL,
  `sync_id` bigint DEFAULT NULL,
  `trans_send_type` tinyint UNSIGNED DEFAULT NULL,
  `trans_from_date` date DEFAULT NULL,
  `trans_to_date` time DEFAULT NULL,
  `trans_shut_down` tinyint DEFAULT '0',
  `trans_weekday_1` tinyint DEFAULT '1',
  `trans_weekday_2` tinyint DEFAULT '1',
  `trans_weekday_3` tinyint DEFAULT '1',
  `trans_weekday_4` tinyint DEFAULT '1',
  `trans_weekday_5` tinyint DEFAULT '1',
  `trans_weekday_6` tinyint DEFAULT '1',
  `trans_weekday_7` tinyint DEFAULT '1',
  PRIMARY KEY (`trans_id`),
  UNIQUE KEY `trans_key` (`sync_id`,`trans_line_no`),
  KEY `WDIDX1691098209484` (`trans_line_no`),
  KEY `WDIDX1691098209485` (`sync_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `tables`
--

DROP TABLE IF EXISTS `tables`;
CREATE TABLE IF NOT EXISTS `tables` (
  `table_id` bigint NOT NULL AUTO_INCREMENT,
  `table_no` int UNSIGNED NOT NULL DEFAULT '0',
  `branch_no` int UNSIGNED NOT NULL DEFAULT '0',
  `dareas_no` int UNSIGNED NOT NULL DEFAULT '0',
  `tableg_no` int DEFAULT '0',
  `table_sort` varchar(8) DEFAULT NULL,
  `table_ref_no` int UNSIGNED DEFAULT NULL,
  `table_composite_no_description` varchar(59) DEFAULT NULL,
  `table_description` varchar(50) DEFAULT NULL,
  `table_number_seats` int DEFAULT NULL,
  `table_pos_x` int DEFAULT '0',
  `table_pos_y` int DEFAULT '0',
  `table_width` int DEFAULT '0',
  `table_height` int DEFAULT '0',
  `table_image_normal` longblob,
  `table_image_occupied` longblob,
  `table_image_waiting` longblob,
  `table_image_reserved` longblob,
  `table_image_reserved_occupied` longblob,
  `table_image_reserved_waiting` longblob,
  `table_calendar_icon` longblob,
  `table_image_normal_file_name` varchar(255) DEFAULT NULL,
  `table_image_occupied_file_name` varchar(255) DEFAULT NULL,
  `table_image_waiting_file_name` varchar(255) DEFAULT NULL,
  `table_image_reserved_file_name` varchar(255) DEFAULT NULL,
  `table_image_reserved_occupied_file_name` varchar(255) DEFAULT NULL,
  `table_image_reserved_waiting_file_name` varchar(255) DEFAULT NULL,
  `table_calendar_icon_file_name` varchar(255) DEFAULT NULL,
  `table_color` int UNSIGNED DEFAULT '0',
  `table_font_color` int UNSIGNED DEFAULT '0',
  `table_font_name` varchar(50) DEFAULT NULL,
  `table_font_size` float DEFAULT '10',
  `table_font_bold` tinyint DEFAULT '0',
  `table_font_italic` tinyint DEFAULT '0',
  `table_font_underlined` tinyint DEFAULT '0',
  `table_fixed_operator` varchar(80) DEFAULT NULL,
  `opera_no` smallint UNSIGNED DEFAULT '0',
  `cust_no` int UNSIGNED DEFAULT '0',
  `table_no_display_on_this_station` varchar(80) DEFAULT NULL,
  `table_calendar_width` smallint UNSIGNED DEFAULT '100',
  `table_no_display_on_calendar` tinyint DEFAULT '0',
  PRIMARY KEY (`table_id`),
  UNIQUE KEY `table_no` (`table_no`),
  UNIQUE KEY `table_key` (`branch_no`,`dareas_no`,`table_no`),
  KEY `WDIDX1691098209488` (`branch_no`),
  KEY `WDIDX1691098209489` (`dareas_no`),
  KEY `WDIDX1691098209490` (`tableg_no`),
  KEY `WDIDX1691098209491` (`table_ref_no`),
  KEY `WDIDX1691098209492` (`table_composite_no_description`),
  KEY `WDIDX1691098209493` (`table_number_seats`),
  KEY `WDIDX1691098209494` (`opera_no`),
  KEY `WDIDX1691098209495` (`cust_no`),
  KEY `table_key_branch` (`branch_no`,`table_no`),
  KEY `table_key_sort` (`branch_no`,`table_sort`),
  KEY `table_key_table_groups` (`branch_no`,`tableg_no`,`table_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `table_groups`
--

DROP TABLE IF EXISTS `table_groups`;
CREATE TABLE IF NOT EXISTS `table_groups` (
  `tableg_id` bigint NOT NULL AUTO_INCREMENT,
  `tableg_no` int NOT NULL DEFAULT '0',
  `tableg_type` tinyint UNSIGNED DEFAULT NULL,
  `tableg_description` varchar(50) DEFAULT NULL,
  `tableg_key` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`tableg_id`),
  UNIQUE KEY `tableg_no` (`tableg_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `titles`
--

DROP TABLE IF EXISTS `titles`;
CREATE TABLE IF NOT EXISTS `titles` (
  `tit_id` bigint NOT NULL AUTO_INCREMENT,
  `tit_no` int NOT NULL DEFAULT '0',
  `tit_description` varchar(50) DEFAULT '',
  PRIMARY KEY (`tit_id`),
  UNIQUE KEY `tit_no` (`tit_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `tse_dep`
--

DROP TABLE IF EXISTS `tse_dep`;
CREATE TABLE IF NOT EXISTS `tse_dep` (
  `tsed_id` bigint NOT NULL AUTO_INCREMENT,
  `tsed_no` bigint DEFAULT '0',
  `branch_no` int UNSIGNED DEFAULT '0',
  `station_no` int UNSIGNED DEFAULT '0',
  `salesm_guid` varchar(32) DEFAULT '',
  `salesm_slip_no` bigint UNSIGNED DEFAULT '0',
  `salesm_date` date DEFAULT NULL,
  `salesm_time` time DEFAULT NULL,
  `tsed_type` tinyint UNSIGNED DEFAULT '0',
  `tsed_signature_counter` varchar(50) DEFAULT '',
  `tsed_turnover_total` decimal(24,6) DEFAULT '0.000000',
  `tsed_signature` longtext,
  `tsed_serial_no` varchar(64) DEFAULT '',
  `tsed_transaction_no` bigint UNSIGNED DEFAULT '0',
  `tsed_turnover_1` decimal(24,6) DEFAULT '0.000000',
  `tsed_turnover_2` decimal(24,6) DEFAULT '0.000000',
  `tsed_turnover_3` decimal(24,6) DEFAULT '0.000000',
  `tsed_turnover_4` decimal(24,6) DEFAULT '0.000000',
  `tsed_turnover_5` decimal(24,6) DEFAULT '0.000000',
  PRIMARY KEY (`tsed_id`),
  KEY `WDIDX1691098209496` (`tsed_no`),
  KEY `WDIDX1691098209497` (`branch_no`),
  KEY `WDIDX1691098209498` (`station_no`),
  KEY `WDIDX1691098209499` (`salesm_guid`),
  KEY `WDIDX1691098209500` (`salesm_slip_no`),
  KEY `WDIDX1691098209501` (`salesm_date`),
  KEY `WDIDX1691098209502` (`salesm_time`),
  KEY `WDIDX1691098209503` (`tsed_type`),
  KEY `tsed_key` (`station_no`,`tsed_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `unit_of_measure`
--

DROP TABLE IF EXISTS `unit_of_measure`;
CREATE TABLE IF NOT EXISTS `unit_of_measure` (
  `unit_id` bigint NOT NULL AUTO_INCREMENT,
  `unit_no` smallint UNSIGNED NOT NULL DEFAULT '0',
  `unit_description` varchar(35) DEFAULT NULL,
  `unit_description_slip` varchar(5) DEFAULT NULL,
  PRIMARY KEY (`unit_id`),
  UNIQUE KEY `unit_no` (`unit_no`),
  KEY `WDIDX1691098209504` (`unit_description`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Daten für Tabelle `unit_of_measure`
--

INSERT INTO `unit_of_measure` (`unit_id`, `unit_no`, `unit_description`, `unit_description_slip`) VALUES
(1, 1, 'Stück', 'Stk.');

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `vat`
--

DROP TABLE IF EXISTS `vat`;
CREATE TABLE IF NOT EXISTS `vat` (
  `vat_id` bigint NOT NULL AUTO_INCREMENT,
  `vat_no` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `vat_composite_no_description` varchar(50) DEFAULT NULL,
  `shop_id` bigint DEFAULT NULL,
  `vat_description` varchar(50) DEFAULT NULL,
  `vat_percent` decimal(24,6) DEFAULT '0.000000',
  `vat_description_slip` varchar(8) DEFAULT NULL,
  `vat_no_accounting` int UNSIGNED DEFAULT '0',
  `vat_rksv_type` tinyint UNSIGNED DEFAULT '0',
  `vat_tse_type` tinyint UNSIGNED DEFAULT '0',
  PRIMARY KEY (`vat_id`),
  UNIQUE KEY `vat_no` (`vat_no`),
  KEY `WDIDX1691098209505` (`vat_composite_no_description`),
  KEY `WDIDX1691098209506` (`shop_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `versions`
--

DROP TABLE IF EXISTS `versions`;
CREATE TABLE IF NOT EXISTS `versions` (
  `ver_id` bigint NOT NULL AUTO_INCREMENT,
  `ver_guid` varchar(32) DEFAULT NULL,
  `ver_analyse_version` int UNSIGNED DEFAULT NULL,
  `ver_programm_version` varchar(14) DEFAULT NULL,
  `ver_update_url` varchar(128) DEFAULT NULL,
  `ver_last_update_date` date DEFAULT NULL,
  PRIMARY KEY (`ver_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Daten für Tabelle `versions`
--

INSERT INTO `versions` (`ver_id`, `ver_guid`, `ver_analyse_version`, `ver_programm_version`, `ver_update_url`, `ver_last_update_date`) VALUES
(1, '59F3603BC9594C23A23B2B9DDB2F90EC', 65, '10.20.xx', 'https://www.primapos.at/downloads/', '2024-07-23');

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `voucher_details`
--

DROP TABLE IF EXISTS `voucher_details`;
CREATE TABLE IF NOT EXISTS `voucher_details` (
  `vouchd_id` bigint NOT NULL AUTO_INCREMENT,
  `vouchd_no` int UNSIGNED DEFAULT NULL,
  `vouchm_no` int UNSIGNED DEFAULT NULL,
  `branch_no` int UNSIGNED DEFAULT NULL,
  `prod_no` bigint UNSIGNED DEFAULT NULL,
  `vouchd_description` varchar(50) DEFAULT NULL,
  `vouchd_reserved` tinyint DEFAULT '0',
  `vouchd_changed_date` datetime(3) DEFAULT NULL,
  `vouchd_ean` varchar(80) DEFAULT NULL,
  `vouchd_created_on` date DEFAULT NULL,
  `vouchd_selled` tinyint DEFAULT '0',
  `vouchd_selled_on` datetime(3) DEFAULT NULL,
  `vouchd_selled_from` smallint UNSIGNED DEFAULT '0',
  `vouchd_redeemed` tinyint DEFAULT '0',
  `vouchd_redeemed_on` datetime(3) DEFAULT NULL,
  `vouchd_redeemed_from` smallint UNSIGNED DEFAULT '0',
  `vouchd_value` decimal(24,6) DEFAULT '0.000000',
  `vouchd_up_to_purchase_value` decimal(24,6) DEFAULT '0.000000',
  `vouchd_printed` tinyint DEFAULT '0',
  `vouchd_from_date` date DEFAULT NULL,
  `vouchd_to_date` date DEFAULT NULL,
  `vouchd_type` tinyint UNSIGNED DEFAULT '0',
  `vouchd_seller_slip_guid` varchar(32) DEFAULT NULL,
  `vouchd_redeemed_slip_guid` varchar(32) DEFAULT NULL,
  PRIMARY KEY (`vouchd_id`),
  UNIQUE KEY `vouchd_ean` (`vouchd_ean`),
  UNIQUE KEY `vouchd_key` (`vouchm_no`,`vouchd_no`),
  KEY `WDIDX1691098210507` (`vouchd_no`),
  KEY `WDIDX1691098210508` (`vouchm_no`),
  KEY `WDIDX1691098210509` (`branch_no`),
  KEY `WDIDX1691098210510` (`prod_no`),
  KEY `WDIDX1691098210511` (`vouchd_description`),
  KEY `WDIDX1691098210512` (`vouchd_reserved`),
  KEY `WDIDX1691098210513` (`vouchd_changed_date`),
  KEY `WDIDX1691098210514` (`vouchd_created_on`),
  KEY `WDIDX1691098210515` (`vouchd_selled`),
  KEY `WDIDX1691098210516` (`vouchd_selled_on`),
  KEY `WDIDX1691098210517` (`vouchd_redeemed`),
  KEY `WDIDX1691098210518` (`vouchd_redeemed_on`),
  KEY `WDIDX1691098210519` (`vouchd_printed`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `voucher_generations`
--

DROP TABLE IF EXISTS `voucher_generations`;
CREATE TABLE IF NOT EXISTS `voucher_generations` (
  `vouchg_id` bigint NOT NULL AUTO_INCREMENT,
  `vouchm_no` int UNSIGNED DEFAULT NULL,
  `vouchg_line` smallint UNSIGNED DEFAULT '0',
  `vouchg_from_value` decimal(24,6) DEFAULT '0.000000',
  `vouchg_value` decimal(24,6) DEFAULT '0.000000',
  `vouchg_changed_date` datetime(3) DEFAULT NULL,
  PRIMARY KEY (`vouchg_id`),
  KEY `WDIDX1691098210520` (`vouchm_no`),
  KEY `WDIDX1691098210521` (`vouchg_line`),
  KEY `WDIDX1691098210522` (`vouchg_from_value`),
  KEY `WDIDX1691098210523` (`vouchg_value`),
  KEY `WDIDX1691098210524` (`vouchg_changed_date`),
  KEY `vouchg_key` (`vouchm_no`,`vouchg_line`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `voucher_master`
--

DROP TABLE IF EXISTS `voucher_master`;
CREATE TABLE IF NOT EXISTS `voucher_master` (
  `vouchm_id` bigint NOT NULL AUTO_INCREMENT,
  `vouchm_no` int UNSIGNED NOT NULL DEFAULT '0',
  `vouchm_changed_date` datetime(3) DEFAULT NULL,
  `vouchm_description` varchar(60) DEFAULT NULL,
  `prod_no` bigint UNSIGNED DEFAULT '0',
  `vouchm_own_voucher` tinyint DEFAULT '0',
  `vouchm_default_value` longtext,
  `vouchm_different_value_allowed` tinyint NOT NULL DEFAULT '0',
  `vouchm_ean_type` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `vouchm_ean_prefix` varchar(50) DEFAULT NULL,
  `vouchm_date_of_expiry_in_month` smallint UNSIGNED DEFAULT '12',
  `vouchm_header` longtext,
  `vouchm_center` longtext,
  `vouchm_bottom` longtext,
  `vouchm_type` tinyint UNSIGNED DEFAULT '0',
  PRIMARY KEY (`vouchm_id`),
  UNIQUE KEY `vouchm_no` (`vouchm_no`),
  KEY `WDIDX1691098210525` (`vouchm_changed_date`),
  KEY `WDIDX1691098210526` (`vouchm_description`),
  KEY `WDIDX1691098210527` (`prod_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `wait_list`
--

DROP TABLE IF EXISTS `wait_list`;
CREATE TABLE IF NOT EXISTS `wait_list` (
  `waitl_id` bigint NOT NULL AUTO_INCREMENT,
  `branch_no` int UNSIGNED NOT NULL DEFAULT '0',
  `salesm_guid` varchar(32) DEFAULT NULL,
  `waitl_date_time` datetime(3) DEFAULT NULL,
  `waitl_last_no` tinyint UNSIGNED DEFAULT '0',
  `waitl_state` tinyint UNSIGNED DEFAULT '1',
  `waitl_kitchen_date_time` datetime(3) DEFAULT NULL,
  PRIMARY KEY (`waitl_id`),
  KEY `WDIDX1691098210528` (`branch_no`),
  KEY `WDIDX1691098210529` (`salesm_guid`),
  KEY `WDIDX1691098210530` (`waitl_kitchen_date_time`),
  KEY `waitl_key` (`branch_no`,`waitl_last_no`),
  KEY `waitl_key_kitchen_date_time` (`branch_no`,`waitl_kitchen_date_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `webservice_tasks`
--

DROP TABLE IF EXISTS `webservice_tasks`;
CREATE TABLE IF NOT EXISTS `webservice_tasks` (
  `webt_id` bigint NOT NULL AUTO_INCREMENT,
  `webt_guid` varchar(32) DEFAULT NULL,
  `webt_type` tinyint UNSIGNED DEFAULT '0',
  `webt_date_time` datetime(3) DEFAULT NULL,
  `webt_ok` tinyint DEFAULT '0',
  `webt_ok_station` smallint UNSIGNED DEFAULT '0',
  `webt_error_message` longtext,
  PRIMARY KEY (`webt_id`),
  UNIQUE KEY `webt_key` (`webt_guid`,`webt_type`),
  KEY `WDIDX1691098210531` (`webt_guid`),
  KEY `WDIDX1691098210532` (`webt_ok`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `webshop_orders`
--

DROP TABLE IF EXISTS `webshop_orders`;
CREATE TABLE IF NOT EXISTS `webshop_orders` (
  `webso_id` bigint NOT NULL AUTO_INCREMENT,
  `shop_no` int NOT NULL DEFAULT '0',
  `webso_ok` tinyint DEFAULT '0',
  PRIMARY KEY (`webso_id`),
  UNIQUE KEY `shop_no` (`shop_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `work_schedules`
--

DROP TABLE IF EXISTS `work_schedules`;
CREATE TABLE IF NOT EXISTS `work_schedules` (
  `works_id` bigint NOT NULL AUTO_INCREMENT,
  `workt_no` bigint DEFAULT NULL,
  `opera_no` smallint UNSIGNED DEFAULT NULL,
  `works_from_date` datetime(3) DEFAULT NULL,
  `works_to_date` datetime(3) DEFAULT NULL,
  `works_description` varchar(512) DEFAULT NULL,
  `works_holiday` tinyint DEFAULT '0',
  PRIMARY KEY (`works_id`),
  KEY `WDIDX1691098211538` (`workt_no`),
  KEY `WDIDX1691098211539` (`opera_no`),
  KEY `WDIDX1691098211540` (`works_from_date`),
  KEY `WDIDX1691098211541` (`works_to_date`),
  KEY `works_key_1` (`opera_no`,`works_from_date`,`works_to_date`,`workt_no`),
  KEY `works_key_2` (`works_from_date`,`works_to_date`,`workt_no`,`opera_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `work_schedule_configs`
--

DROP TABLE IF EXISTS `work_schedule_configs`;
CREATE TABLE IF NOT EXISTS `work_schedule_configs` (
  `workc_id` bigint NOT NULL AUTO_INCREMENT,
  `station_no` int UNSIGNED NOT NULL DEFAULT '0',
  `workc_display_border_left` float DEFAULT '20',
  `workc_display_border_right` float DEFAULT '5',
  `workc_display_border_top` float DEFAULT '5',
  `workc_display_border_bottom` float DEFAULT '5',
  `workc_header_1_format` varchar(24) DEFAULT 'YYYY',
  `workc_header_2_format` varchar(24) DEFAULT 'MMMM',
  `workc_header_3_format` varchar(24) DEFAULT 'KW',
  `workc_header_4_format` varchar(24) DEFAULT 'DD.MM KW',
  `workc_header_5_format` varchar(24) DEFAULT 'HH',
  `workc_header_6_format` varchar(24) DEFAULT 'HH:NN',
  `workc_type_1_header` varchar(6) DEFAULT '146',
  `workc_type_2_header` varchar(6) DEFAULT '145',
  `workc_type_3_header` varchar(6) DEFAULT '14',
  `workc_first_column_width` float DEFAULT '80',
  `workc_type_1_column_width` float DEFAULT '5',
  `workc_type_2_column_width` float DEFAULT '3',
  `workc_type_3_column_width` float DEFAULT '20',
  `workc_color_type` tinyint UNSIGNED DEFAULT '0',
  `workc_printer_border_left` float DEFAULT '20',
  `workc_printer_border_right` float DEFAULT '5',
  `workc_printer_border_top` float DEFAULT '5',
  `workc_printer_border_bottom` float DEFAULT '5',
  `workc_printer_header_1_format` varchar(24) DEFAULT 'YYYY',
  `workc_printer_header_2_format` varchar(24) DEFAULT 'MMMM',
  `workc_printer_header_3_format` varchar(24) DEFAULT 'KW',
  `workc_printer_header_4_format` varchar(24) DEFAULT 'DD.MM KW',
  `workc_printer_header_5_format` varchar(24) DEFAULT 'HH',
  `workc_printer_header_6_format` varchar(24) DEFAULT 'HH:NN',
  `workc_printer_first_column_width` float DEFAULT '80',
  `workc_printer_type_1_column_width` float DEFAULT '5',
  `workc_printer_type_2_column_width` float DEFAULT '3',
  `workc_printer_type_3_column_width` float DEFAULT '20',
  `workc_printer_type_1_header_width` varchar(6) DEFAULT '146',
  `workc_printer_type_2_header_width` varchar(6) DEFAULT '145',
  `workc_printer_type_3_header_width` varchar(6) DEFAULT '14',
  PRIMARY KEY (`workc_id`),
  UNIQUE KEY `station_no` (`station_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `work_schedule_series_detail`
--

DROP TABLE IF EXISTS `work_schedule_series_detail`;
CREATE TABLE IF NOT EXISTS `work_schedule_series_detail` (
  `worksd_id` bigint NOT NULL AUTO_INCREMENT,
  `worksm_id` bigint DEFAULT NULL,
  `worksd_weekday_1` tinyint DEFAULT '0',
  `worksd_weekday_2` tinyint DEFAULT '0',
  `worksd_weekday_3` tinyint DEFAULT '0',
  `worksd_weekday_4` tinyint DEFAULT '0',
  `worksd_weekday_5` tinyint DEFAULT '0',
  `worksd_weekday_6` tinyint DEFAULT '0',
  `worksd_weekday_7` tinyint DEFAULT '0',
  `worksd_weekday_8` tinyint DEFAULT '0',
  `worksd_weekday_9` tinyint DEFAULT '0',
  `worksd_valid_on_weekday_` tinyint UNSIGNED DEFAULT '0',
  `worksd_from_time` time DEFAULT NULL,
  `worksd_to_time` time DEFAULT NULL,
  `worksd_type` tinyint DEFAULT '0',
  `worksd_day_of_month` tinyint UNSIGNED DEFAULT '0',
  `worksd_week_no` tinyint UNSIGNED DEFAULT '0',
  `worksd_month_no` tinyint UNSIGNED DEFAULT '0',
  `worksd_ignore_holiday` tinyint DEFAULT '0',
  PRIMARY KEY (`worksd_id`),
  KEY `WDIDX1691098210533` (`worksm_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `work_schedule_series_master`
--

DROP TABLE IF EXISTS `work_schedule_series_master`;
CREATE TABLE IF NOT EXISTS `work_schedule_series_master` (
  `worksm_id` bigint NOT NULL AUTO_INCREMENT,
  `worksm_description` varchar(50) DEFAULT NULL,
  `opera_no` smallint UNSIGNED DEFAULT NULL,
  PRIMARY KEY (`worksm_id`),
  KEY `WDIDX1691098210534` (`worksm_description`),
  KEY `WDIDX1691098210535` (`opera_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `work_schedule_types`
--

DROP TABLE IF EXISTS `work_schedule_types`;
CREATE TABLE IF NOT EXISTS `work_schedule_types` (
  `workt_id` bigint NOT NULL AUTO_INCREMENT,
  `workt_no` bigint NOT NULL DEFAULT '0',
  `workt_description` varchar(35) DEFAULT NULL,
  `workt_working_hours` tinyint DEFAULT '0',
  `workt_standard` tinyint DEFAULT '0',
  `workt_holiday` tinyint DEFAULT '0',
  `workt_break` tinyint DEFAULT '0',
  `workt_color` int UNSIGNED DEFAULT '0',
  `workt_caption` varchar(6) DEFAULT NULL,
  `workt_sick_leave` tinyint DEFAULT '0',
  `workt_stand_in` tinyint DEFAULT '0',
  `workt_duty_swap` tinyint DEFAULT '0',
  PRIMARY KEY (`workt_id`),
  UNIQUE KEY `workt_no` (`workt_no`),
  KEY `WDIDX1691098210536` (`workt_working_hours`),
  KEY `WDIDX1691098210537` (`workt_standard`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Constraints der exportierten Tabellen
--

--
-- Constraints der Tabelle `product_groups`
--
ALTER TABLE `product_groups`
  ADD CONSTRAINT `constraint_product_main_groups_product_groups` FOREIGN KEY (`prodm_no`) REFERENCES `product_main_groups` (`prodm_no`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `constraint_vat_product_groups` FOREIGN KEY (`vat_no`) REFERENCES `vat` (`vat_no`) ON DELETE RESTRICT ON UPDATE CASCADE;
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
