/*
 Navicat MySQL Data Transfer

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

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

 Date: 03/02/2025 15:22:23
*/


-- ----------------------------
-- Table structure for LiveFinancials
-- ----------------------------
CREATE TABLE `LiveFinancials` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `date` date NOT NULL,
  `buysGoal` varchar(15) DEFAULT NULL,
  `buysCurrent` varchar(15) DEFAULT NULL,
  `salesGoal` varchar(15) DEFAULT NULL,
  `salesCurrent` varchar(15) DEFAULT NULL,
  `buysOutstanding` varchar(15) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1323 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

-- ----------------------------
-- Records of LiveFinancials
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for bsActions
-- ----------------------------
CREATE TABLE `bsActions` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `employeeID` int(11) NOT NULL,
  `action` smallint(6) NOT NULL,
  `categoryID` int(11) DEFAULT NULL COMMENT '0 = Emptying; 1= Adding; 2 = Removing Some; 3 = Removing All',
  `oldLocationID` int(11) DEFAULT NULL,
  `newLocationID` int(11) DEFAULT NULL,
  `timePerformed` timestamp NULL DEFAULT NULL,
  `binID` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`),
  KEY `bsActions_employeeID_IDX` (`employeeID`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=340 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- ----------------------------
-- Records of bsActions
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for bsBin_Cat
-- ----------------------------
CREATE TABLE `bsBin_Cat` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `binID` int(11) DEFAULT NULL,
  `catID` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `binID` (`binID`) USING BTREE,
  CONSTRAINT `bsbin_cat_ibfk_1` FOREIGN KEY (`binID`) REFERENCES `bsBins` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=7603 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- ----------------------------
-- Records of bsBin_Cat
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for bsBins
-- ----------------------------
CREATE TABLE `bsBins` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `uuid` varchar(8) DEFAULT NULL,
  `name` varchar(100) DEFAULT NULL,
  `mainCategory` int(11) DEFAULT NULL,
  `subCat1` int(11) DEFAULT NULL,
  `subCat2` int(11) DEFAULT NULL,
  `subCat3` int(11) DEFAULT NULL,
  `dateCreated` timestamp NULL DEFAULT NULL,
  `location` int(11) DEFAULT NULL,
  `deleted` tinyint(4) NOT NULL DEFAULT 0,
  `ageDate` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `bsBins_uuid` (`uuid`),
  KEY `bsBins_mainCategory_IDX` (`mainCategory`) USING BTREE,
  KEY `bsBins_location_IDX` (`location`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=777 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- ----------------------------
-- Records of bsBins
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for bsCategories
-- ----------------------------
CREATE TABLE `bsCategories` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(150) NOT NULL,
  `color` varchar(10) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=255 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- ----------------------------
-- Records of bsCategories
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for bsLocations
-- ----------------------------
CREATE TABLE `bsLocations` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(150) NOT NULL,
  `onsite` tinyint(4) NOT NULL DEFAULT 1,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=56 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- ----------------------------
-- Records of bsLocations
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for 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=70469 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
-- Records of buyQueue
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for cashActivity
-- ----------------------------
CREATE TABLE `cashActivity` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `timeStamp` datetime DEFAULT NULL,
  `userId` varchar(20) DEFAULT NULL,
  `transType` varchar(10) DEFAULT NULL,
  `register` varchar(10) DEFAULT NULL,
  `destination` varchar(10) DEFAULT NULL,
  `pennies` int(11) DEFAULT NULL,
  `pennyRolls` int(11) DEFAULT NULL,
  `nickels` int(11) DEFAULT NULL,
  `nickelRolls` int(11) DEFAULT NULL,
  `dimes` int(11) DEFAULT NULL,
  `dimeRolls` int(11) DEFAULT NULL,
  `quarters` int(11) DEFAULT NULL,
  `quarterRolls` int(11) DEFAULT NULL,
  `ones` int(11) DEFAULT NULL,
  `oneRolls` int(11) DEFAULT NULL,
  `fives` int(11) DEFAULT NULL,
  `fiveRolls` int(11) DEFAULT NULL,
  `tens` int(11) DEFAULT NULL,
  `tenRolls` int(11) DEFAULT NULL,
  `twenties` int(11) DEFAULT NULL,
  `twentyRolls` int(11) DEFAULT NULL,
  `fifties` int(11) DEFAULT NULL,
  `fiftyRolls` int(11) DEFAULT NULL,
  `hundreds` int(11) DEFAULT NULL,
  `hundredRolls` int(11) DEFAULT NULL,
  `total` decimal(10,2) DEFAULT NULL,
  `createdAt` timestamp NULL DEFAULT current_timestamp(),
  `updatedAt` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `cashPaidIn` decimal(10,2) DEFAULT NULL,
  `cashPaidOut` decimal(10,2) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11953 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Records of cashActivity
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for closeSalesReport
-- ----------------------------
CREATE TABLE `closeSalesReport` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `date` date DEFAULT NULL,
  `timeSubmitted` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `grossSalesRetail` decimal(10,2) DEFAULT NULL,
  `grossSalesCost` decimal(10,2) DEFAULT NULL,
  `grossSalesNumber` smallint(6) DEFAULT NULL,
  `grossSalesGM` decimal(10,2) DEFAULT NULL,
  `returnsCost` decimal(10,2) DEFAULT NULL,
  `returnsRetail` decimal(10,2) DEFAULT NULL,
  `returnsNumber` smallint(6) DEFAULT NULL,
  `returnsGM` decimal(10,2) DEFAULT NULL,
  `netSalesContinuingForFee` decimal(10,2) DEFAULT NULL,
  `continuingFee` decimal(10,2) DEFAULT NULL,
  `netSalesCost` decimal(10,2) DEFAULT NULL,
  `netSalesRetail` decimal(10,2) DEFAULT NULL,
  `netSalesGM` decimal(10,2) DEFAULT NULL,
  `salesCount` smallint(6) DEFAULT NULL,
  `buysCost` decimal(10,2) DEFAULT NULL,
  `buysRetail` decimal(10,2) DEFAULT NULL,
  `buysGM` decimal(10,2) DEFAULT NULL,
  `buysCount` smallint(6) DEFAULT NULL,
  `averageRetail` decimal(10,2) DEFAULT NULL,
  `tradeCount` smallint(6) DEFAULT NULL,
  `tradeAmount` decimal(10,2) DEFAULT NULL,
  `buysGoal` decimal(10,2) DEFAULT NULL,
  `salesGoal` decimal(10,2) DEFAULT NULL,
  `buysOutstanding` smallint(6) DEFAULT NULL,
  `laborPercentage` decimal(10,2) DEFAULT NULL,
  `cashPaidIn` decimal(10,2) DEFAULT NULL,
  `cashPaidOut` decimal(10,2) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=505 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- ----------------------------
-- Records of closeSalesReport
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for customerAlerts
-- ----------------------------
CREATE TABLE `customerAlerts` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `customerID` int(11) NOT NULL,
  `type` tinyint(1) unsigned NOT NULL,
  `comment` varchar(255) DEFAULT NULL,
  `class` varchar(50) DEFAULT NULL,
  `repeat` tinyint(1) NOT NULL DEFAULT 0 COMMENT '0 = Indefinitely, 1 = Once, ',
  `cleared` tinyint(1) DEFAULT NULL,
  `dateAdded` timestamp NULL DEFAULT NULL ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`),
  KEY `Customer ID` (`customerID`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

-- ----------------------------
-- Records of customerAlerts
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for customerRatings
-- ----------------------------
CREATE TABLE `customerRatings` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `customerID` int(11) NOT NULL,
  `rating` tinyint(2) unsigned NOT NULL,
  `employeeID` tinyint(2) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `customerID` (`customerID`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=82 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

-- ----------------------------
-- Records of customerRatings
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for customerSurvey
-- ----------------------------
CREATE TABLE `customerSurvey` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `customerID` int(11) NOT NULL,
  `buyID` int(11) NOT NULL,
  `step1` tinyint(4) NOT NULL,
  `step2` tinyint(4) NOT NULL,
  `step3` tinyint(4) NOT NULL,
  `step4` tinyint(4) NOT NULL,
  `step5` tinyint(4) NOT NULL,
  `dateSubmitted` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `userAgent` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `type` tinyint(4) NOT NULL DEFAULT 1,
  `comments` text DEFAULT NULL,
  `comment` text DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1145 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

-- ----------------------------
-- Records of customerSurvey
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for customers
-- ----------------------------
CREATE TABLE `customers` (
  `customerID` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `dateAdded` timestamp NOT NULL DEFAULT current_timestamp(),
  `firstName` varchar(50) NOT NULL,
  `lastName` varchar(50) NOT NULL,
  `email` varchar(50) DEFAULT NULL,
  `address` varchar(255) NOT NULL,
  `city` varchar(50) NOT NULL,
  `state` varchar(2) NOT NULL,
  `zipcode` varchar(5) NOT NULL,
  `phone` varchar(10) NOT NULL,
  `onSMS` tinyint(1) unsigned DEFAULT 0,
  `onEmail` tinyint(1) unsigned DEFAULT 0,
  `driversLicense` varchar(50) DEFAULT NULL,
  `referralCode` varchar(10) NOT NULL DEFAULT '000000',
  `addedToSMS` timestamp NULL DEFAULT NULL,
  `addedToEmail` timestamp NULL DEFAULT NULL,
  `driversLicenseDOB` date DEFAULT NULL,
  `driversLicenseExpiration` date DEFAULT NULL,
  PRIMARY KEY (`customerID`),
  KEY `dl` (`driversLicense`)
) ENGINE=InnoDB AUTO_INCREMENT=26116 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
-- Records of customers
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for dailySalesData
-- ----------------------------
CREATE TABLE `dailySalesData` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `transID` varchar(8) NOT NULL,
  `type` tinyint(2) NOT NULL,
  `date` date NOT NULL,
  `employee` varchar(60) DEFAULT NULL,
  `phoneNum` varchar(10) NOT NULL,
  `firstName` varchar(60) DEFAULT NULL,
  `lastName` varchar(60) DEFAULT NULL,
  `salesAmount` double(6,2) DEFAULT NULL,
  `buyAmount` double(6,2) DEFAULT NULL,
  `taxAmount` double(6,2) DEFAULT NULL,
  `returnAmount` double(6,2) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `transID` (`transID`) USING BTREE,
  KEY `phone` (`phoneNum`) USING BTREE,
  KEY `date` (`date`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=370 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Records of dailySalesData
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for deletedBuys
-- ----------------------------
CREATE TABLE `deletedBuys` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `timeDeleted` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `buyID` int(10) unsigned NOT NULL,
  `tabletID` tinyint(3) unsigned NOT NULL DEFAULT 0,
  `dailyNum` int(3) unsigned NOT NULL,
  `timeEntered` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `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,
  PRIMARY KEY (`id`,`buyID`),
  KEY `customerID` (`customerID`) USING BTREE,
  KEY `buyID` (`buyID`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=172 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
-- Records of deletedBuys
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for dsLoop
-- ----------------------------
CREATE TABLE `dsLoop` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `expireDate` date DEFAULT NULL,
  `startDate` date DEFAULT NULL,
  `slideID` int(8) unsigned NOT NULL,
  `position` int(3) unsigned NOT NULL,
  `duration` int(3) unsigned NOT NULL,
  `animation` varchar(15) NOT NULL DEFAULT 'puffIn',
  `slideUploader` tinyint(3) unsigned NOT NULL DEFAULT 0,
  `scheduled` tinyint(1) unsigned DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=568 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
-- Records of dsLoop
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for dsSlides
-- ----------------------------
CREATE TABLE `dsSlides` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `type` tinyint(3) unsigned NOT NULL DEFAULT 0 COMMENT '0=IMG;1=VID;3=QUEUE',
  `slideName` varchar(255) NOT NULL,
  `fileName` varchar(255) NOT NULL,
  `enabled` tinyint(1) unsigned NOT NULL,
  `dateAdded` timestamp NOT NULL DEFAULT current_timestamp(),
  `plays` int(10) unsigned DEFAULT 0,
  `embed` varchar(255) DEFAULT NULL,
  `videoDuration` smallint(6) DEFAULT NULL COMMENT 'In seconds',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=419 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
-- Records of dsSlides
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Records of employees
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for fiveStarsPoints
-- ----------------------------
CREATE TABLE `fiveStarsPoints` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `date` date NOT NULL DEFAULT current_timestamp(),
  `phone` varchar(10) NOT NULL,
  `totalSales` double(6,2) DEFAULT NULL,
  `totalBuys` double(6,2) DEFAULT NULL,
  `totalTax` double(6,2) DEFAULT NULL,
  `points` smallint(6) NOT NULL,
  `pointsRedeemed` smallint(6) DEFAULT NULL,
  `slug` varchar(32) GENERATED ALWAYS AS (md5(concat_ws('',`date`,`phone`,`totalSales`,`totalBuys`,`totalTax`))) STORED,
  `totalReturns` double(6,2) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `slug` (`slug`) USING BTREE,
  KEY `phoneNum` (`phone`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=263251 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Records of fiveStarsPoints
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for qbLiveMap
-- ----------------------------
CREATE TABLE `qbLiveMap` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `journalEntry` varchar(10) DEFAULT NULL,
  `fieldName` varchar(100) DEFAULT NULL,
  `fieldDescription` varchar(255) DEFAULT NULL,
  `acctType` varchar(100) DEFAULT NULL,
  `acctName` varchar(255) DEFAULT NULL,
  `acctID` int(11) DEFAULT NULL,
  `acctSubType` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=46 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

-- ----------------------------
-- Records of qbLiveMap
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for realTimeData
-- ----------------------------
CREATE TABLE `realTimeData` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `buyersTimeStamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `numBuyers` tinyint(3) unsigned NOT NULL,
  `textTimeStamp` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
-- Records of realTimeData
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Records of safeConfiguration
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for serviceQueue
-- ----------------------------
CREATE TABLE `serviceQueue` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `dailyNum` int(11) NOT NULL,
  `customerID` int(11) unsigned NOT NULL,
  `timeEntered` timestamp NOT NULL DEFAULT current_timestamp(),
  `timeStarted` timestamp NULL DEFAULT NULL,
  `timeCompleted` timestamp NULL DEFAULT NULL,
  `employeeID` int(10) unsigned DEFAULT NULL,
  `textMe` tinyint(1) DEFAULT 0,
  `numItems` int(11) DEFAULT 0,
  `textSent` tinyint(1) DEFAULT 0,
  `isFinished` tinyint(1) DEFAULT 0,
  `notes` text DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_customer` (`customerID`),
  KEY `employeeID` (`employeeID`),
  CONSTRAINT `fk_servicequeue_customer` FOREIGN KEY (`customerID`) REFERENCES `customers` (`customerID`) ON UPDATE CASCADE,
  CONSTRAINT `fk_servicequeue_employee` FOREIGN KEY (`employeeID`) REFERENCES `employees` (`employeeID`) ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- ----------------------------
-- Records of serviceQueue
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for shiftNotes
-- ----------------------------
CREATE TABLE `shiftNotes` (
  `internalID` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `id` varchar(10) DEFAULT NULL,
  `timeStamp` timestamp NOT NULL DEFAULT current_timestamp(),
  `itemType` tinyint(1) unsigned DEFAULT NULL,
  `itemPriority` tinyint(1) unsigned DEFAULT NULL,
  `itemSubmitter` varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `itemTitle` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `itemComment` text DEFAULT NULL,
  `itemCloser` varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
  `itemStatus` tinyint(2) unsigned DEFAULT NULL,
  `timeClosed` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`internalID`) USING BTREE,
  KEY `timeStamp` (`timeStamp`) USING BTREE,
  KEY `id` (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=662 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Records of shiftNotes
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for simpleQueue
-- ----------------------------
CREATE TABLE `simpleQueue` (
  `transID` int(10) unsigned NOT NULL,
  `firstName` varchar(255) DEFAULT NULL,
  `lastName` varchar(255) DEFAULT NULL,
  `status` tinyint(3) DEFAULT 0 COMMENT '0 =  Queued, 1 = Completed, 2 = Paid Out, 3 = Canceled',
  `timeEntered` timestamp NULL DEFAULT NULL,
  `timeCompleted` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`transID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Records of simpleQueue
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for statsEmployeeDaily
-- ----------------------------
CREATE TABLE `statsEmployeeDaily` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `date` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `avgTotal` int(10) unsigned NOT NULL,
  `sortTime` int(10) unsigned NOT NULL,
  `sortDelay` int(11) DEFAULT 0,
  `avgPerContainer` int(10) unsigned NOT NULL,
  `numBuys` tinyint(3) unsigned NOT NULL,
  `numContainers` smallint(5) unsigned NOT NULL,
  `firstBuy` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `lastBuy` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `firstSort` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `lastSort` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `numSorts` smallint(5) unsigned NOT NULL DEFAULT 0,
  `sortContainers` smallint(5) unsigned NOT NULL DEFAULT 0,
  `sortTimePerContainer` int(10) unsigned NOT NULL DEFAULT 0,
  `employeeID` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9277 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
-- Records of statsEmployeeDaily
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for statsStoreDaily
-- ----------------------------
CREATE TABLE `statsStoreDaily` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `date` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `avgDelay` int(10) unsigned NOT NULL,
  `sortDelay` int(10) unsigned NOT NULL,
  `sortTime` int(10) unsigned NOT NULL,
  `avgTotal` int(10) unsigned NOT NULL,
  `avgPerContainer` int(10) unsigned NOT NULL,
  `numBuys` tinyint(10) unsigned NOT NULL,
  `numContainers` smallint(10) unsigned NOT NULL,
  `numBuyers` tinyint(10) unsigned NOT NULL,
  `firstBuy` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `lastBuy` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `buysStranded` tinyint(10) unsigned NOT NULL,
  `uniqueCustomers` tinyint(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `date_2` (`date`),
  KEY `date` (`date`)
) ENGINE=InnoDB AUTO_INCREMENT=1985 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
-- Records of statsStoreDaily
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for tablets
-- ----------------------------
CREATE TABLE `tablets` (
  `id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
  `tabletID` tinyint(3) unsigned NOT NULL,
  `description` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `numBuys` mediumint(8) unsigned NOT NULL DEFAULT 0,
  `microBlinkAPI` text DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `tabletID` (`tabletID`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
-- Records of tablets
-- ----------------------------
BEGIN;
INSERT INTO `tablets` (`id`, `tabletID`, `description`, `numBuys`, `microBlinkAPI`) VALUES (1, 0, 'Default', 0, 'sRwAAAAOY29tLmJ1eWVya2lvc2vcRXTXyDP1d7qqDpUblOvOVGFQ9symdXZ3UNWQi2bfSrogQ1oRY6ORbtEcdJ9CfCN6BUJgonWN7k1NQRJXEp6BAekcp72uNk0woTJ2VgvF3GKjuypy/KBNIgLm95O+mZpYYLh1dKVO+8AyGPdfR7iGSKnzU5876alzLagitnVYocQQyDMo78FVZOl09Bt2dXut');
COMMIT;

-- ----------------------------
-- Table structure for taskData
-- ----------------------------
CREATE TABLE `taskData` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `taskGroup` int(11) DEFAULT NULL,
  `timeCompleted` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `comments` text DEFAULT NULL,
  `employeeName` varchar(60) DEFAULT NULL,
  `date` date DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

-- ----------------------------
-- Records of taskData
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for taskGroups
-- ----------------------------
CREATE TABLE `taskGroups` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `groupName` varchar(60) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

-- ----------------------------
-- Records of taskGroups
-- ----------------------------
BEGIN;
INSERT INTO `taskGroups` (`id`, `groupName`) VALUES (1, 'OPENING');
INSERT INTO `taskGroups` (`id`, `groupName`) VALUES (2, 'CLOSING');
COMMIT;

-- ----------------------------
-- Table structure for tasks
-- ----------------------------
CREATE TABLE `tasks` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `taskName` varchar(60) DEFAULT NULL,
  `comment` varchar(500) DEFAULT NULL,
  `taskGroup` int(10) unsigned DEFAULT NULL,
  `recurOn` varchar(60) DEFAULT 'SUN MON TUE WED THU FRI SAT',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=35 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

-- ----------------------------
-- Records of tasks
-- ----------------------------
BEGIN;
INSERT INTO `tasks` (`id`, `taskName`, `comment`, `taskGroup`, `recurOn`) VALUES (1, 'Open All Registers', 'Fill out cash count form', 1, 'MON TUE WED THU FRI SAT SUN ');
INSERT INTO `tasks` (`id`, `taskName`, `comment`, `taskGroup`, `recurOn`) VALUES (2, 'Close All Registers', NULL, 2, 'MON TUE WED THU FRI SAT SUN ');
INSERT INTO `tasks` (`id`, `taskName`, `comment`, `taskGroup`, `recurOn`) VALUES (3, 'Turn OFF Open Sign', NULL, 2, 'MON TUE WED THU FRI SAT SUN ');
INSERT INTO `tasks` (`id`, `taskName`, `comment`, `taskGroup`, `recurOn`) VALUES (4, 'Turn ON Open Sign', 'After Unlocking Door', 1, 'MON TUE WED THU FRI SAT SUN ');
INSERT INTO `tasks` (`id`, `taskName`, `comment`, `taskGroup`, `recurOn`) VALUES (6, 'Run All Clothes on Rack', 'start at least 1 hour before closing time', 2, 'MON TUE WED THU FRI SAT SUN ');
INSERT INTO `tasks` (`id`, `taskName`, `comment`, `taskGroup`, `recurOn`) VALUES (7, 'Finish All Tagging', NULL, 2, 'MON TUE WED THU FRI SAT SUN ');
INSERT INTO `tasks` (`id`, `taskName`, `comment`, `taskGroup`, `recurOn`) VALUES (12, 'Collect Trash', 'Bathrooms | Behind Counter | Breakroom ', 2, 'SUN MON TUE WED THU FRI SAT');
INSERT INTO `tasks` (`id`, `taskName`, `comment`, `taskGroup`, `recurOn`) VALUES (13, 'Unlock Door', 'right at opening time - 10am monday - saturday, 11am on sunday', 1, 'MON TUE WED THU FRI SAT SUN ');
INSERT INTO `tasks` (`id`, `taskName`, `comment`, `taskGroup`, `recurOn`) VALUES (14, 'Lock Door', '', 2, 'MON TUE WED THU FRI SAT SUN ');
INSERT INTO `tasks` (`id`, `taskName`, `comment`, `taskGroup`, `recurOn`) VALUES (27, 'Answer Instagram DMs', '', 1, 'MON TUE WED THU FRI SAT SUN ');
INSERT INTO `tasks` (`id`, `taskName`, `comment`, `taskGroup`, `recurOn`) VALUES (28, 'Review closing notes', '', 1, 'MON TUE WED THU FRI SAT SUN ');
INSERT INTO `tasks` (`id`, `taskName`, `comment`, `taskGroup`, `recurOn`) VALUES (29, 'Go to Bank for change of 1s, 5s, 10s, coin (if needed)', '', 1, 'MON TUE WED THU FRI SAT SUN ');
INSERT INTO `tasks` (`id`, `taskName`, `comment`, `taskGroup`, `recurOn`) VALUES (30, 'Complete all Go Backs/Sorting', 'any product tagged today should either go straight out or get sorted down into a bin for backstock. This task should be started at least 1 hour before closing time to ensure it gets completed.', 2, 'MON TUE WED THU FRI SAT SUN ');
INSERT INTO `tasks` (`id`, `taskName`, `comment`, `taskGroup`, `recurOn`) VALUES (31, 'Do full floor sweep', 'Take dust mop to all floor surfaces, reset all racks, sweep fitting rooms make sure nothing is out of place.', 2, 'MON TUE WED THU FRI SAT SUN ');
INSERT INTO `tasks` (`id`, `taskName`, `comment`, `taskGroup`, `recurOn`) VALUES (32, 'Close windows in stockroom', 'NO PIGEONS', 2, 'MON TUE WED THU FRI SAT SUN ');
INSERT INTO `tasks` (`id`, `taskName`, `comment`, `taskGroup`, `recurOn`) VALUES (33, 'Answer all Instagram DMs still in the inbox', '', 2, 'MON TUE WED THU FRI SAT SUN ');
INSERT INTO `tasks` (`id`, `taskName`, `comment`, `taskGroup`, `recurOn`) VALUES (34, 'Lock up all cash in the cabinet', '', 2, 'MON TUE WED THU FRI SAT SUN ');
COMMIT;

-- ----------------------------
-- Table structure for texts
-- ----------------------------
CREATE TABLE `texts` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp(),
  `customerID` int(11) DEFAULT NULL,
  `employeeNumber` varchar(15) DEFAULT NULL,
  `type` tinyint(2) unsigned DEFAULT 0,
  `message` varchar(255) DEFAULT NULL,
  `phoneNumber` varchar(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=79795 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
-- Records of texts
-- ----------------------------
BEGIN;
COMMIT;

