-- phpMyAdmin SQL Dump
-- version 5.2.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Feb 08, 2024 at 01:59 AM
-- Server version: 8.0.31
-- PHP Version: 8.0.26

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 */;

--
-- Database: `pnfood`
--

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

--
-- Table structure for table `admin`
--

DROP TABLE IF EXISTS `admin`;
CREATE TABLE IF NOT EXISTS `admin` (
  `admin_user` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  `admin_password` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `admin`
--

INSERT INTO `admin` (`admin_user`, `admin_password`) VALUES
('admin', 'admin');

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

--
-- Table structure for table `contact`
--

DROP TABLE IF EXISTS `contact`;
CREATE TABLE IF NOT EXISTS `contact` (
  `contact_id` int NOT NULL AUTO_INCREMENT,
  `cus_id` int NOT NULL,
  `contact_des` longtext NOT NULL,
  `add_time` varchar(100) NOT NULL,
  `owner_id` int NOT NULL,
  `user_id` int NOT NULL,
  `store_id` int NOT NULL,
  PRIMARY KEY (`contact_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

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

--
-- Table structure for table `contact_from`
--

DROP TABLE IF EXISTS `contact_from`;
CREATE TABLE IF NOT EXISTS `contact_from` (
  `contact_from_id` int NOT NULL AUTO_INCREMENT,
  `contact_from_name` varchar(255) NOT NULL,
  `contact_from_remark` varchar(255) NOT NULL,
  `owner_id` int NOT NULL,
  `user_id` int NOT NULL,
  `store_id` int NOT NULL,
  PRIMARY KEY (`contact_from_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

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

--
-- Table structure for table `contact_grade`
--

DROP TABLE IF EXISTS `contact_grade`;
CREATE TABLE IF NOT EXISTS `contact_grade` (
  `contact_grade_id` int NOT NULL AUTO_INCREMENT,
  `contact_grade_name` varchar(255) NOT NULL,
  `contact_grade_remark` varchar(255) NOT NULL,
  `owner_id` int NOT NULL,
  `user_id` int NOT NULL,
  `store_id` int NOT NULL,
  PRIMARY KEY (`contact_grade_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

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

--
-- Table structure for table `contact_list`
--

DROP TABLE IF EXISTS `contact_list`;
CREATE TABLE IF NOT EXISTS `contact_list` (
  `contact_list_id` int NOT NULL AUTO_INCREMENT,
  `contact_list_detail` text NOT NULL,
  `contact_from_id` int NOT NULL,
  `contact_grade_id` int NOT NULL,
  `product_service_id` int NOT NULL,
  `customer_reasonbuy_id` int NOT NULL,
  `customer_reasonnotbuy_id` int NOT NULL,
  `cus_id` int NOT NULL,
  `owner_id` int NOT NULL,
  `user_id` int NOT NULL,
  `store_id` int NOT NULL,
  `addtime` varchar(100) NOT NULL,
  PRIMARY KEY (`contact_list_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

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

--
-- Table structure for table `customer_add_wallet`
--

DROP TABLE IF EXISTS `customer_add_wallet`;
CREATE TABLE IF NOT EXISTS `customer_add_wallet` (
  `caw_id` int NOT NULL AUTO_INCREMENT,
  `cus_id` int NOT NULL,
  `money_add` decimal(65,0) NOT NULL,
  `add_time` varchar(255) NOT NULL,
  `user_id` int NOT NULL,
  `shift_id` int NOT NULL,
  PRIMARY KEY (`caw_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `customer_center`
--

DROP TABLE IF EXISTS `customer_center`;
CREATE TABLE IF NOT EXISTS `customer_center` (
  `cus_cen_id` int NOT NULL AUTO_INCREMENT,
  `cus_cen_name` varchar(100) NOT NULL,
  `cus_cen_tel` int NOT NULL,
  `cus_cen_email` varchar(100) NOT NULL,
  `cus_cen_add_time` varchar(100) NOT NULL,
  `cus_cen_code` varchar(100) NOT NULL,
  `type_bu_id` int NOT NULL,
  PRIMARY KEY (`cus_cen_id`),
  UNIQUE KEY `cus_cen_email` (`cus_cen_email`),
  UNIQUE KEY `cus_cen_tel` (`cus_cen_tel`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

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

--
-- Table structure for table `customer_group`
--

DROP TABLE IF EXISTS `customer_group`;
CREATE TABLE IF NOT EXISTS `customer_group` (
  `customer_group_id` int NOT NULL AUTO_INCREMENT,
  `customer_group_name` varchar(255) NOT NULL,
  `customer_group_remark` varchar(255) NOT NULL,
  `owner_id` int NOT NULL,
  `user_id` int NOT NULL,
  `store_id` int NOT NULL,
  PRIMARY KEY (`customer_group_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

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

--
-- Table structure for table `customer_level`
--

DROP TABLE IF EXISTS `customer_level`;
CREATE TABLE IF NOT EXISTS `customer_level` (
  `customer_level_id` int NOT NULL AUTO_INCREMENT,
  `customer_level_name` varchar(255) NOT NULL,
  `customer_level_remark` varchar(255) NOT NULL,
  `owner_id` int NOT NULL,
  `user_id` int NOT NULL,
  `store_id` int NOT NULL,
  PRIMARY KEY (`customer_level_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

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

--
-- Table structure for table `customer_owner`
--

DROP TABLE IF EXISTS `customer_owner`;
CREATE TABLE IF NOT EXISTS `customer_owner` (
  `cus_id` int NOT NULL AUTO_INCREMENT,
  `wallet` decimal(65,0) NOT NULL,
  `cus_name` varchar(255) NOT NULL,
  `cus_address` varchar(255) NOT NULL,
  `cus_tel` varchar(15) NOT NULL,
  `cus_email` varchar(100) NOT NULL,
  `cus_birthday` varchar(20) NOT NULL,
  `customer_group_id` int NOT NULL,
  `customer_level_id` int NOT NULL,
  `customer_sex_id` int NOT NULL,
  `province_id` int NOT NULL,
  `amphur_id` int NOT NULL,
  `district_id` int NOT NULL,
  `cus_address_postcode` varchar(5) NOT NULL,
  `cus_remark` varchar(255) NOT NULL,
  `product_score_all` decimal(65,2) NOT NULL,
  `cus_add_time` varchar(100) NOT NULL,
  `cus_edit_time` varchar(100) NOT NULL,
  `owner_id` int NOT NULL,
  `user_id` int NOT NULL,
  `store_id` int NOT NULL,
  PRIMARY KEY (`cus_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

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

--
-- Table structure for table `customer_point_gift_list`
--

DROP TABLE IF EXISTS `customer_point_gift_list`;
CREATE TABLE IF NOT EXISTS `customer_point_gift_list` (
  `gift_id` int NOT NULL AUTO_INCREMENT,
  `product_id` int NOT NULL,
  `product_code` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  `product_name` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  `point_use` int NOT NULL,
  PRIMARY KEY (`gift_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `customer_reasonbuy`
--

DROP TABLE IF EXISTS `customer_reasonbuy`;
CREATE TABLE IF NOT EXISTS `customer_reasonbuy` (
  `customer_reasonbuy_id` int NOT NULL AUTO_INCREMENT,
  `customer_reasonbuy_name` varchar(255) NOT NULL,
  `customer_reasonbuy_remark` text NOT NULL,
  `owner_id` int NOT NULL,
  `user_id` int NOT NULL,
  `store_id` int NOT NULL,
  PRIMARY KEY (`customer_reasonbuy_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

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

--
-- Table structure for table `customer_reasonnotbuy`
--

DROP TABLE IF EXISTS `customer_reasonnotbuy`;
CREATE TABLE IF NOT EXISTS `customer_reasonnotbuy` (
  `customer_reasonnotbuy_id` int NOT NULL AUTO_INCREMENT,
  `customer_reasonnotbuy_name` varchar(255) NOT NULL,
  `customer_reasonnotbuy_remark` text NOT NULL,
  `owner_id` int NOT NULL,
  `user_id` int NOT NULL,
  `store_id` int NOT NULL,
  PRIMARY KEY (`customer_reasonnotbuy_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

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

--
-- Table structure for table `customer_sex`
--

DROP TABLE IF EXISTS `customer_sex`;
CREATE TABLE IF NOT EXISTS `customer_sex` (
  `customer_sex_id` int NOT NULL AUTO_INCREMENT,
  `customer_sex_name` varchar(255) NOT NULL,
  `customer_sex_remark` text NOT NULL,
  `owner_id` int NOT NULL,
  `user_id` int NOT NULL,
  `store_id` int NOT NULL,
  PRIMARY KEY (`customer_sex_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

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

--
-- Table structure for table `customer_use_point_gift_list`
--

DROP TABLE IF EXISTS `customer_use_point_gift_list`;
CREATE TABLE IF NOT EXISTS `customer_use_point_gift_list` (
  `cupgl_id` int NOT NULL AUTO_INCREMENT,
  `cus_id` int NOT NULL,
  `gift_id` int NOT NULL,
  `product_id` int NOT NULL,
  `product_code` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  `product_name` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  `point_use` int NOT NULL,
  `user_id` int NOT NULL,
  `add_time` varchar(255) NOT NULL,
  `shift_id` int NOT NULL,
  PRIMARY KEY (`cupgl_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `customer_use_wallet`
--

DROP TABLE IF EXISTS `customer_use_wallet`;
CREATE TABLE IF NOT EXISTS `customer_use_wallet` (
  `cuw_id` int NOT NULL AUTO_INCREMENT,
  `cus_id` int NOT NULL,
  `money_use` decimal(65,0) NOT NULL,
  `add_time` varchar(255) NOT NULL,
  `user_id` int NOT NULL,
  `shift_id` int NOT NULL,
  `sale_runno` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  PRIMARY KEY (`cuw_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `discount_from_buy_rule`
--

DROP TABLE IF EXISTS `discount_from_buy_rule`;
CREATE TABLE IF NOT EXISTS `discount_from_buy_rule` (
  `id` int NOT NULL AUTO_INCREMENT,
  `code` int NOT NULL,
  `money_if` int NOT NULL,
  `money_will_discount` int NOT NULL,
  `remark` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `discount_from_buy_rule`
--

INSERT INTO `discount_from_buy_rule` (`id`, `code`, `money_if`, `money_will_discount`, `remark`) VALUES
(1, 1, 100, 0, '111');

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

--
-- Table structure for table `food_table`
--

DROP TABLE IF EXISTS `food_table`;
CREATE TABLE IF NOT EXISTS `food_table` (
  `food_table_id` int NOT NULL AUTO_INCREMENT,
  `food_table_name` varchar(255) NOT NULL,
  `food_table_seat` int NOT NULL,
  `food_table_status` int NOT NULL,
  `food_table_opentime` varchar(255) NOT NULL,
  `food_brand_id` int NOT NULL,
  `user_id` int NOT NULL,
  `store_id` int NOT NULL,
  PRIMARY KEY (`food_table_id`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `food_table`
--

INSERT INTO `food_table` (`food_table_id`, `food_table_name`, `food_table_seat`, `food_table_status`, `food_table_opentime`, `food_brand_id`, `user_id`, `store_id`) VALUES
(1, 'ລູກຄ້າທົ່ວໄປ', 100, 1, '', 0, 1, 1),
(2, 'ລູກຄ້າ VIP', 100, 1, '', 0, 1, 1);

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

--
-- Table structure for table `log_delete_order`
--

DROP TABLE IF EXISTS `log_delete_order`;
CREATE TABLE IF NOT EXISTS `log_delete_order` (
  `logdo_id` int NOT NULL AUTO_INCREMENT,
  `s_ID` int NOT NULL,
  `product_id` int NOT NULL,
  `product_name` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  `product_sale_num` int NOT NULL,
  `table_name` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  `shift_id` int NOT NULL,
  `name` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  `adddate` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  PRIMARY KEY (`logdo_id`)
) ENGINE=InnoDB AUTO_INCREMENT=402 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `log_delete_order`
--

INSERT INTO `log_delete_order` (`logdo_id`, `s_ID`, `product_id`, `product_name`, `product_sale_num`, `table_name`, `shift_id`, `name`, `adddate`) VALUES
(400, 93, 736, 'Thai Milk Tea ICE', 1, 'ລູກຄ້າທົ່ວໄປ', 1, 'zone', '1707317985'),
(401, 92, 730, 'Mocha Frappe', 1, 'ລູກຄ້າທົ່ວໄປ', 1, 'zone', '1707317987');

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

--
-- Table structure for table `money_to_point_rule`
--

DROP TABLE IF EXISTS `money_to_point_rule`;
CREATE TABLE IF NOT EXISTS `money_to_point_rule` (
  `id` int NOT NULL AUTO_INCREMENT,
  `code` int NOT NULL,
  `cus_money_if` decimal(65,0) NOT NULL,
  `point_will` int NOT NULL,
  `remark` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `money_to_point_rule`
--

INSERT INTO `money_to_point_rule` (`id`, `code`, `cus_money_if`, `point_will`, `remark`) VALUES
(1, 1, '10', 0, 'ราคาซื้อเปลี่ยนเป็นคะแนน  ถ้าซื้อ  xxx บาท จะได้คะแนน x คะแนน  (เฉพาะสมาชิก)');

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

--
-- Table structure for table `owner`
--

DROP TABLE IF EXISTS `owner`;
CREATE TABLE IF NOT EXISTS `owner` (
  `owner_id` int NOT NULL AUTO_INCREMENT,
  `owner_logo` varchar(255) NOT NULL,
  `owner_bgimg` varchar(255) NOT NULL,
  `owner_vat` int NOT NULL,
  `owner_vat_status` int NOT NULL,
  `store_id` int NOT NULL,
  `owner_name` varchar(255) NOT NULL,
  `owner_address` varchar(255) NOT NULL,
  `owner_tax_number` varchar(100) NOT NULL,
  `province_id` int NOT NULL,
  `amphur_id` int NOT NULL,
  `district_id` int NOT NULL,
  `postcode` int NOT NULL,
  `tel` varchar(20) NOT NULL,
  `add_time` varchar(100) NOT NULL,
  `end_time` varchar(100) NOT NULL,
  `owner_type_id` int NOT NULL,
  `owner_email` varchar(100) NOT NULL,
  `owner_pass` varchar(100) NOT NULL,
  `type_bu_id` int NOT NULL,
  `owner_money` int NOT NULL,
  `status_pay` int NOT NULL,
  `aff_id` int NOT NULL,
  `aff_tag` varchar(20) NOT NULL,
  `aff_income` int NOT NULL,
  `cashier_printer_ip` varchar(255) NOT NULL,
  `printer_type` int NOT NULL COMMENT '1=55mm, 2=80mm',
  `printer_ul` int NOT NULL COMMENT '0=usbonline,1=usboffline,2=lannetwork',
  `printer_name` varchar(255) NOT NULL,
  `printer_order_type` int NOT NULL,
  `footer_slip` varchar(255) NOT NULL,
  `currency_usd` double NOT NULL,
  `currency_thb` double NOT NULL,
  `ads` int NOT NULL,
  PRIMARY KEY (`owner_id`),
  UNIQUE KEY `owner_email` (`owner_email`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `owner`
--

INSERT INTO `owner` (`owner_id`, `owner_logo`, `owner_bgimg`, `owner_vat`, `owner_vat_status`, `store_id`, `owner_name`, `owner_address`, `owner_tax_number`, `province_id`, `amphur_id`, `district_id`, `postcode`, `tel`, `add_time`, `end_time`, `owner_type_id`, `owner_email`, `owner_pass`, `type_bu_id`, `owner_money`, `status_pay`, `aff_id`, `aff_tag`, `aff_income`, `cashier_printer_ip`, `printer_type`, `printer_ul`, `printer_name`, `printer_order_type`, `footer_slip`, `currency_usd`, `currency_thb`, `ads`) VALUES
(1, 'pic/logo/1/1707140592140c5196372b4d77aaa231e566b166b1.jpg', 'pic/bg/1/16902768549a4585a3cc0777840ab212d4a30308d4.jpg', 0, 0, 1, 'The Wealthy Cafe', 'Luangprabang', '', 0, 0, 0, 0, '02099999999', '1519664151', '', 0, '06b73f026451d2e3fb08383185fc0fbc', '06b73f026451d2e3fb08383185fc0fbc', 0, 0, 0, 0, '', 0, '192.168.123.101', 2, 0, 'POS80', 0, 'ຂອບໃຈຫລາຍໆ * Thankyou so much *', 19000, 490, 1);

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

--
-- Table structure for table `product_material`
--

DROP TABLE IF EXISTS `product_material`;
CREATE TABLE IF NOT EXISTS `product_material` (
  `m_id` int NOT NULL AUTO_INCREMENT,
  `product_id` int NOT NULL,
  `product_id_material` int NOT NULL,
  `num` int NOT NULL,
  PRIMARY KEY (`m_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `product_price_cus`
--

DROP TABLE IF EXISTS `product_price_cus`;
CREATE TABLE IF NOT EXISTS `product_price_cus` (
  `id` int NOT NULL AUTO_INCREMENT,
  `product_id` int NOT NULL,
  `product_code` varchar(255) NOT NULL,
  `cus_id` int NOT NULL,
  `product_price_cus` decimal(65,2) NOT NULL,
  `owner_id` int NOT NULL,
  `user_id` int NOT NULL,
  `store_id` int NOT NULL,
  `add_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `product_return_datail`
--

DROP TABLE IF EXISTS `product_return_datail`;
CREATE TABLE IF NOT EXISTS `product_return_datail` (
  `ID` int NOT NULL AUTO_INCREMENT,
  `return_runno` varchar(255) NOT NULL,
  `product_id` int NOT NULL,
  `product_name` varchar(255) NOT NULL,
  `product_code` varchar(255) NOT NULL,
  `product_price` int NOT NULL,
  `product_sale_num` int NOT NULL,
  `product_price_discount` decimal(65,2) NOT NULL,
  `product_score` int NOT NULL,
  `adddate` varchar(255) NOT NULL,
  `owner_id` int NOT NULL,
  `user_id` int NOT NULL,
  `store_id` int NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

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

--
-- Table structure for table `product_return_header`
--

DROP TABLE IF EXISTS `product_return_header`;
CREATE TABLE IF NOT EXISTS `product_return_header` (
  `ID` int NOT NULL AUTO_INCREMENT,
  `return_runno` varchar(255) NOT NULL,
  `sale_runno` varchar(255) NOT NULL,
  `cus_name` varchar(255) NOT NULL,
  `cus_id` int NOT NULL,
  `cus_address_all` text NOT NULL,
  `sumsale_discount` decimal(65,2) NOT NULL,
  `sumsale_num` int NOT NULL,
  `sumsale_price` decimal(65,2) NOT NULL,
  `money_from_customer` decimal(65,2) NOT NULL,
  `money_changeto_customer` decimal(65,2) NOT NULL,
  `vat` int NOT NULL,
  `product_score_all` int NOT NULL,
  `adddate` varchar(255) NOT NULL,
  `owner_id` int NOT NULL,
  `user_id` int NOT NULL,
  `store_id` int NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

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

--
-- Table structure for table `product_service`
--

DROP TABLE IF EXISTS `product_service`;
CREATE TABLE IF NOT EXISTS `product_service` (
  `product_service_id` int NOT NULL AUTO_INCREMENT,
  `product_service_name` varchar(255) NOT NULL,
  `product_service_price` int NOT NULL,
  `product_service_remark` text NOT NULL,
  `owner_id` int NOT NULL,
  `user_id` int NOT NULL,
  `store_id` int NOT NULL,
  PRIMARY KEY (`product_service_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

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

--
-- Table structure for table `purchase_buy_detail`
--

DROP TABLE IF EXISTS `purchase_buy_detail`;
CREATE TABLE IF NOT EXISTS `purchase_buy_detail` (
  `importproduct_detail_id` int NOT NULL AUTO_INCREMENT,
  `importproduct_header_code` varchar(255) NOT NULL,
  `product_id` int NOT NULL,
  `importproduct_detail_pricebase` decimal(65,2) NOT NULL,
  `importproduct_detail_num` int NOT NULL,
  `price_per_num` decimal(65,2) NOT NULL,
  `importproduct_detail_date` varchar(255) NOT NULL,
  `owner_id` int NOT NULL,
  `user_id` int NOT NULL,
  `store_id` int NOT NULL,
  PRIMARY KEY (`importproduct_detail_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

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

--
-- Table structure for table `purchase_buy_header`
--

DROP TABLE IF EXISTS `purchase_buy_header`;
CREATE TABLE IF NOT EXISTS `purchase_buy_header` (
  `importproduct_header_id` int NOT NULL AUTO_INCREMENT,
  `importproduct_header_code` varchar(255) NOT NULL,
  `importproduct_header_refcode` varchar(50) NOT NULL,
  `importproduct_header_num` int NOT NULL,
  `allprice` decimal(65,2) NOT NULL,
  `vendor_id` int NOT NULL,
  `vendor_name` text NOT NULL,
  `importproduct_header_amount` decimal(65,2) NOT NULL,
  `importproduct_header_remark` varchar(255) NOT NULL,
  `importproduct_header_date` varchar(255) NOT NULL,
  `owner_id` int NOT NULL,
  `user_id` int NOT NULL,
  `store_id` int NOT NULL,
  `status` int NOT NULL COMMENT '0=new, 1=instock',
  PRIMARY KEY (`importproduct_header_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

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

--
-- Table structure for table `quotation_list_datail`
--

DROP TABLE IF EXISTS `quotation_list_datail`;
CREATE TABLE IF NOT EXISTS `quotation_list_datail` (
  `ID` int NOT NULL AUTO_INCREMENT,
  `s_ID` int NOT NULL,
  `sale_runno` varchar(255) NOT NULL,
  `product_id` int NOT NULL,
  `product_name` varchar(255) NOT NULL,
  `product_code` varchar(255) NOT NULL,
  `product_price` decimal(65,2) NOT NULL,
  `product_sale_num` int NOT NULL,
  `product_price_discount` decimal(65,2) NOT NULL,
  `product_score` int NOT NULL,
  `note_order` varchar(11) NOT NULL,
  `status` int NOT NULL,
  `table_id` int NOT NULL,
  `adddate` varchar(255) NOT NULL,
  `owner_id` int NOT NULL,
  `user_id` int NOT NULL,
  `store_id` int NOT NULL,
  `shift_id` int NOT NULL,
  `so_order` int NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

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

--
-- Table structure for table `quotation_list_header`
--

DROP TABLE IF EXISTS `quotation_list_header`;
CREATE TABLE IF NOT EXISTS `quotation_list_header` (
  `ID` int NOT NULL AUTO_INCREMENT,
  `sale_runno` varchar(255) NOT NULL,
  `cus_name` varchar(255) NOT NULL,
  `cus_id` int NOT NULL,
  `cus_address_all` text NOT NULL,
  `sumsale_discount` decimal(65,2) NOT NULL,
  `sumsale_num` int NOT NULL,
  `sumsale_price` decimal(65,2) NOT NULL,
  `money_from_customer` decimal(65,2) NOT NULL,
  `money_changeto_customer` decimal(65,2) NOT NULL,
  `vat` int NOT NULL,
  `product_score_all` int NOT NULL,
  `sale_type` int NOT NULL COMMENT '1=ขายปลีก,2=ขายส่ง',
  `pay_type` int NOT NULL COMMENT '1=เงินสด,2=โอน,3=บัตรเครดิต,4=ค้างชำระ',
  `reserv` int NOT NULL COMMENT '1=จอง',
  `discount_last` decimal(65,2) NOT NULL COMMENT 'ส่วนลดท้ายบิล',
  `adddate` varchar(255) NOT NULL,
  `owner_id` int NOT NULL,
  `user_id` int NOT NULL,
  `store_id` int NOT NULL,
  `shift_id` int NOT NULL,
  `number_for_cus` int NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

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

--
-- Table structure for table `sale_list_datail`
--

DROP TABLE IF EXISTS `sale_list_datail`;
CREATE TABLE IF NOT EXISTS `sale_list_datail` (
  `ID` int NOT NULL AUTO_INCREMENT,
  `sale_runno` varchar(255) NOT NULL,
  `product_id` int NOT NULL,
  `product_name` varchar(255) NOT NULL,
  `product_code` varchar(255) NOT NULL,
  `product_price` decimal(65,2) NOT NULL,
  `product_sale_num` int NOT NULL,
  `product_sale_num2` int NOT NULL,
  `product_price_discount` decimal(65,2) NOT NULL,
  `product_score` int NOT NULL,
  `adddate` varchar(255) NOT NULL,
  `owner_id` int NOT NULL,
  `user_id` int NOT NULL,
  `store_id` int NOT NULL,
  `table_id` int NOT NULL,
  `table_name` varchar(255) NOT NULL,
  `s_ID` int NOT NULL,
  `so_order` int NOT NULL,
  `status` int NOT NULL,
  `note_order` varchar(255) NOT NULL,
  `shift_id` int NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=2834 DEFAULT CHARSET=utf8mb3;

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

--
-- Table structure for table `sale_list_datail_bak`
--

DROP TABLE IF EXISTS `sale_list_datail_bak`;
CREATE TABLE IF NOT EXISTS `sale_list_datail_bak` (
  `ID_auto` int NOT NULL AUTO_INCREMENT,
  `ID` int NOT NULL,
  `sale_runno` varchar(255) NOT NULL,
  `product_id` int NOT NULL,
  `product_name` varchar(255) NOT NULL,
  `product_code` varchar(255) NOT NULL,
  `product_price` decimal(65,2) NOT NULL,
  `product_sale_num` int NOT NULL,
  `product_sale_num2` int NOT NULL,
  `product_price_discount` decimal(65,2) NOT NULL,
  `product_score` int NOT NULL,
  `adddate` varchar(255) NOT NULL,
  `owner_id` int NOT NULL,
  `user_id` int NOT NULL,
  `store_id` int NOT NULL,
  `table_id` int NOT NULL,
  `table_name` varchar(255) NOT NULL,
  `s_ID` int NOT NULL,
  `so_order` int NOT NULL,
  `status` int NOT NULL,
  `note_order` varchar(255) NOT NULL,
  `shift_id` int NOT NULL,
  PRIMARY KEY (`ID_auto`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `sale_list_datail_bak`
--

INSERT INTO `sale_list_datail_bak` (`ID_auto`, `ID`, `sale_runno`, `product_id`, `product_name`, `product_code`, `product_price`, `product_sale_num`, `product_sale_num2`, `product_price_discount`, `product_score`, `adddate`, `owner_id`, `user_id`, `store_id`, `table_id`, `table_name`, `s_ID`, `so_order`, `status`, `note_order`, `shift_id`) VALUES
(3, 2831, '0000000001', 745, 'Milk ICE (ນົມສົດ_ເຢັນ)', '164967021', '24000.00', 1, 0, '0.00', 0, '1707202854', 1, 8, 1, 0, '', 0, 0, 0, '', 1),
(4, 2833, '0000000001', 742, 'Chocolate ICE (ຊັອກໂກແລັດ_ເຢັນ)', '164967018', '26000.00', 1, 0, '0.00', 0, '1707231826', 1, 1, 1, 0, '', 0, 0, 0, '', 1);

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

--
-- Table structure for table `sale_list_header`
--

DROP TABLE IF EXISTS `sale_list_header`;
CREATE TABLE IF NOT EXISTS `sale_list_header` (
  `ID` int NOT NULL AUTO_INCREMENT,
  `sale_runno` varchar(255) NOT NULL,
  `cus_name` varchar(255) NOT NULL,
  `cus_id` int NOT NULL,
  `cus_address_all` text NOT NULL,
  `sumsale_discount` decimal(65,2) NOT NULL,
  `sumsale_num` int NOT NULL,
  `sumsale_price` decimal(65,2) NOT NULL,
  `money_from_customer` decimal(65,2) NOT NULL,
  `money_changeto_customer` decimal(65,2) NOT NULL,
  `vat` int NOT NULL,
  `product_score_all` int NOT NULL,
  `sale_type` int NOT NULL COMMENT '1=ขายปลีก,2=ขายส่ง',
  `pay_type` int NOT NULL COMMENT '1=เงินสด,2=โอน,3=บัตรเครดิต,4=ค้างชำระ,5=qrpayment,6=usewallet',
  `reserv` int NOT NULL COMMENT '1=จอง',
  `discount_last` decimal(65,2) NOT NULL COMMENT 'ส่วนลดท้ายบิล',
  `adddate` varchar(255) NOT NULL,
  `owner_id` int NOT NULL,
  `user_id` int NOT NULL,
  `user_ordering_id` int NOT NULL,
  `store_id` int NOT NULL,
  `table_id` int NOT NULL,
  `table_name` varchar(255) NOT NULL,
  `s_ID` int NOT NULL,
  `shift_id` int NOT NULL,
  PRIMARY KEY (`ID`),
  UNIQUE KEY `sale_runno` (`sale_runno`)
) ENGINE=InnoDB AUTO_INCREMENT=826 DEFAULT CHARSET=utf8mb3;

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

--
-- Table structure for table `sale_list_header_bak`
--

DROP TABLE IF EXISTS `sale_list_header_bak`;
CREATE TABLE IF NOT EXISTS `sale_list_header_bak` (
  `ID_auto` int NOT NULL AUTO_INCREMENT,
  `ID` int NOT NULL,
  `sale_runno` varchar(255) NOT NULL,
  `cus_name` varchar(255) NOT NULL,
  `cus_id` int NOT NULL,
  `cus_address_all` text NOT NULL,
  `sumsale_discount` decimal(65,2) NOT NULL,
  `sumsale_num` int NOT NULL,
  `sumsale_price` decimal(65,2) NOT NULL,
  `money_from_customer` decimal(65,2) NOT NULL,
  `money_changeto_customer` decimal(65,2) NOT NULL,
  `vat` int NOT NULL,
  `product_score_all` int NOT NULL,
  `sale_type` int NOT NULL COMMENT '1=ขายปลีก,2=ขายส่ง',
  `pay_type` int NOT NULL COMMENT '1=เงินสด,2=โอน,3=บัตรเครดิต,4=ค้างชำระ,5=qrpayment,6=usewallet',
  `reserv` int NOT NULL COMMENT '1=จอง',
  `discount_last` decimal(65,2) NOT NULL COMMENT 'ส่วนลดท้ายบิล',
  `adddate` varchar(255) NOT NULL,
  `owner_id` int NOT NULL,
  `user_id` int NOT NULL,
  `store_id` int NOT NULL,
  `table_id` int NOT NULL,
  `table_name` varchar(255) NOT NULL,
  `s_ID` int NOT NULL,
  `shift_id` int NOT NULL,
  `user_name_del` varchar(255) NOT NULL,
  `del_date` varchar(255) NOT NULL,
  PRIMARY KEY (`ID_auto`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `sale_list_header_bak`
--

INSERT INTO `sale_list_header_bak` (`ID_auto`, `ID`, `sale_runno`, `cus_name`, `cus_id`, `cus_address_all`, `sumsale_discount`, `sumsale_num`, `sumsale_price`, `money_from_customer`, `money_changeto_customer`, `vat`, `product_score_all`, `sale_type`, `pay_type`, `reserv`, `discount_last`, `adddate`, `owner_id`, `user_id`, `store_id`, `table_id`, `table_name`, `s_ID`, `shift_id`, `user_name_del`, `del_date`) VALUES
(2, 824, '0000000001', '', 0, '', '0.00', 3, '71000.00', '100000.00', '29000.00', 0, 0, 1, 1, 0, '0.00', '1707202854', 1, 8, 1, 1, 'ລູກຄ້າທົ່ວໄປ', 0, 1, 'Admin', '1707231486'),
(3, 825, '0000000001', '', 0, '', '0.00', 2, '56000.00', '100000.00', '44000.00', 0, 0, 1, 1, 0, '0.00', '1707231826', 1, 1, 1, 2, 'ລູກຄ້າ VIP', 0, 1, 'Admin', '1707231858');

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

--
-- Table structure for table `sale_list_order`
--

DROP TABLE IF EXISTS `sale_list_order`;
CREATE TABLE IF NOT EXISTS `sale_list_order` (
  `s_ID` int NOT NULL AUTO_INCREMENT,
  `product_id` int NOT NULL,
  `product_category_id` int NOT NULL,
  `product_name` varchar(255) NOT NULL,
  `product_code` varchar(255) NOT NULL,
  `product_price` int NOT NULL,
  `product_sale_num` int NOT NULL,
  `product_price_discount` decimal(65,2) NOT NULL,
  `product_score` int NOT NULL,
  `note_order` varchar(255) NOT NULL,
  `adddate` varchar(255) NOT NULL,
  `owner_id` int NOT NULL,
  `user_id` int NOT NULL,
  `store_id` int NOT NULL,
  `table_id` int NOT NULL,
  PRIMARY KEY (`s_ID`)
) ENGINE=InnoDB AUTO_INCREMENT=94 DEFAULT CHARSET=utf8mb3;

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

--
-- Table structure for table `sale_list_order_kitchen`
--

DROP TABLE IF EXISTS `sale_list_order_kitchen`;
CREATE TABLE IF NOT EXISTS `sale_list_order_kitchen` (
  `k_ID` int NOT NULL AUTO_INCREMENT,
  `s_ID` int NOT NULL,
  `product_id` int NOT NULL,
  `product_name` varchar(255) NOT NULL,
  `product_category_id` int NOT NULL,
  `product_code` varchar(255) NOT NULL,
  `product_price` int NOT NULL,
  `product_sale_num` int NOT NULL,
  `product_price_discount` decimal(65,2) NOT NULL,
  `product_score` int NOT NULL,
  `note_order` varchar(255) NOT NULL,
  `adddate` varchar(255) NOT NULL,
  `owner_id` int NOT NULL,
  `user_id` int NOT NULL,
  `store_id` int NOT NULL,
  `table_id` int NOT NULL,
  `status` int NOT NULL COMMENT '0=มาใหม่,1=เริ่มทำ,2=ทำเสร็จแล้ว,3=ยกเลิก',
  PRIMARY KEY (`k_ID`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb3;

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

--
-- Table structure for table `sale_list_table`
--

DROP TABLE IF EXISTS `sale_list_table`;
CREATE TABLE IF NOT EXISTS `sale_list_table` (
  `s_ID` int NOT NULL AUTO_INCREMENT,
  `product_id` int NOT NULL,
  `product_category_id` int NOT NULL,
  `product_name` varchar(255) NOT NULL,
  `product_code` varchar(255) NOT NULL,
  `product_price` decimal(65,2) NOT NULL,
  `product_sale_num` int NOT NULL,
  `product_price_discount` decimal(65,2) NOT NULL,
  `product_score` int NOT NULL,
  `note_order` varchar(255) NOT NULL,
  `adddate` varchar(255) NOT NULL,
  `owner_id` int NOT NULL,
  `user_id` int NOT NULL,
  `store_id` int NOT NULL,
  `table_id` int NOT NULL,
  `status` int NOT NULL,
  PRIMARY KEY (`s_ID`)
) ENGINE=InnoDB AUTO_INCREMENT=94 DEFAULT CHARSET=utf8mb3;

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

--
-- Table structure for table `sale_list_table_move_log`
--

DROP TABLE IF EXISTS `sale_list_table_move_log`;
CREATE TABLE IF NOT EXISTS `sale_list_table_move_log` (
  `ID` int NOT NULL AUTO_INCREMENT,
  `old_table_id` int NOT NULL,
  `new_table_id` int NOT NULL,
  `mover` varchar(255) NOT NULL,
  `move_date` varchar(255) NOT NULL,
  `s_ID` int NOT NULL,
  `product_id` int NOT NULL,
  `product_category_id` int NOT NULL,
  `product_name` varchar(255) NOT NULL,
  `product_code` varchar(255) NOT NULL,
  `product_price` decimal(65,2) NOT NULL,
  `product_sale_num` int NOT NULL,
  `product_price_discount` decimal(65,2) NOT NULL,
  `product_score` int NOT NULL,
  `note_order` varchar(255) NOT NULL,
  `adddate` varchar(255) NOT NULL,
  `owner_id` int NOT NULL,
  `user_id` int NOT NULL,
  `store_id` int NOT NULL,
  `table_id` int NOT NULL,
  `status` int NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=139 DEFAULT CHARSET=utf8mb3;

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

--
-- Table structure for table `sale_table_discount_last`
--

DROP TABLE IF EXISTS `sale_table_discount_last`;
CREATE TABLE IF NOT EXISTS `sale_table_discount_last` (
  `table_id` int NOT NULL,
  `discount_last` decimal(65,2) NOT NULL,
  `discount_percent` int NOT NULL,
  `customer_id` int NOT NULL,
  `customer_name` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  `customer_product_score_all` decimal(60,0) NOT NULL,
  `customer_wallet` decimal(60,0) NOT NULL,
  `cus_address_all` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  `selecttable` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `sale_table_discount_last`
--

INSERT INTO `sale_table_discount_last` (`table_id`, `discount_last`, `discount_percent`, `customer_id`, `customer_name`, `customer_product_score_all`, `customer_wallet`, `cus_address_all`, `selecttable`) VALUES
(8, '0.00', 0, 0, '', '0', '0', '', 0),
(9, '0.00', 0, 0, '', '0', '0', '', 0),
(10, '0.00', 0, 0, '', '0', '0', '', 0),
(11, '0.00', 0, 0, '', '0', '0', '', 0),
(6, '0.00', 0, 0, '', '0', '0', '', 0),
(4, '0.00', 0, 0, '', '0', '0', '', 0),
(5, '0.00', 0, 0, '', '0', '0', '', 0),
(12, '0.00', 0, 0, '', '0', '0', '', 0),
(7, '0.00', 0, 0, '', '0', '0', '', 0),
(3, '400000.00', 0, 0, '', '0', '0', '', 0),
(2, '0.00', 0, 0, '', '0', '0', '', 0),
(1, '0.00', 0, 0, '', '0', '0', '', 0);

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

--
-- Table structure for table `service_charge_rule`
--

DROP TABLE IF EXISTS `service_charge_rule`;
CREATE TABLE IF NOT EXISTS `service_charge_rule` (
  `id` int NOT NULL AUTO_INCREMENT,
  `product_code` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  `product_name` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  `servicecharge_percent` int NOT NULL,
  `remark` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `service_charge_rule`
--

INSERT INTO `service_charge_rule` (`id`, `product_code`, `product_name`, `servicecharge_percent`, `remark`) VALUES
(1, '1529152104', 'Service Charge', 0, 'เปอร์เซ็น เพิ่มราคาจากการซื้อ เนื่องจากเป็นค่าบริกร');

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

--
-- Table structure for table `shift`
--

DROP TABLE IF EXISTS `shift`;
CREATE TABLE IF NOT EXISTS `shift` (
  `shift_id` int NOT NULL AUTO_INCREMENT,
  `user_id` int NOT NULL,
  `user_name` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  `shift_start_time` varchar(255) NOT NULL,
  `shift_end_time` varchar(255) NOT NULL,
  `shift_money_start` decimal(65,2) NOT NULL,
  `shift_money_end` decimal(65,2) NOT NULL,
  PRIMARY KEY (`shift_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `shift`
--

INSERT INTO `shift` (`shift_id`, `user_id`, `user_name`, `shift_start_time`, `shift_end_time`, `shift_money_start`, `shift_money_end`) VALUES
(1, 10, 'zone', '1612692177', '', '-1.00', '0.00');

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

--
-- Table structure for table `store_manager`
--

DROP TABLE IF EXISTS `store_manager`;
CREATE TABLE IF NOT EXISTS `store_manager` (
  `store_id` int NOT NULL AUTO_INCREMENT,
  `store_name` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  `store_storename` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT 'ชื่อร้าน',
  `store_tel` varchar(255) NOT NULL,
  `store_email` varchar(255) NOT NULL,
  `store_password` varchar(255) NOT NULL,
  `max_user` int NOT NULL,
  `store_type` int NOT NULL COMMENT '0=pos , 1=ร้านอาหาร',
  PRIMARY KEY (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `store_manager`
--

INSERT INTO `store_manager` (`store_id`, `store_name`, `store_storename`, `store_tel`, `store_email`, `store_password`, `max_user`, `store_type`) VALUES
(1, 'yo', '11111111', '11111111', 'yo@gmail.com', '202cb962ac59075b964b07152d234b70', 0, 0);

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

--
-- Table structure for table `supplier`
--

DROP TABLE IF EXISTS `supplier`;
CREATE TABLE IF NOT EXISTS `supplier` (
  `supplier_id` int NOT NULL AUTO_INCREMENT,
  `supplier_name` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  `supplier_card_tax` varchar(255) NOT NULL,
  `supplier_code` varchar(255) NOT NULL,
  `supplier_bd` varchar(255) NOT NULL,
  `supplier_address` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  `supplier_tel` varchar(255) NOT NULL,
  `supplier_image` varchar(255) NOT NULL,
  `owner_id` int NOT NULL,
  `user_id` int NOT NULL,
  `store_id` int NOT NULL,
  `add_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`supplier_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `user_ordering_table`
--

DROP TABLE IF EXISTS `user_ordering_table`;
CREATE TABLE IF NOT EXISTS `user_ordering_table` (
  `ID` int NOT NULL AUTO_INCREMENT,
  `user_id` int NOT NULL,
  `table_id` int NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `user_ordering_table`
--

INSERT INTO `user_ordering_table` (`ID`, `user_id`, `table_id`) VALUES
(1, 8, 1);

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

--
-- Table structure for table `user_owner`
--

DROP TABLE IF EXISTS `user_owner`;
CREATE TABLE IF NOT EXISTS `user_owner` (
  `user_id` int NOT NULL AUTO_INCREMENT,
  `owner_id` int NOT NULL,
  `store_id` int NOT NULL,
  `name` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  `user_email` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  `user_password` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  `user_type` int NOT NULL COMMENT '0=พนักงานเปิดบิล,1=พนักงานขายแคชเชียร์,2=สต๊อกร้าน ,3=พนักงานคุมคลังสินค้าใหญ่,4=admin ร้าน , 9 พนักงานรับออเดอร์, 10 หน้าจอลูกค้า,15จอchef',
  `create_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `store_type` int NOT NULL COMMENT '0=pos , 1=ร้านอาหาร',
  `food_brand_id` int NOT NULL,
  `apartment_brand_id` int NOT NULL,
  `food_table_id` int NOT NULL,
  `kitchen_id` int NOT NULL,
  PRIMARY KEY (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `user_owner`
--

INSERT INTO `user_owner` (`user_id`, `owner_id`, `store_id`, `name`, `user_email`, `user_password`, `user_type`, `create_date`, `store_type`, `food_brand_id`, `apartment_brand_id`, `food_table_id`, `kitchen_id`) VALUES
(1, 1, 1, 'admin', 'Admin', '97e44d0ee8d6213e5b42f74a4af26a2c', 4, '2018-02-26 16:56:19', 0, 0, 0, 0, 0),
(8, 1, 1, 'sa', 'sa', '00ef50c7bd4a4709b311c90e9c4c8ad3', 1, '2021-02-03 04:32:44', 0, 0, 0, 0, 0),
(10, 1, 1, 'zone', 'zone', '52369f83d1680c0e25bc8a026792f961', 4, '2021-02-03 05:13:32', 0, 0, 0, 0, 0);

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

--
-- Table structure for table `vat_rule`
--

DROP TABLE IF EXISTS `vat_rule`;
CREATE TABLE IF NOT EXISTS `vat_rule` (
  `id` int NOT NULL AUTO_INCREMENT,
  `product_code` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  `product_name` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  `vat_percent` int NOT NULL,
  `remark` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `vat_rule`
--

INSERT INTO `vat_rule` (`id`, `product_code`, `product_name`, `vat_percent`, `remark`) VALUES
(1, '1530802118', 'VAT', 0, 'เปอร์เซ็น เพิ่มราคาจากการซื้อ เนื่องจากเป็นภาษี');

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

--
-- Table structure for table `vendor`
--

DROP TABLE IF EXISTS `vendor`;
CREATE TABLE IF NOT EXISTS `vendor` (
  `vendor_id` int NOT NULL AUTO_INCREMENT,
  `vendor_name` longtext CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  `vendor_address` longtext CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  `id_vat` varchar(255) NOT NULL,
  `vat` int NOT NULL,
  PRIMARY KEY (`vendor_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `whbig_exportproduct_datail`
--

DROP TABLE IF EXISTS `whbig_exportproduct_datail`;
CREATE TABLE IF NOT EXISTS `whbig_exportproduct_datail` (
  `ID` int NOT NULL AUTO_INCREMENT,
  `sale_runno` varchar(255) NOT NULL,
  `product_id` int NOT NULL,
  `product_name` varchar(255) NOT NULL,
  `zone_name` varchar(255) NOT NULL,
  `product_code` varchar(255) NOT NULL,
  `product_price` int NOT NULL,
  `product_sale_num` int NOT NULL,
  `product_price_discount` decimal(65,2) NOT NULL,
  `product_score` int NOT NULL,
  `adddate` varchar(255) NOT NULL,
  `owner_id` int NOT NULL,
  `user_id` int NOT NULL,
  `store_id` int NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

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

--
-- Table structure for table `whbig_exportproduct_header`
--

DROP TABLE IF EXISTS `whbig_exportproduct_header`;
CREATE TABLE IF NOT EXISTS `whbig_exportproduct_header` (
  `ID` int NOT NULL AUTO_INCREMENT,
  `sale_runno` varchar(255) NOT NULL,
  `cus_name` varchar(255) NOT NULL,
  `cus_id` int NOT NULL,
  `cus_address_all` text NOT NULL,
  `sumsale_discount` decimal(65,2) NOT NULL,
  `sumsale_num` int NOT NULL,
  `sumsale_price` decimal(65,2) NOT NULL,
  `money_from_customer` decimal(65,2) NOT NULL,
  `money_changeto_customer` decimal(65,2) NOT NULL,
  `vat` int NOT NULL,
  `product_score_all` int NOT NULL,
  `adddate` varchar(255) NOT NULL,
  `owner_id` int NOT NULL,
  `user_id` int NOT NULL,
  `store_id` int NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

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

--
-- Table structure for table `whbig_importproduct_detail`
--

DROP TABLE IF EXISTS `whbig_importproduct_detail`;
CREATE TABLE IF NOT EXISTS `whbig_importproduct_detail` (
  `importproduct_detail_id` int NOT NULL AUTO_INCREMENT,
  `importproduct_header_code` int NOT NULL,
  `product_id` int NOT NULL,
  `importproduct_detail_pricebase` decimal(65,2) NOT NULL,
  `importproduct_detail_num` int NOT NULL,
  `importproduct_detail_date` varchar(255) NOT NULL,
  `owner_id` int NOT NULL,
  `user_id` int NOT NULL,
  `store_id` int NOT NULL,
  PRIMARY KEY (`importproduct_detail_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

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

--
-- Table structure for table `whbig_importproduct_header`
--

DROP TABLE IF EXISTS `whbig_importproduct_header`;
CREATE TABLE IF NOT EXISTS `whbig_importproduct_header` (
  `importproduct_header_id` int NOT NULL AUTO_INCREMENT,
  `importproduct_header_code` int NOT NULL,
  `importproduct_header_refcode` varchar(50) NOT NULL,
  `importproduct_header_num` int NOT NULL,
  `importproduct_header_amount` decimal(65,2) NOT NULL,
  `importproduct_header_remark` varchar(255) NOT NULL,
  `importproduct_header_date` varchar(255) NOT NULL,
  `owner_id` int NOT NULL,
  `user_id` int NOT NULL,
  `store_id` int NOT NULL,
  PRIMARY KEY (`importproduct_header_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

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

--
-- Table structure for table `wh_exportproduct_detail`
--

DROP TABLE IF EXISTS `wh_exportproduct_detail`;
CREATE TABLE IF NOT EXISTS `wh_exportproduct_detail` (
  `importproduct_detail_id` int NOT NULL AUTO_INCREMENT,
  `importproduct_header_code` int NOT NULL,
  `product_id` int NOT NULL,
  `importproduct_detail_pricebase` decimal(65,2) NOT NULL,
  `importproduct_detail_num` int NOT NULL,
  `importproduct_detail_date` varchar(255) NOT NULL,
  `lotno` varchar(255) NOT NULL,
  `date_end` varchar(255) NOT NULL,
  `date_end2` varchar(255) NOT NULL,
  `owner_id` int NOT NULL,
  `user_id` int NOT NULL,
  `store_id` int NOT NULL,
  `status` int NOT NULL,
  PRIMARY KEY (`importproduct_detail_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

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

--
-- Table structure for table `wh_exportproduct_header`
--

DROP TABLE IF EXISTS `wh_exportproduct_header`;
CREATE TABLE IF NOT EXISTS `wh_exportproduct_header` (
  `importproduct_header_id` int NOT NULL AUTO_INCREMENT,
  `importproduct_header_code` int NOT NULL,
  `importproduct_header_refcode` varchar(50) NOT NULL,
  `importproduct_header_num` int NOT NULL,
  `importproduct_header_amount` decimal(65,2) NOT NULL,
  `importproduct_header_remark` varchar(255) NOT NULL,
  `importproduct_header_date` varchar(255) NOT NULL,
  `lotno` varchar(255) NOT NULL,
  `date_end` varchar(255) NOT NULL,
  `date_end2` varchar(255) NOT NULL,
  `owner_id` int NOT NULL,
  `user_id` int NOT NULL,
  `store_id` int NOT NULL,
  PRIMARY KEY (`importproduct_header_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

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

--
-- Table structure for table `wh_importproduct_detail`
--

DROP TABLE IF EXISTS `wh_importproduct_detail`;
CREATE TABLE IF NOT EXISTS `wh_importproduct_detail` (
  `importproduct_detail_id` int NOT NULL AUTO_INCREMENT,
  `importproduct_header_code` int NOT NULL,
  `product_id` int NOT NULL,
  `importproduct_detail_pricebase` decimal(65,2) NOT NULL,
  `importproduct_detail_num` int NOT NULL,
  `importproduct_detail_date` varchar(255) NOT NULL,
  `owner_id` int NOT NULL,
  `user_id` int NOT NULL,
  `store_id` int NOT NULL,
  PRIMARY KEY (`importproduct_detail_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

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

--
-- Table structure for table `wh_importproduct_header`
--

DROP TABLE IF EXISTS `wh_importproduct_header`;
CREATE TABLE IF NOT EXISTS `wh_importproduct_header` (
  `importproduct_header_id` int NOT NULL AUTO_INCREMENT,
  `importproduct_header_code` int NOT NULL,
  `importproduct_header_refcode` varchar(50) NOT NULL,
  `importproduct_header_num` int NOT NULL,
  `importproduct_header_amount` decimal(65,2) NOT NULL,
  `importproduct_header_remark` varchar(255) NOT NULL,
  `importproduct_header_date` varchar(255) NOT NULL,
  `owner_id` int NOT NULL,
  `user_id` int NOT NULL,
  `store_id` int NOT NULL,
  PRIMARY KEY (`importproduct_header_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

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

--
-- Table structure for table `wh_product_category`
--

DROP TABLE IF EXISTS `wh_product_category`;
CREATE TABLE IF NOT EXISTS `wh_product_category` (
  `product_category_id` int NOT NULL AUTO_INCREMENT,
  `product_category_name` varchar(255) NOT NULL,
  `printer_ip` varchar(255) NOT NULL,
  `kitchen_id` int NOT NULL,
  `owner_id` int NOT NULL,
  `user_id` int NOT NULL,
  `store_id` int NOT NULL,
  PRIMARY KEY (`product_category_id`)
) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `wh_product_category`
--

INSERT INTO `wh_product_category` (`product_category_id`, `product_category_name`, `printer_ip`, `kitchen_id`, `owner_id`, `user_id`, `store_id`) VALUES
(1, 'COFFEE', '', 0, 1, 10, 1),
(2, 'TEA & NON CAFEIN', '', 0, 1, 10, 1),
(3, 'SODA', '', 0, 1, 10, 1),
(4, 'FRUIT SHAKE', '', 0, 1, 10, 1);

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

--
-- Table structure for table `wh_product_category_kitchen`
--

DROP TABLE IF EXISTS `wh_product_category_kitchen`;
CREATE TABLE IF NOT EXISTS `wh_product_category_kitchen` (
  `kitchen_id` int NOT NULL AUTO_INCREMENT,
  `kitchen_name` varchar(255) NOT NULL,
  `printer_ip` varchar(255) NOT NULL,
  `owner_id` int NOT NULL,
  `user_id` int NOT NULL,
  `store_id` int NOT NULL,
  PRIMARY KEY (`kitchen_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `wh_product_category_kitchen`
--

INSERT INTO `wh_product_category_kitchen` (`kitchen_id`, `kitchen_name`, `printer_ip`, `owner_id`, `user_id`, `store_id`) VALUES
(1, 'Coffee', '', 1, 10, 1);

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

--
-- Table structure for table `wh_product_list`
--

DROP TABLE IF EXISTS `wh_product_list`;
CREATE TABLE IF NOT EXISTS `wh_product_list` (
  `product_id` int NOT NULL AUTO_INCREMENT,
  `product_code` varchar(255) NOT NULL,
  `product_name` varchar(255) NOT NULL,
  `product_image` varchar(255) NOT NULL,
  `product_price` decimal(65,2) NOT NULL,
  `product_wholesale_price` decimal(65,2) NOT NULL,
  `product_pricebase` decimal(65,2) NOT NULL,
  `product_price_discount` decimal(65,2) NOT NULL,
  `product_category_id` int NOT NULL,
  `product_stock_num` int NOT NULL,
  `product_num_all` int NOT NULL,
  `product_whbig_num` int NOT NULL,
  `product_price_value` decimal(65,2) NOT NULL,
  `product_score` decimal(65,2) NOT NULL,
  `product_rank` int NOT NULL,
  `zone_id` int NOT NULL,
  `supplier_id` int NOT NULL,
  `owner_id` int NOT NULL,
  `user_id` int NOT NULL,
  `store_id` int NOT NULL,
  `add_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`product_id`),
  UNIQUE KEY `product_code` (`product_code`)
) ENGINE=InnoDB AUTO_INCREMENT=759 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `wh_product_list`
--

INSERT INTO `wh_product_list` (`product_id`, `product_code`, `product_name`, `product_image`, `product_price`, `product_wholesale_price`, `product_pricebase`, `product_price_discount`, `product_category_id`, `product_stock_num`, `product_num_all`, `product_whbig_num`, `product_price_value`, `product_score`, `product_rank`, `zone_id`, `supplier_id`, `owner_id`, `user_id`, `store_id`, `add_date`) VALUES
(1, '164966991', 'Espresso Hot', 'pic/product_image/1/1706965780bbb591e2fa10db7c97bc5a9db16e68f8.jpg', '22000.00', '0.00', '0.00', '0.00', 1, 1000, 0, 0, '0.00', '0.00', 0, 0, 0, 1, 10, 1, '2023-05-08 12:40:55'),
(2, '164966992', 'Espresso ICE', 'pic/product_image/1/1706966098bbb591e2fa10db7c97bc5a9db16e68f8.jpg', '25000.00', '0.00', '0.00', '0.00', 1, 1000, 0, 0, '0.00', '0.00', 1707202756, 0, 0, 1, 10, 1, '2024-02-03 13:14:58'),
(3, '164966993', 'Espresso Frappe', 'pic/product_image/1/1706966325bbb591e2fa10db7c97bc5a9db16e68f8.jpg', '28000.00', '0.00', '0.00', '0.00', 1, 1000, 0, 0, '0.00', '0.00', 0, 0, 0, 1, 10, 1, '2024-02-03 13:18:45'),
(4, '164966994', 'Long Espresso HOT', 'pic/product_image/1/17069664953762afbbb07f35279bcc361c1faaa73c.jpg', '22000.00', '0.00', '0.00', '0.00', 1, 1000, 0, 0, '0.00', '0.00', 0, 0, 0, 1, 10, 1, '2024-02-03 13:21:35'),
(5, '164966995', 'Long Espresso ICE', 'pic/product_image/1/17069665723762afbbb07f35279bcc361c1faaa73c.jpg', '25000.00', '0.00', '0.00', '0.00', 1, 1000, 0, 0, '0.00', '0.00', 1707202755, 0, 0, 1, 10, 1, '2024-02-03 13:22:52'),
(6, '164966996', 'Americano HOT', 'pic/product_image/1/1706966978a8ee48a22db6b4a21dc99577541a6c08.jpg', '22000.00', '0.00', '0.00', '0.00', 1, 999, 0, 0, '0.00', '0.00', 1707202755, 0, 0, 1, 10, 1, '2024-02-03 13:25:46'),
(7, '164966997', 'Americano ICE', 'pic/product_image/1/1706967013a8ee48a22db6b4a21dc99577541a6c08.jpg', '24000.00', '0.00', '0.00', '0.00', 1, 1000, 0, 0, '0.00', '0.00', 1707202755, 0, 0, 1, 10, 1, '2024-02-03 13:30:14'),
(8, '164966998', 'Americano Frappe', 'pic/product_image/1/1706967071a8ee48a22db6b4a21dc99577541a6c08.jpg', '27000.00', '0.00', '0.00', '0.00', 1, 1000, 0, 0, '0.00', '0.00', 1707202755, 0, 0, 1, 10, 1, '2024-02-03 13:31:12'),
(9, '164966999', 'Cappuccino HOT', 'pic/product_image/1/17069720773a574bf00f434981432bd43d335ab814.jpg', '25000.00', '0.00', '0.00', '0.00', 1, 1000, 0, 0, '0.00', '0.00', 1707202754, 0, 0, 1, 10, 1, '2024-02-03 13:31:12'),
(10, '164967000', 'Cappuccino ICE', 'pic/product_image/1/17069720703a574bf00f434981432bd43d335ab814.jpg', '27000.00', '0.00', '0.00', '0.00', 1, 999, 0, 0, '0.00', '0.00', 1707202754, 0, 0, 1, 10, 1, '2024-02-03 13:31:12'),
(11, '164967001', 'Cappuccino Frappe', 'pic/product_image/1/17069720613a574bf00f434981432bd43d335ab814.jpg', '30000.00', '0.00', '0.00', '0.00', 1, 1000, 0, 0, '0.00', '1.00', 1707202754, 0, 0, 1, 10, 1, '2024-02-03 13:31:12'),
(726, '164967002', 'Latte HOT', 'pic/product_image/1/1706972105018b84f5d163588cf3fae58a049feb31.jpg', '25000.00', '0.00', '0.00', '0.00', 1, 1000, 0, 0, '0.00', '0.00', 0, 0, 0, 1, 10, 1, '2024-02-03 13:59:44'),
(727, '1706968826', 'Latte ICE', 'pic/product_image/1/1706972095018b84f5d163588cf3fae58a049feb31.jpg', '27000.00', '0.00', '0.00', '0.00', 1, 1000, 0, 0, '0.00', '1.00', 1707202753, 0, 0, 1, 10, 1, '2024-02-03 14:00:26'),
(728, '164967004', 'Latte Frappe', 'pic/product_image/1/1706972087018b84f5d163588cf3fae58a049feb31.jpg', '30000.00', '0.00', '0.00', '0.00', 1, 1000, 0, 0, '0.00', '1.00', 0, 0, 0, 1, 10, 1, '2024-02-03 14:01:04'),
(729, '164967005', 'Mocha HOT', 'pic/product_image/1/1706968991790afa69ac1cff99bbfcd62384557e24.jpg', '25000.00', '0.00', '0.00', '0.00', 1, 1000, 0, 0, '0.00', '1.00', 1707202756, 0, 0, 1, 10, 1, '2024-02-03 14:03:11'),
(730, '164967007', 'Mocha Frappe', 'pic/product_image/1/1706969033790afa69ac1cff99bbfcd62384557e24.jpg', '30000.00', '0.00', '0.00', '0.00', 1, 999, 0, 0, '0.00', '0.00', 1707202752, 0, 0, 1, 10, 1, '2024-02-03 14:03:53'),
(731, '164967006', 'Mocha ICE', 'pic/product_image/1/1706969086790afa69ac1cff99bbfcd62384557e24.jpg', '27000.00', '0.00', '0.00', '0.00', 1, 1000, 0, 0, '0.00', '0.00', 1707202757, 0, 0, 1, 10, 1, '2024-02-03 14:04:46'),
(732, '164967008', 'Matcha HOT', 'pic/product_image/1/1706971976de6c7003ee2448f00625ebbc49c5aa34.jpg', '25000.00', '0.00', '0.00', '0.00', 2, 999, 0, 0, '0.00', '0.00', 1707202752, 0, 0, 1, 10, 1, '2024-02-03 14:07:13'),
(733, '164967009', 'Matcha ICE', 'pic/product_image/1/1706971966de6c7003ee2448f00625ebbc49c5aa34.jpg', '28000.00', '0.00', '0.00', '0.00', 2, 1000, 0, 0, '0.00', '0.00', 1707202757, 0, 0, 1, 10, 1, '2024-02-03 14:07:49'),
(734, '164967010', 'Matcha Frappe', 'pic/product_image/1/1706971954de6c7003ee2448f00625ebbc49c5aa34.jpg', '28000.00', '0.00', '0.00', '0.00', 2, 1000, 0, 0, '0.00', '0.00', 1707202751, 0, 0, 1, 10, 1, '2024-02-03 14:08:20'),
(735, '164967011', 'Thai Milk Tea HOT', 'pic/product_image/1/17069719072722a1ba6ee5859cb5607147ae808bf8.jpg', '24000.00', '0.00', '0.00', '0.00', 1, 1000, 0, 0, '0.00', '0.00', 0, 0, 0, 1, 10, 1, '2024-02-03 14:10:05'),
(736, '164967012', 'Thai Milk Tea ICE', 'pic/product_image/1/17069718982722a1ba6ee5859cb5607147ae808bf8.jpg', '26000.00', '0.00', '0.00', '0.00', 2, 1000, 0, 0, '0.00', '0.00', 1707202757, 0, 0, 1, 10, 1, '2024-02-03 14:10:31'),
(737, '164967013', 'Thai Milk Tea Frappe', 'pic/product_image/1/17069718902722a1ba6ee5859cb5607147ae808bf8.jpg', '28000.00', '0.00', '0.00', '0.00', 2, 1000, 0, 0, '0.00', '0.00', 0, 0, 0, 1, 10, 1, '2024-02-03 14:11:07'),
(738, '164967014', 'Lemon Tea HOT', 'pic/product_image/1/1706971819653a42f78e9e9c25e491998d260ea5f0.jpg', '24000.00', '0.00', '0.00', '0.00', 2, 1000, 0, 0, '0.00', '0.00', 0, 0, 0, 1, 10, 1, '2024-02-03 14:12:48'),
(739, '164967015', 'Lemon Tea ICE', 'pic/product_image/1/1706971828653a42f78e9e9c25e491998d260ea5f0.jpg', '26000.00', '0.00', '0.00', '0.00', 2, 1000, 0, 0, '0.00', '0.00', 1707202751, 0, 0, 1, 10, 1, '2024-02-03 14:13:18'),
(740, '164967016', 'Lemon Tea Frappe', 'pic/product_image/1/1706971810653a42f78e9e9c25e491998d260ea5f0.jpg', '28000.00', '0.00', '0.00', '0.00', 2, 1000, 0, 0, '0.00', '0.00', 0, 0, 0, 1, 10, 1, '2024-02-03 14:13:59'),
(741, '164967017', 'Chocolate HOT', 'pic/product_image/1/1706971744f2884464f9537aa9b686d6c1ce1fb552.jpg', '24000.00', '0.00', '0.00', '0.00', 2, 1000, 0, 0, '0.00', '0.00', 1707202758, 0, 0, 1, 10, 1, '2024-02-03 14:15:59'),
(742, '164967018', 'Chocolate ICE', 'pic/product_image/1/1706971738f2884464f9537aa9b686d6c1ce1fb552.jpg', '26000.00', '0.00', '0.00', '0.00', 2, 1000, 0, 0, '0.00', '0.00', 1707202750, 0, 0, 1, 10, 1, '2024-02-03 14:16:21'),
(743, '164967019', 'Chocolate Frappe', 'pic/product_image/1/1706971715f2884464f9537aa9b686d6c1ce1fb552.jpg', '28000.00', '0.00', '0.00', '0.00', 2, 1000, 0, 0, '0.00', '0.00', 1707202759, 0, 0, 1, 10, 1, '2024-02-03 14:16:39'),
(744, '164967020', 'Milk HOT', 'pic/product_image/1/1706971620c20e9bd69af0ca09e0e525ef4825f6fc.jpg', '22000.00', '0.00', '0.00', '0.00', 2, 1000, 0, 0, '0.00', '0.00', 0, 0, 0, 1, 10, 1, '2024-02-03 14:18:11'),
(745, '164967021', 'Milk ICE', 'pic/product_image/1/1706971612c20e9bd69af0ca09e0e525ef4825f6fc.jpg', '24000.00', '0.00', '0.00', '0.00', 2, 1000, 0, 0, '0.00', '0.00', 1707202749, 0, 0, 1, 10, 1, '2024-02-03 14:18:35'),
(746, '164967022', 'Milk Frappe', 'pic/product_image/1/1706971604c20e9bd69af0ca09e0e525ef4825f6fc.jpg', '26000.00', '0.00', '0.00', '0.00', 2, 1000, 0, 0, '0.00', '0.00', 0, 0, 0, 1, 10, 1, '2024-02-03 14:18:52'),
(747, '164967023', 'Blueberry_Soda', 'pic/product_image/1/17069715442aec5bc40576b8df36efda64f5f20823.jpg', '22000.00', '0.00', '0.00', '0.00', 3, 1000, 0, 0, '0.00', '0.00', 0, 0, 0, 1, 10, 1, '2024-02-03 14:25:11'),
(748, '164967024', 'Strawberry_Soda', 'pic/product_image/1/1706971506ce53d4cdb9a4a5c30553531391c14ef8.jpg', '22000.00', '0.00', '0.00', '0.00', 3, 1000, 0, 0, '0.00', '0.00', 0, 0, 0, 1, 10, 1, '2024-02-03 14:25:42'),
(749, '164967025', 'Apple_Soda', 'pic/product_image/1/17069709331d7fb49d295e21690ff19feddd9e8e89.jpg', '22000.00', '0.00', '0.00', '0.00', 3, 1000, 0, 0, '0.00', '0.00', 0, 0, 0, 1, 10, 1, '2024-02-03 14:26:08'),
(750, '164967026', 'Blue Hawaii_Soda', 'pic/product_image/1/1706971448550f2ee7b362a9bbf012686c4c92244b.jpg', '22000.00', '0.00', '0.00', '0.00', 3, 1000, 0, 0, '0.00', '0.00', 0, 0, 0, 1, 10, 1, '2024-02-03 14:26:44'),
(751, '164967027', 'Passion Fruit_Soda', 'pic/product_image/1/170697140557cdd40bcae2273f0bd6247bc722b337.jpg', '22000.00', '0.00', '0.00', '0.00', 3, 1000, 0, 0, '0.00', '0.00', 0, 0, 0, 1, 10, 1, '2024-02-03 14:27:03'),
(752, '164967028', 'Lemon_Soda', 'pic/product_image/1/1706971347368c49e80c201ed22234f38ffee09e56.jpg', '22000.00', '0.00', '0.00', '0.00', 3, 1000, 0, 0, '0.00', '0.00', 0, 0, 0, 1, 10, 1, '2024-02-03 14:27:21'),
(753, '164967029', 'Apple', 'pic/product_image/1/1706971250e1cf0990d9e9ab81e6d3bb9c02b04467.jpg', '25000.00', '0.00', '0.00', '0.00', 4, 1000, 0, 0, '0.00', '0.00', 0, 0, 0, 1, 10, 1, '2024-02-03 14:30:52'),
(754, '164967030', 'Mango', 'pic/product_image/1/1706971171f28ea4feaddcbab29cf528a9168a7fd2.jpg', '29000.00', '0.00', '0.00', '0.00', 4, 1000, 0, 0, '0.00', '0.00', 0, 0, 0, 1, 10, 1, '2024-02-03 14:31:14'),
(755, '164967031', 'Pineapple', 'pic/product_image/1/1706971127881652cfc004f1db5233ddec9d584337.jpg', '25000.00', '0.00', '0.00', '0.00', 4, 1000, 0, 0, '0.00', '0.00', 0, 0, 0, 1, 10, 1, '2024-02-03 14:31:39'),
(756, '164967032', 'Watermelon', 'pic/product_image/1/1706971090ca0ea2b3c08f225d454af58799808386.jpg', '25000.00', '0.00', '0.00', '0.00', 4, 1000, 0, 0, '0.00', '0.00', 0, 0, 0, 1, 10, 1, '2024-02-03 14:32:06'),
(757, '164967033', 'Dragon Fruit', 'pic/product_image/1/1706971047b929b6e33c3b3879cab4e6a952e74e3d.jpg', '25000.00', '0.00', '0.00', '0.00', 4, 1000, 0, 0, '0.00', '0.00', 0, 0, 0, 1, 10, 1, '2024-02-03 14:32:24'),
(758, '164967034', 'Mix Fruit', 'pic/product_image/1/1706971019b9139ab7d27ea4811bec9bcdf932ace3.jpg', '25000.00', '0.00', '0.00', '0.00', 4, 1000, 0, 0, '0.00', '1.00', 0, 0, 0, 1, 10, 1, '2024-02-03 14:32:44');

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

--
-- Table structure for table `wh_product_other`
--

DROP TABLE IF EXISTS `wh_product_other`;
CREATE TABLE IF NOT EXISTS `wh_product_other` (
  `pot_ID` int NOT NULL AUTO_INCREMENT,
  `product_ot_image` varchar(255) NOT NULL,
  `product_ot_name` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  `product_ot_price` decimal(65,0) NOT NULL,
  `show_all` int NOT NULL,
  PRIMARY KEY (`pot_ID`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `wh_product_other_list`
--

DROP TABLE IF EXISTS `wh_product_other_list`;
CREATE TABLE IF NOT EXISTS `wh_product_other_list` (
  `potl_ID` int NOT NULL AUTO_INCREMENT,
  `product_id` int NOT NULL,
  `pot_ID` int NOT NULL,
  PRIMARY KEY (`potl_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `zone`
--

DROP TABLE IF EXISTS `zone`;
CREATE TABLE IF NOT EXISTS `zone` (
  `zone_id` int NOT NULL AUTO_INCREMENT,
  `zone_name` varchar(255) NOT NULL,
  `owner_id` int NOT NULL,
  `user_id` int NOT NULL,
  `store_id` int NOT NULL,
  `create_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`zone_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
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 */;
