/*
 Navicat Premium Dump SQL

 Source Server         : BuyerKiosk Production
 Source Server Type    : MariaDB
 Source Server Version : 100526 (10.5.26-MariaDB-log)
 Source Host           : localhost:3306
 Source Schema         : kiosk_ou20913

 Target Server Type    : MariaDB
 Target Server Version : 100526 (10.5.26-MariaDB-log)
 File Encoding         : 65001

 Date: 29/04/2025 15:15:18
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for buyQueue
-- ----------------------------
DROP TABLE IF EXISTS `buyQueue`;
CREATE TABLE `buyQueue` (
  `buyID` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `drsBuyID` varchar(16) DEFAULT NULL,
  `tabletID` tinyint(3) unsigned NOT NULL DEFAULT 0,
  `dailyNum` int(3) unsigned NOT NULL,
  `timeEntered` timestamp NOT NULL DEFAULT current_timestamp(),
  `sortStarted` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `sortCompleted` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `sorterID` int(10) unsigned DEFAULT NULL,
  `timeStarted` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `timeCompleted` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `buyerID` int(10) unsigned DEFAULT NULL,
  `numContainers` tinyint(2) unsigned NOT NULL DEFAULT 0,
  `textMe` tinyint(1) unsigned NOT NULL DEFAULT 0,
  `inStore` tinyint(1) unsigned NOT NULL DEFAULT 0,
  `returnTime` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `isProcessed` tinyint(1) unsigned NOT NULL DEFAULT 0,
  `isReturning` tinyint(1) unsigned NOT NULL DEFAULT 0,
  `processedContainers` tinyint(2) unsigned NOT NULL DEFAULT 0,
  `remainingContainers` tinyint(2) unsigned NOT NULL DEFAULT 0,
  `customerID` int(10) unsigned NOT NULL,
  `doCount` tinyint(1) unsigned NOT NULL DEFAULT 1,
  `twilioSent` tinyint(3) unsigned NOT NULL DEFAULT 0,
  `isNewCustomer` tinyint(4) NOT NULL DEFAULT 0,
  `clearFlags` tinyint(3) NOT NULL DEFAULT 0,
  `remote` tinyint(1) NOT NULL DEFAULT 0,
  `dropOffTime` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `hasDroppedOff` tinyint(1) NOT NULL DEFAULT 0,
  `checkOutTime` timestamp NULL DEFAULT NULL,
  `checkedOut` tinyint(1) NOT NULL DEFAULT 0,
  `upperBound` smallint(5) unsigned NOT NULL DEFAULT 0,
  `lowerBound` smallint(5) unsigned NOT NULL DEFAULT 0,
  `waitTime` smallint(5) unsigned NOT NULL DEFAULT 0,
  PRIMARY KEY (`buyID`),
  UNIQUE KEY `drsBuyID` (`drsBuyID`) USING BTREE,
  KEY `customerID` (`customerID`),
  KEY `buyerID` (`buyerID`),
  KEY `customerID_2` (`customerID`)
) ENGINE=InnoDB AUTO_INCREMENT=114154 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

SET FOREIGN_KEY_CHECKS = 1;
