/*
 Navicat Premium Dump SQL

 Source Server         : ProductionServer
 Source Server Type    : MariaDB
 Source Server Version : 100622 (10.6.22-MariaDB-log)
 Source Host           : localhost:3306
 Source Schema         : kiosk_buykiosk

 Target Server Type    : MariaDB
 Target Server Version : 100622 (10.6.22-MariaDB-log)
 File Encoding         : 65001

 Date: 24/07/2025 09:34:47
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for stores
-- ----------------------------
DROP TABLE IF EXISTS `stores`;
CREATE TABLE `stores` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `dev` tinyint(1) unsigned NOT NULL DEFAULT 1,
  `active` tinyint(1) unsigned NOT NULL DEFAULT 1 COMMENT 'Used to show whether customer is an active paying customer',
  `billingActive` tinyint(1) DEFAULT 1,
  `billingType` tinyint(3) unsigned DEFAULT 0,
  `nextBillingDate` date DEFAULT NULL,
  `billingRate` double DEFAULT 149.99,
  `billingDiscount` double DEFAULT 0,
  `billingDiscountDate` date DEFAULT NULL,
  `storeType` tinyint(3) unsigned NOT NULL COMMENT '0=CM;1=PC',
  `timezone` varchar(20) NOT NULL,
  `storeNum` varchar(20) NOT NULL,
  `typeNum` varchar(20) NOT NULL,
  `dbName` varchar(20) NOT NULL,
  `address` varchar(50) NOT NULL,
  `city` varchar(50) NOT NULL,
  `state` varchar(2) NOT NULL,
  `zipcode` varchar(6) NOT NULL,
  `phone` varchar(10) NOT NULL,
  `apiKey` varchar(60) NOT NULL,
  `smsType` tinyint(1) unsigned NOT NULL DEFAULT 0 COMMENT '0=iTXT;1=CMS',
  `twilioPhone` varchar(15) DEFAULT NULL,
  `postBuySMS` tinyint(4) NOT NULL DEFAULT 1,
  `buyTextSMSType` tinyint(3) unsigned NOT NULL DEFAULT 0,
  `enableWaitTime` tinyint(1) unsigned NOT NULL DEFAULT 1,
  `ccAPI` varchar(24) DEFAULT 'gvbyxpnzhnmrr3zgj3wzn6gq',
  `ccToken` varchar(36) DEFAULT NULL,
  `ccList` varchar(20) DEFAULT NULL,
  `waitTimeType` tinyint(2) unsigned NOT NULL DEFAULT 0,
  `minutesPerContainer` int(9) unsigned NOT NULL DEFAULT 15,
  `password` varchar(255) DEFAULT NULL,
  `requirePass` tinyint(4) NOT NULL DEFAULT 1,
  `referralSystem` tinyint(3) unsigned NOT NULL DEFAULT 0,
  `presortSystem` tinyint(4) NOT NULL DEFAULT 0,
  `loyaltySystem` tinyint(1) NOT NULL DEFAULT 0,
  `estimateInterval` tinyint(3) unsigned NOT NULL DEFAULT 5,
  `enableInterval` tinyint(3) unsigned NOT NULL DEFAULT 1,
  `smsGroupID` int(9) unsigned DEFAULT 0,
  `enableSMSGroups` tinyint(3) NOT NULL DEFAULT 0,
  `addSortersToEstimate` tinyint(3) unsigned NOT NULL DEFAULT 0,
  `upgraded` tinyint(3) NOT NULL DEFAULT 0,
  `statMinSeconds` int(10) NOT NULL DEFAULT 30,
  `statMaxSeconds` int(10) NOT NULL DEFAULT 3600,
  `recentBuysMaxHours` int(10) NOT NULL DEFAULT 48,
  `buySurvey` tinyint(1) NOT NULL DEFAULT 0,
  `rcEnable` tinyint(1) DEFAULT 0,
  `rcLine1` varchar(255) DEFAULT NULL,
  `rcLine2` varchar(255) DEFAULT NULL,
  `rcTagLine` varchar(255) DEFAULT NULL,
  `rcValidDays` smallint(3) unsigned DEFAULT NULL,
  `transTexts` tinyint(1) unsigned DEFAULT 0,
  `automation` tinyint(1) DEFAULT 0,
  `drsApiKey` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
  `enableRP` tinyint(1) unsigned NOT NULL DEFAULT 0,
  `enableRemoteCheckin` tinyint(1) NOT NULL DEFAULT 0,
  `surveyThankYou` varchar(5000) DEFAULT NULL,
  `surveyMinRatingForReview` smallint(5) unsigned DEFAULT NULL,
  `surveyReviewLink` varchar(5000) DEFAULT NULL,
  `surveyReviewText` varchar(5000) DEFAULT NULL,
  `surveySMSText` varchar(255) DEFAULT 'Thank you for coming into our store today! We would love to hear about your experience. You can fill out this quick survey to let us know how we are doing: ',
  `wiwToken` varchar(500) DEFAULT NULL,
  `wiwEnable` tinyint(1) unsigned DEFAULT NULL,
  `wiwLocationID` varchar(12) DEFAULT NULL,
  `shopifyAPIKey` varchar(255) DEFAULT NULL,
  `shopifyURL` varchar(255) DEFAULT NULL,
  `shopifyPassword` varchar(255) DEFAULT NULL,
  `shopifyLocationID` varchar(255) DEFAULT NULL,
  `yellowTime` smallint(6) DEFAULT 30,
  `redTime` smallint(6) DEFAULT 60,
  `fiveStarsStoreID` varchar(6) DEFAULT NULL,
  `fiveStarsSoftwareID` varchar(64) DEFAULT NULL,
  `fiveStarsTaxIncluded` tinyint(1) unsigned DEFAULT 0,
  `fiveStarsBuysIncluded` tinyint(1) unsigned DEFAULT 0,
  `fiveStarsPointsRatio` tinyint(4) DEFAULT 10,
  `enableQueueSignIn` tinyint(1) unsigned NOT NULL DEFAULT 1,
  `digitalSignType` tinyint(1) DEFAULT 1,
  `qbAccessToken` text DEFAULT NULL,
  `qbAccessTokenExpiration` timestamp NULL DEFAULT NULL,
  `qbRefreshToken` varchar(255) DEFAULT NULL,
  `qbRefreshTokenExpiration` timestamp NULL DEFAULT NULL,
  `qbRealmID` varchar(255) DEFAULT NULL,
  `smsPromoKeyword` varchar(50) DEFAULT NULL,
  `smsAccountID` varchar(10) DEFAULT NULL,
  `smsPromoMessage` varchar(255) DEFAULT NULL,
  `smsPromoID` varchar(100) DEFAULT NULL,
  `smsKeyword` varchar(10) DEFAULT NULL,
  `dsWeatherBar` tinyint(1) unsigned DEFAULT 0,
  PRIMARY KEY (`id`),
  KEY `typeNum` (`typeNum`) USING BTREE,
  KEY `storeNum` (`storeNum`) USING BTREE,
  KEY `active` (`active`) USING BTREE,
  KEY `api` (`apiKey`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=411 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci ROW_FORMAT=DYNAMIC;

SET FOREIGN_KEY_CHECKS = 1;
