-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- 主機： localhost
-- 產生時間： 2023 年 07 月 08 日 13:09
-- 伺服器版本： 8.0.24
-- PHP 版本： 8.0.25

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

--
-- 資料庫： `shop_h888_fun`
--

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

--
-- 資料表結構 `ecs_account_log`
--

CREATE TABLE `ecs_account_log` (
  `log_id` mediumint UNSIGNED NOT NULL COMMENT '自增ID',
  `user_id` mediumint UNSIGNED NOT NULL COMMENT 'User ID',
  `user_money` decimal(10,0) NOT NULL COMMENT '用戶該筆記錄的餘額',
  `frozen_money` decimal(10,0) NOT NULL COMMENT '被凍結的資金',
  `rank_points` mediumint NOT NULL COMMENT '等級積分,跟消費積分是分開的',
  `pay_points` mediumint NOT NULL COMMENT '消費積分,跟等級積分是分開的',
  `change_time` int UNSIGNED NOT NULL COMMENT '該筆操作發生的時間',
  `change_desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '該筆操作的備註',
  `change_type` tinyint UNSIGNED NOT NULL COMMENT '操作類型,0為充值,1,為提現,2為管理員調節,99為其它類型'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- 資料表結構 `ecs_ad`
--

CREATE TABLE `ecs_ad` (
  `ad_id` smallint UNSIGNED NOT NULL COMMENT '自增ID',
  `position_id` smallint UNSIGNED NOT NULL DEFAULT '0' COMMENT '廣告位ID',
  `media_type` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `ad_name` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '廣告名稱',
  `ad_link` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '廣告連結',
  `ad_code` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '廣告圖檔',
  `start_time` int NOT NULL DEFAULT '0' COMMENT '開始時間',
  `end_time` int NOT NULL DEFAULT '0' COMMENT '結束時間',
  `link_man` varchar(60) NOT NULL DEFAULT '',
  `link_email` varchar(60) NOT NULL DEFAULT '',
  `link_phone` varchar(60) NOT NULL DEFAULT '',
  `click_count` mediumint UNSIGNED NOT NULL DEFAULT '0' COMMENT '點擊次數',
  `enabled` tinyint UNSIGNED NOT NULL DEFAULT '1' COMMENT '是否有效'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- 傾印資料表的資料 `ecs_ad`
--

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

--
-- 資料表結構 `ecs_admin_action`
--

CREATE TABLE `ecs_admin_action` (
  `action_id` tinyint UNSIGNED NOT NULL,
  `parent_id` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `action_code` varchar(20) NOT NULL DEFAULT '',
  `relevance` varchar(20) NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- 傾印資料表的資料 `ecs_admin_action`
--

INSERT INTO `ecs_admin_action` (`action_id`, `parent_id`, `action_code`, `relevance`) VALUES
(1, 0, 'goods', ''),
(2, 0, 'cms_manage', ''),
(3, 0, 'users_manage', ''),
(4, 0, 'priv_manage', ''),
(5, 0, 'sys_manage', ''),
(6, 0, 'order_manage', ''),
(7, 0, 'promotion', ''),
(8, 0, 'email', ''),
(9, 0, 'templates_manage', ''),
(10, 0, 'db_manage', ''),
(11, 0, 'sms_manage', ''),
(21, 1, 'goods_manage', ''),
(22, 1, 'remove_back', ''),
(23, 1, 'cat_manage', ''),
(24, 1, 'cat_drop', 'cat_manage'),
(25, 1, 'attr_manage', ''),
(26, 1, 'brand_manage', ''),
(27, 1, 'comment_priv', ''),
(30, 2, 'article_cat', ''),
(31, 2, 'article_manage', ''),
(32, 2, 'shopinfo_manage', ''),
(33, 2, 'shophelp_manage', ''),
(34, 2, 'vote_priv', ''),
(35, 7, 'topic_manage', ''),
(38, 3, 'integrate_users', ''),
(39, 3, 'sync_users', 'integrate_users'),
(40, 3, 'users_manage', ''),
(41, 3, 'users_drop', 'users_manage'),
(42, 3, 'user_rank', ''),
(43, 4, 'admin_manage', ''),
(44, 4, 'admin_drop', 'admin_manage'),
(45, 4, 'allot_priv', 'admin_manage'),
(46, 4, 'logs_manage', ''),
(47, 4, 'logs_drop', 'logs_manage'),
(48, 5, 'shop_config', ''),
(49, 5, 'ship_manage', ''),
(50, 5, 'payment', ''),
(51, 5, 'shiparea_manage', ''),
(52, 5, 'area_manage', ''),
(53, 6, 'order_os_edit', ''),
(54, 6, 'order_ps_edit', 'order_os_edit'),
(55, 6, 'order_ss_edit', 'order_os_edit'),
(56, 6, 'order_edit', 'order_os_edit'),
(57, 6, 'order_view', ''),
(58, 6, 'order_view_finished', ''),
(59, 6, 'repay_manage', ''),
(60, 6, 'booking', ''),
(61, 6, 'sale_order_stats', ''),
(62, 6, 'client_flow_stats', ''),
(70, 1, 'goods_type', ''),
(73, 3, 'feedback_priv', ''),
(74, 4, 'template_manage', ''),
(75, 5, 'friendlink', ''),
(76, 5, 'db_backup', ''),
(77, 5, 'db_renew', 'db_backup'),
(78, 7, 'snatch_manage', ''),
(79, 7, 'bonus_manage', ''),
(80, 7, 'gift_manage', ''),
(81, 7, 'card_manage', ''),
(82, 7, 'pack', ''),
(83, 7, 'ad_manage', ''),
(84, 1, 'tag_manage', ''),
(85, 3, 'surplus_manage', 'account_manage'),
(86, 4, 'agency_manage', ''),
(87, 3, 'account_manage', ''),
(88, 5, 'flash_manage', ''),
(89, 5, 'navigator', ''),
(90, 7, 'auction', ''),
(91, 7, 'group_by', ''),
(92, 7, 'favourable', ''),
(93, 7, 'whole_sale', ''),
(94, 1, 'goods_auto', ''),
(95, 2, 'article_auto', ''),
(96, 5, 'cron', ''),
(97, 5, 'affiliate', ''),
(98, 5, 'affiliate_ck', ''),
(99, 8, 'attention_list', ''),
(100, 8, 'email_list', ''),
(101, 8, 'magazine_list', ''),
(102, 8, 'view_sendlist', ''),
(103, 1, 'virualcard', ''),
(104, 7, 'package_manage', ''),
(105, 1, 'picture_batch', ''),
(106, 1, 'goods_export', ''),
(107, 1, 'goods_batch', ''),
(108, 1, 'gen_goods_script', ''),
(109, 5, 'sitemap', ''),
(110, 5, 'file_priv', ''),
(111, 5, 'file_check', ''),
(112, 9, 'template_select', ''),
(113, 9, 'template_setup', ''),
(114, 9, 'library_manage', ''),
(115, 9, 'lang_edit', ''),
(116, 9, 'backup_setting', ''),
(117, 9, 'mail_template', ''),
(118, 10, 'db_backup', ''),
(119, 10, 'db_renew', ''),
(120, 10, 'db_optimize', ''),
(121, 10, 'sql_query', ''),
(122, 10, 'convert', ''),
(124, 11, 'sms_send', ''),
(128, 7, 'exchange_goods', ''),
(129, 6, 'delivery_view', ''),
(130, 6, 'back_view', ''),
(131, 5, 'reg_fields', ''),
(132, 5, 'shop_authorized', ''),
(133, 5, 'webcollect_manage', ''),
(134, 4, 'suppliers_manage', ''),
(135, 4, 'role_manage', ''),
(136, 7, 'pre_sale', '');

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

--
-- 資料表結構 `ecs_admin_log`
--

CREATE TABLE `ecs_admin_log` (
  `log_id` int UNSIGNED NOT NULL,
  `log_time` int UNSIGNED NOT NULL DEFAULT '0',
  `user_id` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `log_info` varchar(255) NOT NULL DEFAULT '',
  `ip_address` varchar(15) NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- 傾印資料表的資料 `ecs_admin_log`
--

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

--
-- 資料表結構 `ecs_admin_message`
--

CREATE TABLE `ecs_admin_message` (
  `message_id` smallint UNSIGNED NOT NULL,
  `sender_id` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `receiver_id` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `sent_time` int UNSIGNED NOT NULL DEFAULT '0',
  `read_time` int UNSIGNED NOT NULL DEFAULT '0',
  `readed` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `deleted` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `title` varchar(150) NOT NULL DEFAULT '',
  `message` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- 資料表結構 `ecs_admin_user`
--

CREATE TABLE `ecs_admin_user` (
  `user_id` smallint UNSIGNED NOT NULL,
  `user_name` varchar(60) NOT NULL DEFAULT '',
  `email` varchar(60) NOT NULL DEFAULT '',
  `password` varchar(32) NOT NULL DEFAULT '',
  `ec_salt` varchar(10) DEFAULT NULL,
  `add_time` int NOT NULL DEFAULT '0',
  `last_login` int NOT NULL DEFAULT '0',
  `last_ip` varchar(15) NOT NULL DEFAULT '',
  `action_list` text NOT NULL,
  `nav_list` text NOT NULL,
  `lang_type` varchar(50) NOT NULL DEFAULT '',
  `agency_id` smallint UNSIGNED NOT NULL,
  `suppliers_id` smallint UNSIGNED DEFAULT '0',
  `todolist` longtext,
  `role_id` smallint DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- 傾印資料表的資料 `ecs_admin_user`
--

INSERT INTO `ecs_admin_user` (`user_id`, `user_name`, `email`, `password`, `ec_salt`, `add_time`, `last_login`, `last_ip`, `action_list`, `nav_list`, `lang_type`, `agency_id`, `suppliers_id`, `todolist`, `role_id`) VALUES
(1, 'admin', 'admin@shop.com', '915c8db09a9a7e1712486095601f9b32', '975', 1447698148, 1688699350, '220.129.44.135', 'all', '產品列表|goods.php?act=list,訂單列表|order.php?act=list,用户評論|comment_manage.php?act=list,客戶列表|users.php?act=list,商店設置|shop_config.php?act=list_edit', '', 0, 0, '', 0);

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

--
-- 資料表結構 `ecs_adsense`
--

CREATE TABLE `ecs_adsense` (
  `from_ad` smallint NOT NULL DEFAULT '0',
  `referer` varchar(255) NOT NULL DEFAULT '',
  `clicks` int UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- 傾印資料表的資料 `ecs_adsense`
--

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

--
-- 資料表結構 `ecs_ad_custom`
--

CREATE TABLE `ecs_ad_custom` (
  `ad_id` mediumint UNSIGNED NOT NULL,
  `ad_type` tinyint UNSIGNED NOT NULL DEFAULT '1',
  `ad_name` varchar(60) DEFAULT NULL,
  `add_time` int UNSIGNED NOT NULL DEFAULT '0',
  `content` mediumtext,
  `url` varchar(255) DEFAULT NULL,
  `ad_status` tinyint UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- 資料表結構 `ecs_ad_position`
--

CREATE TABLE `ecs_ad_position` (
  `position_id` tinyint UNSIGNED NOT NULL COMMENT '自增ID',
  `position_name` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '廣告位名稱',
  `ad_width` smallint UNSIGNED NOT NULL DEFAULT '0' COMMENT '寬度',
  `ad_height` smallint UNSIGNED NOT NULL DEFAULT '0' COMMENT '高度',
  `position_desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '廣告位描述'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- 傾印資料表的資料 `ecs_ad_position`
--

INSERT INTO `ecs_ad_position` (`position_id`, `position_name`, `ad_width`, `ad_height`, `position_desc`) VALUES
(1, '首頁Banner', 750, 300, '');

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

--
-- 資料表結構 `ecs_affiliate_log`
--

CREATE TABLE `ecs_affiliate_log` (
  `log_id` mediumint NOT NULL COMMENT '自增ID',
  `order_id` mediumint NOT NULL COMMENT '訂單ID',
  `time` int NOT NULL COMMENT '時間',
  `user_id` mediumint NOT NULL COMMENT '客戶ID',
  `user_name` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '客戶姓名',
  `money` decimal(10,0) NOT NULL DEFAULT '0' COMMENT '分銷金額',
  `point` int NOT NULL DEFAULT '0' COMMENT '紅利點數',
  `separate_type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '特殊說明',
  `note` text COMMENT '備註'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- 傾印資料表的資料 `ecs_affiliate_log`
--

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

--
-- 資料表結構 `ecs_agency`
--

CREATE TABLE `ecs_agency` (
  `agency_id` smallint UNSIGNED NOT NULL,
  `agency_name` varchar(255) NOT NULL,
  `agency_desc` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- 資料表結構 `ecs_area_region`
--

CREATE TABLE `ecs_area_region` (
  `shipping_area_id` smallint UNSIGNED NOT NULL DEFAULT '0',
  `region_id` smallint UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- 傾印資料表的資料 `ecs_area_region`
--



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

--
-- 資料表結構 `ecs_article`
--

CREATE TABLE `ecs_article` (
  `article_id` mediumint UNSIGNED NOT NULL COMMENT '自增ID',
  `cat_id` smallint NOT NULL DEFAULT '0' COMMENT '文章類別ID',
  `title` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '文章標題',
  `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '文章內容',
  `author` varchar(30) NOT NULL DEFAULT '',
  `author_email` varchar(60) NOT NULL DEFAULT '',
  `keywords` varchar(255) NOT NULL DEFAULT '',
  `article_type` tinyint UNSIGNED NOT NULL DEFAULT '2',
  `is_open` tinyint UNSIGNED NOT NULL DEFAULT '1',
  `add_time` int UNSIGNED NOT NULL DEFAULT '0',
  `file_url` varchar(255) NOT NULL DEFAULT '',
  `open_type` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `link` varchar(255) NOT NULL DEFAULT '',
  `description` varchar(255) DEFAULT NULL,
  `pic` varchar(255) NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- 傾印資料表的資料 `ecs_article`
--

INSERT INTO `ecs_article` (`article_id`, `cat_id`, `title`, `content`, `author`, `author_email`, `keywords`, `article_type`, `is_open`, `add_time`, `file_url`, `open_type`, `link`, `description`, `pic`) VALUES
(1, 2, '免責條款', '', '', '', '', 0, 1, 1291604914, '', 0, '', '', ''),
(2, 2, '隱私保護', '', '', '', '', 0, 1, 1291604914, '', 0, '', '', ''),
(4, 2, '聯繫我們', '', '', '', '', 0, 1, 1291604914, '', 0, '', '', ''),
(5, 2, '公司簡介', '', '', '', '', 0, 1, 1291604914, '', 0, '', '', ''),
(6, -1, '用户協議', '用户協議用户協議用户協議用户協議用户協議<br />', '', '', '', 0, 1, 1291604914, '', 0, 'http://', '', ''),
(9, 5, '售後流程', '', '', '', '', 0, 1, 1242576700, '', 0, '', '', ''),
(10, 5, '購物流程', '<p><img height=\"4587\" width=\"813\" alt=\"\" src=\"/ec273cn/utf/360buy2013/images/upload/Image/11111.jpg\" /></p>', '', '', '', 0, 1, 1242576717, '', 0, '', '', ''),
(11, 5, '訂購方式', '<p>1、增加用户體驗、提高工作效率，高效率就是高收益</p>\r\n<p>2、後台操作時經常迷失在點了哪個分類菜單，現在你不用怕了，選哪個就標註哪個，用了68shop模板你還用愁嗎？</p>\r\n<p><br />\r\n&nbsp;</p>', '', '', '', 0, 1, 1242576727, '', 0, '', '', ''),
(15, 7, '貨到付款區域', '', '', '', '', 0, 1, 1242577023, '', 0, '', '', ''),
(16, 7, '配送支付查詢 ', '', '', '', '', 0, 1, 1242577032, '', 0, '', '', ''),
(17, 7, '支付方式説明', '', '', '', '', 0, 1, 1242577041, '', 0, '', '', ''),
(20, 10, '訂購流程', '', '', '', '', 0, 1, 1242577199, '', 0, '', '', ''),
(21, 8, '退換貨原則', '', '', '', '服務', 0, 1, 1242577293, '', 0, '', '', ''),
(22, 8, '售後服務保證 ', '', '', '', '售後', 0, 1, 1242577308, '', 0, '', '', ''),
(26, 9, '投訴與建議 ', '', '', '', '', 0, 1, 1242577459, '', 0, '', '', ''),
(42, 8, '換貨流程', '', '', '', '', 0, 1, 1292315950, '', 0, '', '', ''),
(46, 10, '註冊新客戶', '<img src=\"/images/upload/image/20221213/20221213143058_25440.jpg\" alt=\"\" />', '', '', '', 0, 1, 1292316080, '', 0, 'http://', '', ''),
(68, 10, '聯繫客服', '', '', '', '', 0, 1, 1365745238, '', 0, '', '', ''),
(73, 8, '退款説明', '', '', '', '', 0, 1, 1365745287, '', 0, '', '', ''),
(145, 17, '品牌故事', '<h2>\r\n	<img src=\"/images/upload/image/20230612/20230612040138_63114.jpg\" alt=\"品牌故事\" width=\"100%\"/><br />\r\n</h2>', '', '', '', 0, 1, 1671235062, '', 0, 'http://', '', ''),
(146, 17, '經銷合約', '經銷合約', '', '', '', 0, 1, 1686639719, '', 0, 'http://', '', '');

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

--
-- 資料表結構 `ecs_article_cat`
--

CREATE TABLE `ecs_article_cat` (
  `cat_id` smallint NOT NULL COMMENT '自增ID',
  `cat_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '文章類別名稱',
  `cat_type` tinyint UNSIGNED NOT NULL DEFAULT '1' COMMENT '文章類別類型 1.一般 2.系統 3. 頁面',
  `keywords` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT 'keyword',
  `cat_desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT 'descript',
  `sort_order` tinyint UNSIGNED NOT NULL DEFAULT '50' COMMENT '排序',
  `show_in_nav` tinyint UNSIGNED NOT NULL DEFAULT '0' COMMENT '是否導航顯示',
  `parent_id` smallint UNSIGNED NOT NULL DEFAULT '0' COMMENT '上層ID'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- 傾印資料表的資料 `ecs_article_cat`
--

INSERT INTO `ecs_article_cat` (`cat_id`, `cat_name`, `cat_type`, `keywords`, `cat_desc`, `sort_order`, `show_in_nav`, `parent_id`) VALUES
(1, '系統分類', 2, '', '系統保留分類', 50, 0, 0),
(2, '網店信息', 2, '', '網店信息分類', 50, 0, 1),
(3, '網店幫助分類', 2, '', '網店幫助分類', 50, 0, 1),
(5, '新手上路 ', 2, '', '', 50, 0, 3),
(7, '配送方式 ', 2, '', '配送與支付 ', 50, 1, 3),
(8, '售後服務', 2, '', '', 50, 0, 3),
(9, '關於我們 ', 2, '', '聯繫我們 ', 50, 0, 3),
(10, '購物指南', 2, '', '', 50, 0, 3),
(16, '網站資訊', 1, '網站資訊', '', 1, 0, 0),
(17, '頁面', 3, '', '', 50, 0, 0);

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

--
-- 資料表結構 `ecs_attribute`
--

CREATE TABLE `ecs_attribute` (
  `attr_id` smallint UNSIGNED NOT NULL,
  `cat_id` smallint UNSIGNED NOT NULL DEFAULT '0',
  `attr_name` varchar(60) NOT NULL DEFAULT '',
  `attr_input_type` tinyint UNSIGNED NOT NULL DEFAULT '1',
  `attr_type` tinyint UNSIGNED NOT NULL DEFAULT '1',
  `attr_values` text NOT NULL,
  `attr_index` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `sort_order` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `is_linked` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `attr_group` tinyint UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- 傾印資料表的資料 `ecs_attribute`
--

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

--
-- 資料表結構 `ecs_auction_log`
--

CREATE TABLE `ecs_auction_log` (
  `log_id` mediumint UNSIGNED NOT NULL,
  `act_id` mediumint UNSIGNED NOT NULL,
  `bid_user` mediumint UNSIGNED NOT NULL,
  `bid_price` decimal(10,2) UNSIGNED NOT NULL,
  `bid_time` int UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- 資料表結構 `ecs_auto_manage`
--

CREATE TABLE `ecs_auto_manage` (
  `item_id` mediumint NOT NULL,
  `type` varchar(10) NOT NULL,
  `starttime` int NOT NULL,
  `endtime` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- 傾印資料表的資料 `ecs_auto_manage`
--


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

--
-- 資料表結構 `ecs_back_action`
--

CREATE TABLE `ecs_back_action` (
  `action_id` mediumint UNSIGNED NOT NULL,
  `back_id` mediumint UNSIGNED NOT NULL DEFAULT '0',
  `action_user` varchar(30) NOT NULL DEFAULT '',
  `status_back` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `status_refund` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `action_note` varchar(255) NOT NULL DEFAULT '',
  `log_time` int UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- 傾印資料表的資料 `ecs_back_action`
--

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

--
-- 資料表結構 `ecs_back_goods`
--

CREATE TABLE `ecs_back_goods` (
  `rec_id` mediumint UNSIGNED NOT NULL,
  `back_id` mediumint UNSIGNED DEFAULT '0',
  `goods_id` mediumint UNSIGNED NOT NULL DEFAULT '0',
  `product_id` mediumint UNSIGNED NOT NULL DEFAULT '0',
  `product_sn` varchar(60) DEFAULT NULL,
  `goods_name` varchar(120) DEFAULT NULL,
  `brand_name` varchar(60) DEFAULT NULL,
  `goods_sn` varchar(60) DEFAULT NULL,
  `is_real` tinyint UNSIGNED DEFAULT '0',
  `send_number` smallint UNSIGNED DEFAULT '0',
  `goods_attr` text,
  `back_type` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `parent_id` int UNSIGNED NOT NULL,
  `back_goods_price` decimal(10,2) UNSIGNED NOT NULL DEFAULT '0.00',
  `back_goods_number` smallint UNSIGNED NOT NULL,
  `status_back` tinyint(1) NOT NULL DEFAULT '0',
  `status_refund` tinyint(1) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- 資料表結構 `ecs_back_order`
--

CREATE TABLE `ecs_back_order` (
  `back_id` mediumint UNSIGNED NOT NULL,
  `delivery_sn` varchar(20) NOT NULL,
  `order_sn` varchar(20) NOT NULL,
  `order_id` mediumint UNSIGNED NOT NULL DEFAULT '0',
  `invoice_no` varchar(50) DEFAULT NULL,
  `add_time` int UNSIGNED DEFAULT '0',
  `shipping_id` tinyint UNSIGNED DEFAULT '0',
  `shipping_name` varchar(120) DEFAULT NULL,
  `user_id` mediumint UNSIGNED DEFAULT '0',
  `action_user` varchar(30) DEFAULT NULL,
  `consignee` varchar(60) DEFAULT NULL,
  `address` varchar(250) DEFAULT NULL,
  `country` smallint UNSIGNED DEFAULT '0',
  `province` smallint UNSIGNED DEFAULT '0',
  `city` smallint UNSIGNED DEFAULT '0',
  `district` smallint UNSIGNED DEFAULT '0',
  `sign_building` varchar(120) DEFAULT NULL,
  `email` varchar(60) DEFAULT NULL,
  `zipcode` varchar(60) DEFAULT NULL,
  `tel` varchar(60) DEFAULT NULL,
  `mobile` varchar(60) DEFAULT NULL,
  `best_time` varchar(120) DEFAULT NULL,
  `postscript` varchar(255) DEFAULT NULL,
  `how_oos` varchar(120) DEFAULT NULL,
  `insure_fee` decimal(10,2) UNSIGNED DEFAULT '0.00',
  `shipping_fee` decimal(10,2) UNSIGNED DEFAULT '0.00',
  `update_time` int UNSIGNED DEFAULT '0',
  `suppliers_id` smallint DEFAULT '0',
  `status` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `return_time` int UNSIGNED DEFAULT '0',
  `agency_id` smallint UNSIGNED DEFAULT '0',
  `refund_type` tinyint(1) NOT NULL DEFAULT '0',
  `refund_desc` varchar(255) NOT NULL,
  `refund_money_1` decimal(10,2) NOT NULL DEFAULT '0.00',
  `refund_money_2` decimal(10,2) NOT NULL DEFAULT '0.00',
  `back_reason` varchar(255) NOT NULL DEFAULT '',
  `goods_id` int UNSIGNED NOT NULL,
  `goods_name` varchar(255) NOT NULL DEFAULT '',
  `status_back` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0:審核通過,1:收到寄回產品,2:換回產品已寄出,3:完成退貨/返修,4:退款(無需退貨),5:審核中,6:申請被拒絕,7:管理員取消,8:用户自己取消',
  `status_refund` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0:未退款,1:已退款',
  `imgs` text NOT NULL,
  `back_pay` tinyint(1) NOT NULL DEFAULT '0',
  `back_type` varchar(1) NOT NULL DEFAULT '0',
  `supplier_id` int UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- 資料表結構 `ecs_back_replay`
--

CREATE TABLE `ecs_back_replay` (
  `id` mediumint NOT NULL,
  `back_id` mediumint NOT NULL DEFAULT '0',
  `message` text NOT NULL,
  `add_time` int NOT NULL DEFAULT '0',
  `type` tinyint(1) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- 傾印資料表的資料 `ecs_back_replay`
--


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

--
-- 資料表結構 `ecs_bonus`
--

CREATE TABLE `ecs_bonus` (
  `bonus_id` int NOT NULL COMMENT '自增ID',
  `bonus_type_id` int NOT NULL DEFAULT '0' COMMENT '優惠劵類型',
  `bonus_sn` varchar(50) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '優惠劵數量',
  `bonus_number` int NOT NULL DEFAULT '1' COMMENT '優惠劵數量',
  `remain_number` int NOT NULL DEFAULT '0' COMMENT '剩餘數量',
  `create_time` int NOT NULL DEFAULT '0' COMMENT '建立時間'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- 傾印資料表的資料 `ecs_bonus`
--


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

--
-- 資料表結構 `ecs_bonus_type`
--

CREATE TABLE `ecs_bonus_type` (
  `type_id` smallint UNSIGNED NOT NULL COMMENT '自增ID',
  `type_name` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '優惠劵名稱',
  `type_money` varchar(20) NOT NULL DEFAULT '0' COMMENT '優惠劵價格',
  `send_type` tinyint UNSIGNED NOT NULL DEFAULT '0' COMMENT '優惠劵類型',
  `min_amount` decimal(10,0) UNSIGNED NOT NULL DEFAULT '0',
  `max_amount` decimal(10,0) UNSIGNED NOT NULL DEFAULT '0',
  `send_start_date` int NOT NULL DEFAULT '0',
  `send_end_date` int NOT NULL DEFAULT '0',
  `use_start_date` int NOT NULL DEFAULT '0',
  `use_end_date` int NOT NULL DEFAULT '0',
  `min_goods_amount` decimal(10,0) UNSIGNED NOT NULL DEFAULT '0',
  `user_bonus_max` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- 傾印資料表的資料 `ecs_bonus_type`
--

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

--
-- 資料表結構 `ecs_booking_goods`
--

CREATE TABLE `ecs_booking_goods` (
  `rec_id` mediumint UNSIGNED NOT NULL,
  `user_id` mediumint UNSIGNED NOT NULL DEFAULT '0',
  `email` varchar(60) NOT NULL DEFAULT '',
  `link_man` varchar(60) NOT NULL DEFAULT '',
  `tel` varchar(60) NOT NULL DEFAULT '',
  `goods_id` mediumint UNSIGNED NOT NULL DEFAULT '0',
  `goods_desc` varchar(255) NOT NULL DEFAULT '',
  `goods_number` smallint UNSIGNED NOT NULL DEFAULT '0',
  `booking_time` int UNSIGNED NOT NULL DEFAULT '0',
  `is_dispose` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `dispose_user` varchar(30) NOT NULL DEFAULT '',
  `dispose_time` int UNSIGNED NOT NULL DEFAULT '0',
  `dispose_note` varchar(255) NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- 資料表結構 `ecs_brand`
--

CREATE TABLE `ecs_brand` (
  `brand_id` smallint UNSIGNED NOT NULL,
  `brand_name` varchar(60) NOT NULL DEFAULT '',
  `brand_logo` varchar(80) NOT NULL DEFAULT '',
  `brand_desc` text NOT NULL,
  `site_url` varchar(255) NOT NULL DEFAULT '',
  `sort_order` tinyint UNSIGNED NOT NULL DEFAULT '50',
  `is_show` tinyint UNSIGNED NOT NULL DEFAULT '1',
  `brand_banner` varchar(80) NOT NULL COMMENT '產品品牌banner'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- 傾印資料表的資料 `ecs_brand`
--

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

--
-- 資料表結構 `ecs_card`
--

CREATE TABLE `ecs_card` (
  `card_id` tinyint UNSIGNED NOT NULL,
  `card_name` varchar(120) NOT NULL DEFAULT '',
  `card_img` varchar(255) NOT NULL DEFAULT '',
  `card_fee` decimal(6,2) UNSIGNED NOT NULL DEFAULT '0.00',
  `free_money` decimal(6,2) UNSIGNED NOT NULL DEFAULT '0.00',
  `card_desc` varchar(255) NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- 資料表結構 `ecs_cart`
--

CREATE TABLE `ecs_cart` (
  `rec_id` mediumint UNSIGNED NOT NULL COMMENT '自增ID',
  `user_id` mediumint UNSIGNED NOT NULL DEFAULT '0' COMMENT '用戶ID',
  `session_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT 'session ID',
  `goods_id` mediumint UNSIGNED NOT NULL DEFAULT '0' COMMENT '產品ID',
  `goods_sn` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '產品編號',
  `product_id` mediumint UNSIGNED NOT NULL DEFAULT '0',
  `group_id` varchar(255) NOT NULL,
  `goods_name` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '產品名稱',
  `market_price` decimal(10,0) UNSIGNED NOT NULL DEFAULT '0' COMMENT '市場價格',
  `goods_price` decimal(10,0) NOT NULL DEFAULT '0' COMMENT '產品價格',
  `goods_number` smallint UNSIGNED NOT NULL DEFAULT '0' COMMENT '產品數量',
  `goods_attr` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '產品屬性',
  `is_real` tinyint UNSIGNED NOT NULL DEFAULT '0' COMMENT '是否為實體產品',
  `extension_code` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '擴展屬性',
  `parent_id` mediumint UNSIGNED NOT NULL DEFAULT '0' COMMENT '父產品，如不為0，則為配件',
  `rec_type` tinyint UNSIGNED NOT NULL DEFAULT '0' COMMENT '購物車產品類型;0普通;1團夠;2拍賣;3奪寶奇兵',
  `is_gift` smallint UNSIGNED NOT NULL DEFAULT '0' COMMENT '是否贈品,0否;其他, 是參加優惠活動的id,取值於favourable_activity的act_id',
  `is_shipping` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `can_handsel` tinyint UNSIGNED NOT NULL DEFAULT '0' COMMENT '能否處理',
  `goods_attr_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '該產品的屬性的id,取自goods_attr的goods_attr_id,如果有多個,只記錄了最後一個,可能是bug',
  `fencheng` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '分成',
  `add_info` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci COMMENT '額外資訊',
  `buymax` int NOT NULL DEFAULT '0' COMMENT '最大購買數量，0為不限制'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- 傾印資料表的資料 `ecs_cart`
--

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

--
-- 資料表結構 `ecs_cart_combo`
--

CREATE TABLE `ecs_cart_combo` (
  `rec_id` mediumint UNSIGNED NOT NULL,
  `user_id` mediumint UNSIGNED NOT NULL DEFAULT '0',
  `session_id` char(32) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
  `goods_id` mediumint UNSIGNED NOT NULL DEFAULT '0',
  `goods_sn` varchar(60) NOT NULL DEFAULT '',
  `product_id` mediumint UNSIGNED NOT NULL DEFAULT '0',
  `group_id` varchar(255) NOT NULL,
  `goods_name` varchar(120) NOT NULL DEFAULT '',
  `market_price` decimal(10,2) UNSIGNED NOT NULL DEFAULT '0.00',
  `goods_price` decimal(10,2) NOT NULL DEFAULT '0.00',
  `goods_number` smallint UNSIGNED NOT NULL DEFAULT '0',
  `goods_attr` text NOT NULL,
  `is_real` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `extension_code` varchar(30) NOT NULL DEFAULT '',
  `parent_id` mediumint UNSIGNED NOT NULL DEFAULT '0',
  `rec_type` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `is_gift` smallint UNSIGNED NOT NULL DEFAULT '0',
  `is_shipping` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `can_handsel` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `goods_attr_id` varchar(255) NOT NULL DEFAULT '',
  `fencheng` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- 資料表結構 `ecs_category`
--

CREATE TABLE `ecs_category` (
  `cat_id` smallint UNSIGNED NOT NULL COMMENT '自增ID',
  `cat_name` varchar(90) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '類別名稱',
  `keywords` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '關鍵字',
  `cat_desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '描述',
  `parent_id` smallint UNSIGNED NOT NULL DEFAULT '0' COMMENT '父類別ID',
  `sort_order` tinyint UNSIGNED NOT NULL DEFAULT '50' COMMENT '排序編號',
  `template_file` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '樣式表文件',
  `measure_unit` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '數量單位',
  `show_in_nav` tinyint(1) NOT NULL DEFAULT '0' COMMENT '導航欄顯示',
  `style` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '樣式表文件',
  `is_show` tinyint UNSIGNED NOT NULL DEFAULT '1' COMMENT '是否顯示',
  `grade` tinyint NOT NULL DEFAULT '0' COMMENT '價格區間個數',
  `filter_attr` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '0' COMMENT '篩選屬性',
  `is_top_style` int UNSIGNED NOT NULL DEFAULT '0',
  `is_top_show` int UNSIGNED NOT NULL DEFAULT '0',
  `cat_ico` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '分類小圖標'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- 傾印資料表的資料 `ecs_category`
--

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

--
-- 資料表結構 `ecs_cat_recommend`
--

CREATE TABLE `ecs_cat_recommend` (
  `cat_id` smallint NOT NULL,
  `recommend_type` tinyint(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- 傾印資料表的資料 `ecs_cat_recommend`
--

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

--
-- 資料表結構 `ecs_collect_goods`
--

CREATE TABLE `ecs_collect_goods` (
  `rec_id` mediumint UNSIGNED NOT NULL COMMENT '自增ID',
  `user_id` mediumint UNSIGNED NOT NULL DEFAULT '0' COMMENT '客戶id',
  `goods_id` mediumint UNSIGNED NOT NULL DEFAULT '0' COMMENT '產品id',
  `add_time` int UNSIGNED NOT NULL DEFAULT '0' COMMENT '增加時間',
  `is_attention` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否關注該收藏產品;1是;0否'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- 傾印資料表的資料 `ecs_collect_goods`
--


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

--
-- 資料表結構 `ecs_comment`
--

CREATE TABLE `ecs_comment` (
  `comment_id` int UNSIGNED NOT NULL,
  `comment_type` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `id_value` mediumint UNSIGNED NOT NULL DEFAULT '0',
  `email` varchar(60) NOT NULL DEFAULT '',
  `user_name` varchar(60) NOT NULL DEFAULT '',
  `content` text NOT NULL,
  `comment_rank` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `add_time` int UNSIGNED NOT NULL DEFAULT '0',
  `ip_address` varchar(15) NOT NULL DEFAULT '',
  `status` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `parent_id` int UNSIGNED NOT NULL DEFAULT '0',
  `user_id` int UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- 資料表結構 `ecs_crons`
--

CREATE TABLE `ecs_crons` (
  `cron_id` tinyint UNSIGNED NOT NULL,
  `cron_code` varchar(20) NOT NULL,
  `cron_name` varchar(120) NOT NULL,
  `cron_desc` text,
  `cron_order` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `cron_config` text NOT NULL,
  `thistime` int NOT NULL DEFAULT '0',
  `nextime` int NOT NULL,
  `day` tinyint NOT NULL,
  `week` varchar(1) NOT NULL,
  `hour` varchar(2) NOT NULL,
  `minute` varchar(255) NOT NULL,
  `enable` tinyint(1) NOT NULL DEFAULT '1',
  `run_once` tinyint(1) NOT NULL DEFAULT '0',
  `allow_ip` varchar(100) NOT NULL DEFAULT '',
  `alow_files` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- 資料表結構 `ecs_delivery_goods`
--

CREATE TABLE `ecs_delivery_goods` (
  `rec_id` mediumint UNSIGNED NOT NULL,
  `delivery_id` mediumint UNSIGNED NOT NULL DEFAULT '0',
  `goods_id` mediumint UNSIGNED NOT NULL DEFAULT '0',
  `product_id` mediumint UNSIGNED DEFAULT '0',
  `product_sn` varchar(60) DEFAULT NULL,
  `goods_name` varchar(120) DEFAULT NULL,
  `brand_name` varchar(60) DEFAULT NULL,
  `goods_sn` varchar(60) DEFAULT NULL,
  `is_real` tinyint UNSIGNED DEFAULT '0',
  `extension_code` varchar(30) DEFAULT NULL,
  `parent_id` mediumint UNSIGNED DEFAULT '0',
  `send_number` smallint UNSIGNED DEFAULT '0',
  `goods_attr` text
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- 資料表結構 `ecs_delivery_order`
--

CREATE TABLE `ecs_delivery_order` (
  `delivery_id` mediumint UNSIGNED NOT NULL,
  `delivery_sn` varchar(20) NOT NULL,
  `order_sn` varchar(20) NOT NULL,
  `order_id` mediumint UNSIGNED NOT NULL DEFAULT '0',
  `invoice_no` varchar(50) DEFAULT NULL,
  `add_time` int UNSIGNED DEFAULT '0',
  `shipping_id` tinyint UNSIGNED DEFAULT '0',
  `shipping_name` varchar(120) DEFAULT NULL,
  `user_id` mediumint UNSIGNED DEFAULT '0',
  `action_user` varchar(30) DEFAULT NULL,
  `consignee` varchar(60) DEFAULT NULL,
  `address` varchar(250) DEFAULT NULL,
  `country` smallint UNSIGNED DEFAULT '0',
  `province` smallint UNSIGNED DEFAULT '0',
  `city` smallint UNSIGNED DEFAULT '0',
  `district` smallint UNSIGNED DEFAULT '0',
  `sign_building` varchar(120) DEFAULT NULL,
  `email` varchar(60) DEFAULT NULL,
  `zipcode` varchar(60) DEFAULT NULL,
  `tel` varchar(60) DEFAULT NULL,
  `mobile` varchar(60) DEFAULT NULL,
  `best_time` varchar(120) DEFAULT NULL,
  `postscript` varchar(255) DEFAULT NULL,
  `how_oos` varchar(120) DEFAULT NULL,
  `insure_fee` decimal(10,2) UNSIGNED DEFAULT '0.00',
  `shipping_fee` decimal(10,2) UNSIGNED DEFAULT '0.00',
  `update_time` int UNSIGNED DEFAULT '0',
  `suppliers_id` smallint DEFAULT '0',
  `status` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `agency_id` smallint UNSIGNED DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- 資料表結構 `ecs_email_list`
--

CREATE TABLE `ecs_email_list` (
  `id` mediumint NOT NULL,
  `email` varchar(60) NOT NULL,
  `stat` tinyint(1) NOT NULL DEFAULT '0',
  `hash` varchar(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- 資料表結構 `ecs_email_sendlist`
--

CREATE TABLE `ecs_email_sendlist` (
  `id` mediumint NOT NULL,
  `email` varchar(100) NOT NULL,
  `template_id` mediumint NOT NULL,
  `email_content` text NOT NULL,
  `error` tinyint(1) NOT NULL DEFAULT '0',
  `pri` tinyint NOT NULL,
  `last_send` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- 資料表結構 `ecs_error_log`
--

CREATE TABLE `ecs_error_log` (
  `id` int NOT NULL,
  `info` varchar(255) NOT NULL,
  `file` varchar(100) NOT NULL,
  `time` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- 資料表結構 `ecs_exchange_goods`
--

CREATE TABLE `ecs_exchange_goods` (
  `goods_id` mediumint UNSIGNED NOT NULL DEFAULT '0',
  `exchange_integral` int UNSIGNED NOT NULL DEFAULT '0',
  `is_exchange` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `is_hot` tinyint UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- 資料表結構 `ecs_favourable_activity`
--

CREATE TABLE `ecs_favourable_activity` (
  `act_id` smallint UNSIGNED NOT NULL,
  `act_name` varchar(255) NOT NULL,
  `start_time` int UNSIGNED NOT NULL,
  `end_time` int UNSIGNED NOT NULL,
  `user_rank` varchar(255) NOT NULL,
  `act_range` tinyint UNSIGNED NOT NULL,
  `act_range_ext` varchar(255) NOT NULL,
  `min_amount` decimal(10,2) UNSIGNED NOT NULL,
  `max_amount` decimal(10,2) UNSIGNED NOT NULL,
  `act_type` tinyint UNSIGNED NOT NULL,
  `act_type_ext` decimal(10,2) UNSIGNED NOT NULL,
  `gift` text NOT NULL,
  `sort_order` tinyint UNSIGNED NOT NULL DEFAULT '50',
  `logo` varchar(255) NOT NULL COMMENT '活動代表圖'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- 資料表結構 `ecs_feedback`
--

CREATE TABLE `ecs_feedback` (
  `msg_id` mediumint UNSIGNED NOT NULL,
  `parent_id` mediumint UNSIGNED NOT NULL DEFAULT '0',
  `user_id` mediumint UNSIGNED NOT NULL DEFAULT '0',
  `user_name` varchar(60) NOT NULL DEFAULT '',
  `user_email` varchar(60) NOT NULL DEFAULT '',
  `msg_title` varchar(200) NOT NULL DEFAULT '',
  `msg_type` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `msg_status` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `msg_content` text NOT NULL,
  `msg_time` int UNSIGNED NOT NULL DEFAULT '0',
  `message_img` varchar(255) NOT NULL DEFAULT '0',
  `order_id` int UNSIGNED NOT NULL DEFAULT '0',
  `msg_area` tinyint UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- 資料表結構 `ecs_friend_link`
--

CREATE TABLE `ecs_friend_link` (
  `link_id` smallint UNSIGNED NOT NULL,
  `link_name` varchar(255) NOT NULL DEFAULT '',
  `link_url` varchar(255) NOT NULL DEFAULT '',
  `link_logo` varchar(255) NOT NULL DEFAULT '',
  `show_order` tinyint UNSIGNED NOT NULL DEFAULT '50'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- 資料表結構 `ecs_goods`
--

CREATE TABLE `ecs_goods` (
  `goods_id` mediumint UNSIGNED NOT NULL COMMENT '自增ID',
  `cat_id` smallint UNSIGNED NOT NULL DEFAULT '0' COMMENT '類別ID',
  `goods_sn` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '產品貨號',
  `goods_name` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '產品名稱',
  `goods_name_style` varchar(60) NOT NULL DEFAULT '+',
  `click_count` int UNSIGNED NOT NULL DEFAULT '0' COMMENT '觀看數量',
  `brand_id` smallint UNSIGNED NOT NULL DEFAULT '0' COMMENT '品牌ID',
  `provider_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '廠商名稱',
  `goods_number` smallint UNSIGNED NOT NULL DEFAULT '0',
  `goods_weight` decimal(10,3) UNSIGNED NOT NULL DEFAULT '0.000',
  `market_price` decimal(10,0) UNSIGNED NOT NULL DEFAULT '0' COMMENT '市場價格',
  `shop_price` decimal(10,0) UNSIGNED NOT NULL DEFAULT '0' COMMENT '商店價格',
  `promote_price` decimal(10,2) UNSIGNED NOT NULL DEFAULT '0.00' COMMENT '促銷價格',
  `promote_start_date` int UNSIGNED NOT NULL DEFAULT '0' COMMENT '促銷開始日',
  `promote_end_date` int UNSIGNED NOT NULL DEFAULT '0' COMMENT '促銷結束日',
  `sale_price` decimal(10,0) UNSIGNED NOT NULL DEFAULT '0' COMMENT '秒殺價格',
  `sale_start_date` int UNSIGNED NOT NULL DEFAULT '0',
  `sale_end_date` int UNSIGNED NOT NULL DEFAULT '0',
  `warn_number` tinyint UNSIGNED NOT NULL DEFAULT '1',
  `keywords` varchar(255) NOT NULL DEFAULT '',
  `goods_brief` varchar(255) NOT NULL DEFAULT '',
  `goods_desc` text NOT NULL,
  `goods_thumb` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '產品縮圖',
  `goods_img` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '產品圖片',
  `original_img` varchar(255) NOT NULL DEFAULT '',
  `is_real` tinyint UNSIGNED NOT NULL DEFAULT '1' COMMENT '實體產品',
  `extension_code` varchar(30) NOT NULL DEFAULT '',
  `is_on_sale` tinyint UNSIGNED NOT NULL DEFAULT '1',
  `is_alone_sale` tinyint UNSIGNED NOT NULL DEFAULT '1',
  `is_shipping` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `integral` int UNSIGNED NOT NULL DEFAULT '0',
  `add_time` int UNSIGNED NOT NULL DEFAULT '0',
  `sort_order` smallint UNSIGNED NOT NULL DEFAULT '100',
  `is_delete` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `is_best` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `is_new` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `is_hot` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `is_promote` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `is_sale` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `bonus_type_id` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `last_update` int UNSIGNED NOT NULL DEFAULT '0',
  `goods_type` smallint UNSIGNED NOT NULL DEFAULT '0',
  `seller_note` varchar(255) NOT NULL DEFAULT '',
  `give_integral` int NOT NULL DEFAULT '-1',
  `rank_integral` int NOT NULL DEFAULT '-1',
  `suppliers_id` smallint UNSIGNED DEFAULT NULL,
  `is_check` tinyint UNSIGNED DEFAULT NULL,
  `sales_volume` int UNSIGNED NOT NULL DEFAULT '0',
  `comments_number` int UNSIGNED NOT NULL DEFAULT '0',
  `bb_chicun` char(28) NOT NULL,
  `mobile_desc` text,
  `fencheng` varchar(255) DEFAULT NULL,
  `sales_count` int UNSIGNED NOT NULL DEFAULT '0',
  `goods_shipai` text NOT NULL,
  `sales_volume_base` int UNSIGNED NOT NULL DEFAULT '0' COMMENT '銷量基數',
  `buymax` int UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- 傾印資料表的資料 `ecs_goods`
--


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

--
-- 資料表結構 `ecs_goods_activity`
--

CREATE TABLE `ecs_goods_activity` (
  `act_id` mediumint UNSIGNED NOT NULL,
  `act_name` varchar(255) NOT NULL,
  `act_desc` text NOT NULL,
  `act_type` tinyint UNSIGNED NOT NULL,
  `goods_id` mediumint UNSIGNED NOT NULL,
  `product_id` mediumint UNSIGNED NOT NULL DEFAULT '0',
  `goods_name` varchar(255) NOT NULL,
  `start_time` int UNSIGNED NOT NULL,
  `end_time` int UNSIGNED NOT NULL,
  `is_finished` tinyint UNSIGNED NOT NULL,
  `ext_info` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- 資料表結構 `ecs_goods_article`
--

CREATE TABLE `ecs_goods_article` (
  `goods_id` mediumint UNSIGNED NOT NULL DEFAULT '0',
  `article_id` mediumint UNSIGNED NOT NULL DEFAULT '0',
  `admin_id` tinyint UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- 資料表結構 `ecs_goods_attr`
--

CREATE TABLE `ecs_goods_attr` (
  `goods_attr_id` int UNSIGNED NOT NULL COMMENT '自增ID',
  `goods_id` mediumint UNSIGNED NOT NULL DEFAULT '0',
  `attr_id` smallint UNSIGNED NOT NULL DEFAULT '0',
  `attr_value` text NOT NULL,
  `attr_price` varchar(255) NOT NULL DEFAULT '',
  `attr_sort_order` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `thumb_url` varchar(255) NOT NULL DEFAULT '',
  `img_url` varchar(255) NOT NULL DEFAULT '',
  `img_original` varchar(255) NOT NULL DEFAULT '',
  `hex_color` varchar(255) NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- 傾印資料表的資料 `ecs_goods_attr`
--

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

--
-- 資料表結構 `ecs_goods_cat`
--

CREATE TABLE `ecs_goods_cat` (
  `goods_id` mediumint UNSIGNED NOT NULL DEFAULT '0',
  `cat_id` smallint UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- 資料表結構 `ecs_goods_gallery`
--

CREATE TABLE `ecs_goods_gallery` (
  `img_id` mediumint UNSIGNED NOT NULL,
  `goods_id` mediumint UNSIGNED NOT NULL DEFAULT '0',
  `img_url` varchar(255) NOT NULL DEFAULT '',
  `img_desc` varchar(255) NOT NULL DEFAULT '',
  `thumb_url` varchar(255) NOT NULL DEFAULT '',
  `img_original` varchar(255) NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- 傾印資料表的資料 `ecs_goods_gallery`
--

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

--
-- 資料表結構 `ecs_goods_type`
--

CREATE TABLE `ecs_goods_type` (
  `cat_id` smallint UNSIGNED NOT NULL,
  `cat_name` varchar(60) NOT NULL DEFAULT '',
  `enabled` tinyint UNSIGNED NOT NULL DEFAULT '1',
  `attr_group` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- 傾印資料表的資料 `ecs_goods_type`
--

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

--
-- 資料表結構 `ecs_group_goods`
--

CREATE TABLE `ecs_group_goods` (
  `parent_id` mediumint UNSIGNED NOT NULL DEFAULT '0',
  `goods_id` mediumint UNSIGNED NOT NULL DEFAULT '0',
  `goods_price` decimal(10,2) UNSIGNED NOT NULL DEFAULT '0.00',
  `admin_id` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `group_id` mediumint UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- 資料表結構 `ecs_ip_log`
--

CREATE TABLE `ecs_ip_log` (
  `id` int NOT NULL,
  `ip` varchar(20) DEFAULT NULL,
  `u_id` int DEFAULT NULL,
  `state` int DEFAULT '0',
  `phone_state` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- 資料表結構 `ecs_keywords`
--

CREATE TABLE `ecs_keywords` (
  `date` date NOT NULL DEFAULT '0000-00-00',
  `searchengine` varchar(20) NOT NULL DEFAULT '',
  `keyword` varchar(90) NOT NULL DEFAULT '',
  `count` mediumint UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- 傾印資料表的資料 `ecs_keywords`
--

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

--
-- 資料表結構 `ecs_link_goods`
--

CREATE TABLE `ecs_link_goods` (
  `goods_id` mediumint UNSIGNED NOT NULL DEFAULT '0',
  `link_goods_id` mediumint UNSIGNED NOT NULL DEFAULT '0',
  `is_double` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `admin_id` tinyint UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- 傾印資料表的資料 `ecs_link_goods`
--

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

--
-- 資料表結構 `ecs_mail_templates`
--

CREATE TABLE `ecs_mail_templates` (
  `template_id` tinyint UNSIGNED NOT NULL,
  `template_code` varchar(30) NOT NULL DEFAULT '',
  `is_html` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `template_subject` varchar(200) NOT NULL DEFAULT '',
  `template_content` text NOT NULL,
  `last_modify` int UNSIGNED NOT NULL DEFAULT '0',
  `last_send` int UNSIGNED NOT NULL DEFAULT '0',
  `type` varchar(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- 傾印資料表的資料 `ecs_mail_templates`
--

INSERT INTO `ecs_mail_templates` (`template_id`, `template_code`, `is_html`, `template_subject`, `template_content`, `last_modify`, `last_send`, `type`) VALUES
(1, 'send_password', 1, '密碼找回', '{$user_name}您好！<br>\n<br>\n您已經進行了密碼重置的操作，請點擊以下鏈接(或者複製到您的瀏覽器):<br>\n<br>\n<a href=\"{$reset_email}\" target=\"_blank\">{$reset_email}</a><br>\n<br>\n以確認您的新密碼重置操作！<br>\n<br>\n{$shop_name}<br>\n{$send_date}', 1194824789, 0, 'template'),
(2, 'order_confirm', 0, '訂單確認通知', '親愛的{$order.consignee}，你好！ \n\n我們已經收到您於 {$order.formated_add_time} 提交的訂單，該訂單編號為：{$order.order_sn} 請記住這個編號以便日後的查詢。\n\n{$shop_name}\n{$sent_date}\n\n\n', 1158226370, 0, 'template'),
(3, 'deliver_notice', 1, '發貨通知', '親愛的{$order.consignee}。你好！</br></br>\n\n您的訂單{$order.order_sn}已於{$send_time}按照您預定的配送方式給您發貨了。</br>\n</br>\n{if $order.invoice_no}發貨單號是{$order.invoice_no}。</br>{/if}\n</br>\n在您收到貨物之後請點擊下面的鏈接確認您已經收到貨物：</br>\n<a href=\"{$confirm_url}\" target=\"_blank\">{$confirm_url}</a></br></br>\n如果您還沒有收到貨物可以點擊以下鏈接給我們留言：</br></br>\n<a href=\"{$send_msg_url}\" target=\"_blank\">{$send_msg_url}</a></br>\n<br>\n再次感謝您對我們的支持。歡迎您的再次光臨。 <br>\n<br>\n{$shop_name} </br>\n{$send_date}', 1194823291, 0, 'template'),
(4, 'order_cancel', 0, '訂單取消', '親愛的{$order.consignee}，你好！ \n\n您的編號為：{$order.order_sn}的訂單已取消。\n\n{$shop_name}\n{$send_date}', 1156491130, 0, 'template'),
(5, 'order_invalid', 0, '訂單無效', '親愛的{$order.consignee}，你好！\n\n您的編號為：{$order.order_sn}的訂單無效。\n\n{$shop_name}\n{$send_date}', 1156491164, 0, 'template'),
(6, 'send_bonus', 0, '發紅包', '親愛的{$user_name}您好！\n\n恭喜您獲得了{$count}個紅包，金額{if $count > 1}分別{/if}為{$money}\n\n{$shop_name}\n{$send_date}\n', 1156491184, 0, 'template'),
(7, 'group_buy', 1, '團購產品', '親愛的{$consignee}，您好！<br>\n<br>\n您於{$order_time}在本店參加團購產品活動，所購買的產品名稱為：{$goods_name}，數量：{$goods_number}，訂單號為：{$order_sn}，訂單金額為：{$order_amount}<br>\n<br>\n此團購產品現在已到結束日期，並達到最低價格，您現在可以對該訂單付款。<br>\n<br>\n請點擊下面的鏈接：<br>\n<a href=\"{$shop_url}\" target=\"_blank\">{$shop_url}</a><br>\n<br>\n請儘快登錄到用户中心，查看您的訂單詳情信息。 <br>\n<br>\n{$shop_name} <br>\n<br>\n{$send_date}', 1194824668, 0, 'template'),
(8, 'register_validate', 1, '郵件驗證', '{$user_name}您好！<br><br>\r\n\r\n這封郵件是 {$shop_name} 發送的。你收到這封郵件是為了驗證你註冊郵件地址是否有效。如果您已經通過驗證了，請忽略這封郵件。<br>\r\n請點擊以下鏈接(或者複製到您的瀏覽器)來驗證你的郵件地址:<br>\r\n<a href=\"{$validate_email}\" target=\"_blank\">{$validate_email}</a><br><br>\r\n\r\n{$shop_name}<br>\r\n{$send_date}', 1162201031, 0, 'template'),
(9, 'virtual_card', 0, '虛擬卡片', '親愛的{$order.consignee}\r\n你好！您的訂單{$order.order_sn}中{$goods.goods_name} 產品的詳細信息如下:\r\n{foreach from=$virtual_card item=card}\r\n{if $card.card_sn}卡號：{$card.card_sn}{/if}{if $card.card_password}卡片密碼：{$card.card_password}{/if}{if $card.end_date}截至日期：{$card.end_date}{/if}\r\n{/foreach}\r\n再次感謝您對我們的支持。歡迎您的再次光臨。\r\n\r\n{$shop_name} \r\n{$send_date}', 1162201031, 0, 'template'),
(10, 'attention_list', 0, '關注產品', '親愛的{$user_name}您好~\n\n您關注的產品 : {$goods_name} 最近已經更新,請您查看最新的產品信息\n\n{$goods_url}\r\n\r\n{$shop_name} \r\n{$send_date}', 1183851073, 0, 'template'),
(11, 'remind_of_new_order', 0, '新訂單通知', '親愛的店長，您好：\n   快來看看吧，又有新訂單了。\n    訂單號:{$order.order_sn} \n 訂單金額:{$order.order_amount}，\n 用户購買產品:{foreach from=$goods_list item=goods_data}{$goods_data.goods_name}(貨號:{$goods_data.goods_sn})    {/foreach} \n\n 收貨人:{$order.consignee}， \n 收貨人地址:{$order.address}，\n 收貨人電話:{$order.tel} {$order.mobile}, \n 配送方式:{$order.shipping_name}(費用:{$order.shipping_fee}), \n 付款方式:{$order.pay_name}(費用:{$order.pay_fee})。\n\n               系統提醒\n               {$send_date}', 1196239170, 0, 'template'),
(12, 'goods_booking', 1, '缺貨回覆', '親愛的{$user_name}。你好！</br></br>{$dispose_note}</br></br>您提交的缺貨產品鏈接為</br></br><a href=\"{$goods_link}\" target=\"_blank\">{$goods_name}</a></br><br>{$shop_name} </br>{$send_date}', 0, 0, 'template'),
(13, 'user_message', 1, '留言回覆', '親愛的{$user_name}。你好！</br></br>對您的留言：</br>{$message_content}</br></br>店主作了如下回復：</br>{$message_note}</br></br>您可以隨時回到店中和店主繼續溝通。</br>{$shop_name}</br>{$send_date}', 0, 0, 'template'),
(14, 'recomment', 1, '用户評論回覆', '親愛的{$user_name}。你好！</br></br>對您的評論：</br>“{$comment}”</br></br>店主作了如下回復：</br>“{$recomment}”</br></br>您可以隨時回到店中和店主繼續溝通。</br>{$shop_name}</br>{$send_date}', 0, 0, 'template');

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

--
-- 資料表結構 `ecs_member_price`
--

CREATE TABLE `ecs_member_price` (
  `price_id` mediumint UNSIGNED NOT NULL,
  `goods_id` mediumint UNSIGNED NOT NULL DEFAULT '0',
  `user_rank` tinyint NOT NULL DEFAULT '0',
  `user_price` decimal(10,2) NOT NULL DEFAULT '0.00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- 資料表結構 `ecs_nav`
--

CREATE TABLE `ecs_nav` (
  `id` mediumint NOT NULL,
  `ctype` varchar(10) DEFAULT NULL,
  `cid` smallint UNSIGNED DEFAULT NULL,
  `name` varchar(255) NOT NULL,
  `ifshow` tinyint(1) NOT NULL,
  `vieworder` tinyint(1) NOT NULL,
  `opennew` tinyint(1) NOT NULL,
  `url` varchar(255) NOT NULL,
  `type` varchar(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- 傾印資料表的資料 `ecs_nav`
--

INSERT INTO `ecs_nav` (`id`, `ctype`, `cid`, `name`, `ifshow`, `vieworder`, `opennew`, `url`, `type`) VALUES
(2, '', 0, '積分兑換', 0, 4, 0, 'exchange.php', 'middle'),
(5, '', 0, '免責條款', 1, 1, 0, 'article.php?id=1', 'bottom'),
(6, '', 0, '隱私保護', 1, 2, 0, 'article.php?id=2', 'bottom'),
(7, '', 0, '諮詢熱點', 1, 3, 0, 'article.php?id=3', 'bottom'),
(8, '', 0, '聯繫我們', 1, 4, 0, 'article.php?id=4', 'bottom'),
(9, '', 0, '公司簡介', 0, 5, 0, 'article.php?id=5', 'bottom'),
(10, '', 0, '批發方案', 0, 6, 0, 'wholesale.php', 'bottom'),
(11, '', 0, '配送方式', 0, 7, 0, 'myship.php', 'bottom'),
(12, '', 0, '預售活動', 0, 5, 0, 'pre_sale.php', 'middle'),
(24, '', 0, 'UTEL介紹', 1, 10, 0, 'https://369cycle.zltest.com.tw/wp/', 'middle'),
(25, '', 0, '分銷分潤', 1, 20, 0, 'https://shop.h888.fun/article.php?id=46', 'middle'),
(26, 'a', 7, '購買方案', 1, 30, 0, 'article_cat.php?id=7', 'middle'),
(27, 'c', 0, '感應式卡片', 1, 32, 0, 'category.php?id=358', 'middle'),
(28, 'c', 359, '電子名片樣式', 1, 34, 0, 'category.php?id=359', 'middle'),
(29, 'c', 0, '視覺化客製服務', 1, 36, 0, 'category.php?id=360', 'middle'),
(30, 'c', 361, 'DIY設計支援', 1, 38, 0, 'category.php?id=361', 'middle'),
(31, 'c', 362, '電子名片專案', 1, 40, 0, 'category.php?id=362', 'middle');

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

--
-- 資料表結構 `ecs_order_action`
--

CREATE TABLE `ecs_order_action` (
  `action_id` mediumint UNSIGNED NOT NULL COMMENT '自增ID',
  `order_id` mediumint UNSIGNED NOT NULL DEFAULT '0' COMMENT '訂單ID',
  `action_user` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '操作者ID',
  `order_status` tinyint UNSIGNED NOT NULL DEFAULT '0' COMMENT '訂單狀態',
  `shipping_status` tinyint UNSIGNED NOT NULL DEFAULT '0' COMMENT '物流狀態',
  `pay_status` tinyint UNSIGNED NOT NULL DEFAULT '0' COMMENT '付費狀態',
  `action_place` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `action_note` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '操作備註',
  `log_time` int UNSIGNED NOT NULL DEFAULT '0' COMMENT '操作時間'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- 傾印資料表的資料 `ecs_order_action`
--

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

--
-- 資料表結構 `ecs_order_goods`
--

CREATE TABLE `ecs_order_goods` (
  `rec_id` mediumint UNSIGNED NOT NULL COMMENT '自增ID',
  `order_id` mediumint UNSIGNED NOT NULL DEFAULT '0' COMMENT '訂單id',
  `goods_id` mediumint UNSIGNED NOT NULL DEFAULT '0' COMMENT '產品id',
  `goods_name` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '產品名稱',
  `goods_sn` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '產品貨號',
  `product_id` mediumint UNSIGNED NOT NULL DEFAULT '0',
  `goods_number` smallint UNSIGNED NOT NULL DEFAULT '1' COMMENT '購買數量',
  `market_price` decimal(10,0) NOT NULL DEFAULT '0' COMMENT '市場價格',
  `goods_price` decimal(10,0) NOT NULL DEFAULT '0' COMMENT '產品價格',
  `goods_attr` text COMMENT '產品屬性',
  `send_number` smallint UNSIGNED NOT NULL DEFAULT '0' COMMENT '當不是實物時，是否已發貨，0，否；1，是',
  `is_real` tinyint UNSIGNED NOT NULL DEFAULT '0' COMMENT '是否為實體產品',
  `extension_code` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '產品的擴展屬性，比如像虛擬卡。取值goods',
  `parent_id` mediumint UNSIGNED NOT NULL DEFAULT '0' COMMENT '父產品編號',
  `is_gift` smallint UNSIGNED NOT NULL DEFAULT '0',
  `goods_attr_id` varchar(255) NOT NULL DEFAULT '',
  `is_back` tinyint(1) DEFAULT '0',
  `add_info` text
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- 傾印資料表的資料 `ecs_order_goods`
--

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

--
-- 資料表結構 `ecs_order_info`
--

CREATE TABLE `ecs_order_info` (
  `order_id` mediumint UNSIGNED NOT NULL COMMENT '自增ID',
  `order_sn` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '訂單編號',
  `user_id` mediumint UNSIGNED NOT NULL DEFAULT '0' COMMENT '客戶ID',
  `order_status` tinyint UNSIGNED NOT NULL DEFAULT '0' COMMENT '訂單狀態(\r\n    0: ''未確認'',\r\n    1: ''已確認'',\r\n    2: ''已取消'',\r\n    3: ''無效'',\r\n    4: ''退貨'',\r\n    5: ''未取'',\r\n    6: '''',\r\n    7: ''完成'',\r\n)',
  `shipping_status` tinyint UNSIGNED NOT NULL DEFAULT '0' COMMENT '運送狀態(0:未發貨,1:已發貨，2:收貨確認，3:配貨中,4:物流失敗,5:發貨中,6:未取,7:已達門市 ）',
  `pay_status` tinyint UNSIGNED NOT NULL DEFAULT '0' COMMENT '金流狀態(0:未付款，1:付款中,2:已付款,3:支付失敗)',
  `consignee` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '收貨人姓名',
  `address` varchar(2048) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '運送地址',
  `tel` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '收貨人電話',
  `mobile` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '收貨人手機',
  `email` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '電子郵件',
  `best_time` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '最佳收貨時間',
  `sign_building` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '明顥建物',
  `postscript` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '訂單留言',
  `shipping_id` tinyint NOT NULL DEFAULT '0' COMMENT '配送方式ID',
  `shipping_name` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '配送名稱',
  `pay_id` tinyint NOT NULL DEFAULT '0' COMMENT '金流ID',
  `pay_name` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '金流名稱',
  `pay_token` varchar(255) NOT NULL DEFAULT '' COMMENT '三方金流token',
  `pay_data` text COMMENT '三方金流data',
  `how_oos` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '缺貨處理方式',
  `how_surplus` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '餘額處理方式(無用)',
  `pack_name` varchar(120) NOT NULL DEFAULT '' COMMENT '包裝名稱',
  `card_name` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '卡片名稱',
  `card_message` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '祝賀詞',
  `inv_payee` varchar(120) NOT NULL DEFAULT '' COMMENT '發票抬頭',
  `inv_content` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '發票內容',
  `goods_amount` decimal(10,0) NOT NULL DEFAULT '0' COMMENT '產品總額',
  `shipping_fee` decimal(10,0) NOT NULL DEFAULT '0' COMMENT '運費',
  `insure_fee` decimal(10,0) NOT NULL DEFAULT '0' COMMENT '保價費用',
  `pay_fee` decimal(10,0) NOT NULL DEFAULT '0' COMMENT '金流手續費',
  `pack_fee` decimal(10,0) NOT NULL DEFAULT '0' COMMENT '包裝費用',
  `card_fee` decimal(10,0) NOT NULL DEFAULT '0' COMMENT '賀卡費用',
  `money_paid` decimal(10,0) NOT NULL DEFAULT '0' COMMENT '已付款金額',
  `surplus` decimal(10,0) NOT NULL DEFAULT '0' COMMENT '餘額',
  `integral` int UNSIGNED NOT NULL DEFAULT '0' COMMENT '積分',
  `integral_money` decimal(10,0) NOT NULL DEFAULT '0' COMMENT '使用積分',
  `bonus` decimal(10,0) NOT NULL DEFAULT '0' COMMENT '使用紅包金額',
  `order_amount` decimal(10,0) NOT NULL DEFAULT '0' COMMENT '訂單金額',
  `from_ad` smallint NOT NULL DEFAULT '0' COMMENT '廣告ID',
  `referer` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '訂單來源頁面',
  `add_time` int UNSIGNED NOT NULL DEFAULT '0' COMMENT '訂單生成時間',
  `confirm_time` int UNSIGNED NOT NULL DEFAULT '0' COMMENT '訂單確認時間',
  `pay_time` int UNSIGNED NOT NULL DEFAULT '0' COMMENT '訂單支付時間',
  `shipping_time` int UNSIGNED NOT NULL DEFAULT '0' COMMENT '訂單配送時間',
  `shipping_token` varchar(100) NOT NULL DEFAULT '' COMMENT '物流回傳的主要字串',
  `shipping_data` text,
  `pack_id` tinyint UNSIGNED NOT NULL DEFAULT '0' COMMENT '包裝ID',
  `card_id` tinyint UNSIGNED NOT NULL DEFAULT '0' COMMENT '賀卡ID',
  `bonus_id` mediumint UNSIGNED NOT NULL DEFAULT '0' COMMENT '紅包id',
  `invoice_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '發票號碼',
  `extension_code` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '通過活動購買的產品的代號,group_buy是團購; auction是拍賣;snatch奪寶奇兵;shashcard為slashcard,正常普通產品該處理為空',
  `extension_id` mediumint UNSIGNED NOT NULL DEFAULT '0' COMMENT '通過活動購買的物品id,取值ecs_good_activity;如果是正常普通產品,該處為0',
  `to_buyer` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '商家給客户的留言,當該字段值時可以在訂單查詢看到',
  `pay_note` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '付款備註',
  `agency_id` smallint UNSIGNED NOT NULL DEFAULT '0' COMMENT '辦事處ID',
  `inv_type` varchar(60) NOT NULL DEFAULT '' COMMENT '發票類型',
  `tax` decimal(10,0) NOT NULL DEFAULT '0' COMMENT '稅金',
  `is_separate` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0未分成或等待分成;1已分成;2取消分成',
  `parent_id` mediumint UNSIGNED NOT NULL DEFAULT '0' COMMENT '推薦人ID',
  `discount` decimal(10,0) NOT NULL DEFAULT '0' COMMENT '折扣',
  `fencheng` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '分成',
  `shipping_time_end` int DEFAULT '0' COMMENT '運送到達時間'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- 傾印資料表的資料 `ecs_order_info`
--

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

--
-- 資料表結構 `ecs_order_shipping`
--

CREATE TABLE `ecs_order_shipping` (
  `id` int NOT NULL COMMENT '自增ID',
  `order_id` int NOT NULL COMMENT '物流ID',
  `code` varchar(50) COLLATE utf8mb4_general_ci NOT NULL COMMENT '狀態代碼',
  `note` varchar(1000) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '物流狀態說明',
  `create_time` int NOT NULL COMMENT '物流狀態產生時間'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='物流紀錄';

--
-- 傾印資料表的資料 `ecs_order_shipping`
--

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

--
-- 資料表結構 `ecs_pack`
--

CREATE TABLE `ecs_pack` (
  `pack_id` tinyint UNSIGNED NOT NULL,
  `pack_name` varchar(120) NOT NULL DEFAULT '',
  `pack_img` varchar(255) NOT NULL DEFAULT '',
  `pack_fee` decimal(6,2) UNSIGNED NOT NULL DEFAULT '0.00',
  `free_money` smallint UNSIGNED NOT NULL DEFAULT '0',
  `pack_desc` varchar(255) NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- 傾印資料表的資料 `ecs_pack`
--

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

--
-- 資料表結構 `ecs_package_goods`
--

CREATE TABLE `ecs_package_goods` (
  `package_id` mediumint UNSIGNED NOT NULL DEFAULT '0',
  `goods_id` mediumint UNSIGNED NOT NULL DEFAULT '0',
  `product_id` mediumint UNSIGNED NOT NULL DEFAULT '0',
  `goods_number` smallint UNSIGNED NOT NULL DEFAULT '1',
  `admin_id` tinyint UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- 傾印資料表的資料 `ecs_package_goods`
--

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

--
-- 資料表結構 `ecs_payment`
--

CREATE TABLE `ecs_payment` (
  `pay_id` tinyint UNSIGNED NOT NULL,
  `pay_code` varchar(20) NOT NULL DEFAULT '',
  `pay_name` varchar(120) NOT NULL DEFAULT '',
  `pay_fee` varchar(10) NOT NULL DEFAULT '0',
  `pay_desc` text NOT NULL,
  `pay_order` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `pay_config` text NOT NULL,
  `pay_config_field` text COMMENT 'config欄',
  `enabled` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `logo` varchar(255) NOT NULL DEFAULT '' COMMENT '金流logo',
  `is_cod` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `is_test` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否為測試環境',
  `is_online` tinyint UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- 傾印資料表的資料 `ecs_payment`
--

INSERT INTO `ecs_payment` (`pay_id`, `pay_code`, `pay_name`, `pay_fee`, `pay_desc`, `pay_order`, `pay_config`, `pay_config_field`, `enabled`, `logo`, `is_cod`, `is_test`, `is_online`) VALUES
(12, 'linepay', 'Line Pay', '0', 'Line Pay', 10, '{}', NULL, 0, 'https://shop.h888.fun/images/pay_logo/linepay.png', 0, 0, 0),
(13, 'eccredit', '信用卡', '0', '綠界信用卡', 20, '{\"HashKey\":\"q5hFjEplGMphnyyi\",\"MerchantId\":\"3307480\",\"HashIv\":\"XldG9XzU8wwBJ2bC\"}', '[{\"name\":\"特店編號\",\"key\":\"MerchantId\"},{\"name\":\"HashKey\",\"key\":\"HashKey\"},\r\n{\"name\":\"HashIV\",\"key\":\"HashIv\"}]', 1, 'https://shop.h888.fun/images/pay_logo/credit.png', 0, 0, 0),
(14, 'gmpatm', 'ATM轉帳', '0', 'ATM轉帳', 50, '{}', NULL, 0, 'https://shop.h888.fun/images/pay_logo/mastercard1.png', 0, 0, 0),
(15, 'gmpcvs', '超商付款', '0', '超商付款', 60, '', NULL, 0, 'https://shop.h888.fun/images/pay_logo/mastercard1.png', 0, 0, 0),
(16, 'gmpcredit', '信用卡', '0', '萬事達信用卡付款', 70, '', NULL, 0, 'https://shop.h888.fun/images/pay_logo/mastercard1.png', 0, 0, 0),
(17, 'eccvs', '超商付款', '0', '綠界超商付款', 30, '{\"HashKey\":\"q5hFjEplGMphnyyi\",\"MerchantId\":\"3307480\",\"HashIv\":\"XldG9XzU8wwBJ2bC\"}', '[{\"name\":\"特店編號\",\"key\":\"MerchantId\"},{\"name\":\"HashKey\",\"key\":\"HashKey\"},\r\n{\"name\":\"HashIV\",\"key\":\"HashIv\"}]', 0, 'https://shop.h888.fun/images/pay_logo/cvs.png', 0, 1, 0),
(18, 'ecatm', 'ATM付款', '0', '綠界ATM付款', 40, '{\"HashKey\":\"q5hFjEplGMphnyyi\",\"MerchantId\":\"3307480\",\"HashIv\":\"XldG9XzU8wwBJ2bC\"}', '[{\"name\":\"特店編號\",\"key\":\"MerchantId\"},{\"name\":\"HashKey\",\"key\":\"HashKey\"},\r\n{\"name\":\"HashIV\",\"key\":\"HashIv\"}]', 1, 'https://shop.h888.fun/images/pay_logo/atm.png', 0, 0, 0),
(19, 'tpcredit', '信用卡付款', '0', 'Tappay信用卡付款', 80, '', NULL, 0, 'https://shop.h888.fun/images/pay_logo/mastercard1.png', 0, 0, 0);

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

--
-- 資料表結構 `ecs_pay_log`
--

CREATE TABLE `ecs_pay_log` (
  `log_id` int UNSIGNED NOT NULL,
  `order_id` mediumint UNSIGNED NOT NULL DEFAULT '0',
  `order_amount` decimal(10,2) UNSIGNED NOT NULL,
  `order_type` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `is_paid` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `user_account_id` int UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- 傾印資料表的資料 `ecs_pay_log`
--


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

--
-- 資料表結構 `ecs_plugins`
--

CREATE TABLE `ecs_plugins` (
  `code` varchar(30) NOT NULL DEFAULT '',
  `version` varchar(10) NOT NULL DEFAULT '',
  `library` varchar(255) NOT NULL DEFAULT '',
  `assign` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `install_date` int UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- 資料表結構 `ecs_products`
--

CREATE TABLE `ecs_products` (
  `product_id` mediumint UNSIGNED NOT NULL COMMENT '自增ID',
  `goods_id` mediumint UNSIGNED NOT NULL DEFAULT '0' COMMENT '產品ID',
  `goods_attr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '產品屬性',
  `product_sn` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '產品貨號',
  `product_number` smallint UNSIGNED DEFAULT '0' COMMENT '產品數量',
  `is_check` int UNSIGNED NOT NULL COMMENT '是否檢查'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- 傾印資料表的資料 `ecs_products`
--

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

--
-- 資料表結構 `ecs_region`
--

CREATE TABLE `ecs_region` (
  `region_id` smallint UNSIGNED NOT NULL,
  `parent_id` smallint UNSIGNED NOT NULL DEFAULT '0',
  `region_name` varchar(120) NOT NULL DEFAULT '',
  `region_type` tinyint(1) NOT NULL DEFAULT '2',
  `agency_id` smallint UNSIGNED NOT NULL DEFAULT '0',
  `zipcode` char(3) NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- 傾印資料表的資料 `ecs_region`
--

INSERT INTO `ecs_region` (`region_id`, `parent_id`, `region_name`, `region_type`, `agency_id`, `zipcode`) VALUES
(1, 0, '台北市', 0, 0, ''),
(2, 0, '基隆市', 0, 0, ''),
(3, 0, '新北市', 0, 0, ''),
(4, 0, '宜蘭縣', 0, 0, ''),
(5, 0, '新竹市', 0, 0, ''),
(6, 0, '新竹縣', 0, 0, ''),
(7, 0, '桃園市', 0, 0, ''),
(8, 0, '苗粟縣', 0, 0, ''),
(9, 0, '台中市', 0, 0, ''),
(10, 0, '彰化縣', 0, 0, ''),
(11, 0, '南投縣', 0, 0, ''),
(12, 0, '嘉義市', 0, 0, ''),
(13, 0, '嘉義縣', 0, 0, ''),
(14, 0, '雲林縣', 0, 0, ''),
(15, 0, '台南市', 0, 0, ''),
(16, 0, '高雄市', 0, 0, ''),
(17, 0, '屏東縣', 0, 0, ''),
(18, 0, '台東縣', 0, 0, ''),
(19, 0, '花蓮縣', 0, 0, ''),
(20, 0, '澍湖縣', 0, 0, ''),
(21, 0, '金門縣', 0, 0, ''),
(22, 0, '連江縣', 0, 0, ''),
(100, 1, '中正區', 1, 0, '100'),
(101, 1, '大同區', 1, 0, '103'),
(102, 1, '中山區', 1, 0, '104'),
(103, 1, '松山區', 1, 0, '105'),
(104, 1, '大安區', 1, 0, '106'),
(105, 1, '萬華區', 1, 0, '108'),
(106, 1, '信義區', 1, 0, '110'),
(107, 1, '士林區', 1, 0, '111'),
(108, 1, '北投區', 1, 0, '112'),
(109, 1, '內湖區', 1, 0, '114'),
(110, 1, '南港區', 1, 0, '115'),
(111, 1, '文山區', 1, 0, '116'),
(112, 3, '萬里', 1, 0, '207'),
(113, 3, '金山', 1, 0, '208'),
(114, 3, '板橋', 1, 0, '220'),
(115, 3, '汐止', 1, 0, '221'),
(116, 3, '深坑', 1, 0, '222'),
(117, 3, '石碇', 1, 0, '223'),
(118, 3, '金山', 1, 0, '208'),
(119, 3, '瑞芳', 1, 0, '224'),
(120, 3, '平溪', 1, 0, '226'),
(121, 3, '板橋', 1, 0, '220'),
(122, 3, '雙溪', 1, 0, '227'),
(123, 3, '汐止', 1, 0, '221'),
(124, 3, '貢寮', 1, 0, '228'),
(125, 3, '深坑', 1, 0, '222'),
(126, 3, '石碇', 1, 0, '223'),
(127, 3, '新店', 1, 0, '231'),
(128, 3, '瑞芳', 1, 0, '224'),
(129, 3, '坪林', 1, 0, '232'),
(130, 3, '平溪', 1, 0, '226'),
(131, 3, '烏來', 1, 0, '233'),
(132, 3, '永和', 1, 0, '234'),
(133, 3, '雙溪', 1, 0, '227'),
(134, 3, '中和', 1, 0, '235'),
(135, 3, '貢寮', 1, 0, '228'),
(136, 3, '土城', 1, 0, '236'),
(137, 3, '新店', 1, 0, '231'),
(138, 3, '坪林', 1, 0, '232'),
(139, 3, '三峽', 1, 0, '237'),
(140, 3, '烏來', 1, 0, '233'),
(141, 3, '樹林', 1, 0, '238'),
(142, 3, '鶯歌', 1, 0, '239'),
(143, 3, '永和', 1, 0, '234'),
(144, 3, '三重', 1, 0, '241'),
(145, 3, '中和', 1, 0, '235'),
(146, 3, '新莊', 1, 0, '242'),
(147, 3, '土城', 1, 0, '236'),
(148, 3, '泰山', 1, 0, '243'),
(149, 3, '三峽', 1, 0, '237'),
(150, 3, '林口', 1, 0, '244'),
(151, 3, '樹林', 1, 0, '238'),
(152, 3, '鶯歌', 1, 0, '239'),
(153, 3, '蘆洲', 1, 0, '247'),
(154, 3, '三重', 1, 0, '241'),
(155, 3, '五股', 1, 0, '248'),
(156, 3, '八里', 1, 0, '249'),
(157, 3, '新莊', 1, 0, '242'),
(158, 3, '淡水', 1, 0, '251'),
(159, 3, '泰山', 1, 0, '243'),
(160, 3, '三芝', 1, 0, '252'),
(161, 3, '林口', 1, 0, '244'),
(162, 3, '石門', 1, 0, '253'),
(163, 3, '蘆洲', 1, 0, '247'),
(164, 3, '五股', 1, 0, '248'),
(165, 3, '八里', 1, 0, '249'),
(166, 3, '淡水', 1, 0, '251'),
(167, 3, '三芝', 1, 0, '252'),
(168, 3, '石門', 1, 0, '253'),
(169, 2, '仁愛區', 1, 0, '200'),
(170, 2, '信義區', 1, 0, '201'),
(171, 2, '中正區', 1, 0, '202'),
(172, 2, '中山區', 1, 0, '203'),
(173, 2, '安樂區', 1, 0, '204'),
(174, 2, '暖暖區', 1, 0, '205'),
(175, 2, '七堵區', 1, 0, '206'),
(176, 4, '宜蘭市', 1, 0, '260'),
(177, 4, '頭城鎮', 1, 0, '261'),
(178, 4, '礁溪鄉', 1, 0, '262'),
(179, 4, '壯圍鄉', 1, 0, '263'),
(180, 4, '員山鄉', 1, 0, '264'),
(181, 4, '羅東鎮', 1, 0, '265'),
(182, 4, '三星鄉', 1, 0, '266'),
(183, 4, '大同鄉', 1, 0, '267'),
(184, 4, '五結鄉', 1, 0, '268'),
(185, 4, '冬山鄉', 1, 0, '269'),
(186, 4, '蘇澳鎮', 1, 0, '270'),
(187, 4, '南澳鄉', 1, 0, '272'),
(188, 5, '東區', 1, 0, '300'),
(189, 5, '東區', 1, 0, '300'),
(190, 5, '香山區', 1, 0, '300'),
(191, 5, '竹北市', 1, 0, '302'),
(192, 5, '湖口鄉', 1, 0, '303'),
(193, 5, '新豐鄉', 1, 0, '304'),
(194, 5, '新埔鎮', 1, 0, '305'),
(195, 5, '關西鎮', 1, 0, '306'),
(196, 5, '芎林鄉', 1, 0, '307'),
(197, 5, '寶山鄉', 1, 0, '308'),
(198, 5, '竹東鎮', 1, 0, '310'),
(199, 5, '五峰鄉', 1, 0, '311'),
(200, 5, '橫山鄉', 1, 0, '312'),
(201, 5, '尖石鄉', 1, 0, '313'),
(202, 5, '北埔鄉', 1, 0, '314'),
(203, 5, '峨眉鄉', 1, 0, '315'),
(204, 7, '桃園市', 1, 0, '320'),
(205, 7, '中壢區', 1, 0, '320'),
(206, 7, '平鎮區', 1, 0, '324'),
(207, 7, '龍潭區', 1, 0, '325'),
(208, 7, '楊梅區', 1, 0, '326'),
(209, 7, '新屋區', 1, 0, '327'),
(210, 7, '觀音區', 1, 0, '328'),
(211, 7, '桃園區', 1, 0, '330'),
(212, 7, '龜山區', 1, 0, '333'),
(213, 7, '八德區', 1, 0, '334'),
(214, 7, '大溪區', 1, 0, '335'),
(215, 7, '復興區', 1, 0, '336'),
(216, 7, '大園區', 1, 0, '337'),
(217, 7, '蘆竹區', 1, 0, '338'),
(218, 8, '苗栗縣', 1, 0, '360'),
(219, 8, '竹南鎮', 1, 0, '350'),
(220, 8, '頭份市', 1, 0, '351'),
(221, 8, '三灣鄉', 1, 0, '352'),
(222, 8, '南庄鄉', 1, 0, '353'),
(223, 8, '獅潭鄉', 1, 0, '354'),
(224, 8, '後龍鎮', 1, 0, '356'),
(225, 8, '通霄鎮', 1, 0, '357'),
(226, 8, '苑裡鎮', 1, 0, '358'),
(227, 8, '苗栗市', 1, 0, '360'),
(228, 8, '造橋鄉', 1, 0, '361'),
(229, 8, '頭屋鄉', 1, 0, '362'),
(230, 8, '公館鄉', 1, 0, '363'),
(231, 8, '大湖鄉', 1, 0, '364'),
(232, 8, '泰安鄉', 1, 0, '365'),
(233, 8, '銅鑼鄉', 1, 0, '366'),
(234, 8, '三義鄉', 1, 0, '367'),
(235, 8, '西湖鄉', 1, 0, '368'),
(236, 8, '卓蘭鎮', 1, 0, '369'),
(237, 9, '台中市', 1, 0, '400'),
(238, 9, '中區', 1, 0, '400'),
(239, 9, '東區', 1, 0, '401'),
(240, 9, '南區', 1, 0, '402'),
(241, 9, '西區', 1, 0, '403'),
(242, 9, '北區', 1, 0, '404'),
(243, 9, '北屯區', 1, 0, '406'),
(244, 9, '西屯區', 1, 0, '407'),
(245, 9, '南屯區', 1, 0, '408'),
(246, 9, '太平區', 1, 0, '411'),
(247, 9, '大里區', 1, 0, '412'),
(248, 9, '霧峰區', 1, 0, '413'),
(249, 9, '烏日區', 1, 0, '414'),
(250, 9, '豐原區', 1, 0, '420'),
(251, 9, '后里區', 1, 0, '421'),
(252, 9, '石岡區', 1, 0, '422'),
(253, 9, '東勢區', 1, 0, '423'),
(254, 9, '和平區', 1, 0, '424'),
(255, 9, '新社區', 1, 0, '426'),
(256, 9, '潭子區', 1, 0, '427'),
(257, 9, '大雅區', 1, 0, '428'),
(258, 9, '神岡區', 1, 0, '429'),
(259, 9, '大肚區', 1, 0, '432'),
(260, 9, '沙鹿區', 1, 0, '433'),
(261, 9, '龍井區', 1, 0, '434'),
(262, 9, '梧棲區', 1, 0, '435'),
(263, 9, '清水區', 1, 0, '436'),
(264, 9, '大甲區', 1, 0, '437'),
(265, 9, '外埔區', 1, 0, '438'),
(266, 9, '大安區', 1, 0, '439'),
(267, 10, '彰化市', 1, 0, '500'),
(268, 10, '芬園鄉', 1, 0, '502'),
(269, 10, '花壇鄉', 1, 0, '503'),
(270, 10, '秀水鄉', 1, 0, '504'),
(271, 10, '鹿港鎮', 1, 0, '505'),
(272, 10, '福興鄉', 1, 0, '506'),
(273, 10, '線西鄉', 1, 0, '507'),
(274, 10, '和美鎮', 1, 0, '508'),
(275, 10, '伸港鄉', 1, 0, '509'),
(276, 10, '員林市', 1, 0, '510'),
(277, 10, '社頭鄉', 1, 0, '511'),
(278, 10, '永靖鄉', 1, 0, '512'),
(279, 10, '埔心鄉', 1, 0, '513'),
(280, 10, '溪湖鎮', 1, 0, '514'),
(281, 10, '大村鄉', 1, 0, '515'),
(282, 10, '埔鹽鄉', 1, 0, '516'),
(283, 10, '田中鎮', 1, 0, '520'),
(284, 10, '北斗鎮', 1, 0, '521'),
(285, 10, '田尾鄉', 1, 0, '522'),
(286, 10, '埤頭鄉', 1, 0, '523'),
(287, 10, '溪州鄉', 1, 0, '524'),
(288, 10, '竹塘鄉', 1, 0, '525'),
(289, 10, '二林鎮', 1, 0, '526'),
(290, 10, '大城鄉', 1, 0, '527'),
(291, 10, '芳苑鄉', 1, 0, '528'),
(292, 10, '二水鄉', 1, 0, '530'),
(293, 11, '南投市', 1, 0, '540'),
(294, 11, '中寮鄉', 1, 0, '541'),
(295, 11, '草屯鎮', 1, 0, '542'),
(296, 11, '國姓鄉', 1, 0, '544'),
(297, 11, '埔里鎮', 1, 0, '545'),
(298, 11, '仁愛鄉', 1, 0, '546'),
(299, 11, '名間鄉', 1, 0, '551'),
(300, 11, '集集鎮', 1, 0, '552'),
(301, 11, '水里鄉', 1, 0, '553'),
(302, 11, '魚池鄉', 1, 0, '555'),
(303, 11, '信義鄉', 1, 0, '556'),
(304, 11, '竹山鎮', 1, 0, '557'),
(305, 11, '鹿谷鄉', 1, 0, '558'),
(306, 12, '東區', 1, 0, '600'),
(307, 12, '西區', 1, 0, '600'),
(308, 13, '番路鄉', 1, 0, '602'),
(309, 13, '梅山鄉', 1, 0, '603'),
(310, 13, '竹崎鄉', 1, 0, '604'),
(311, 13, '阿里山', 1, 0, '605'),
(312, 13, '中埔鄉', 1, 0, '606'),
(313, 13, '大埔鄉', 1, 0, '607'),
(314, 13, '水上鄉', 1, 0, '608'),
(315, 13, '鹿草鄉', 1, 0, '611'),
(316, 13, '太保市', 1, 0, '612'),
(317, 13, '朴子市', 1, 0, '613'),
(318, 13, '東石鄉', 1, 0, '614'),
(319, 13, '六腳鄉', 1, 0, '615'),
(320, 13, '新港鄉', 1, 0, '616'),
(321, 13, '民雄鄉', 1, 0, '621'),
(322, 13, '大林鎮', 1, 0, '622'),
(323, 13, '溪口鄉', 1, 0, '623'),
(324, 13, '義竹鄉', 1, 0, '624'),
(325, 13, '布袋鎮', 1, 0, '625'),
(326, 14, '斗南鎮', 1, 0, '630'),
(327, 14, '大埤鄉', 1, 0, '631'),
(328, 14, '虎尾鎮', 1, 0, '632'),
(329, 14, '土庫鎮', 1, 0, '633'),
(330, 14, '褒忠鄉', 1, 0, '634'),
(331, 14, '東勢鄉', 1, 0, '635'),
(332, 14, '臺西鄉', 1, 0, '636'),
(333, 14, '崙背鄉', 1, 0, '637'),
(334, 14, '麥寮鄉', 1, 0, '638'),
(335, 14, '斗六市', 1, 0, '640'),
(336, 14, '林內鄉', 1, 0, '643'),
(337, 14, '古坑鄉', 1, 0, '646'),
(338, 14, '莿桐鄉', 1, 0, '647'),
(339, 14, '西螺鎮', 1, 0, '648'),
(340, 14, '二崙鄉', 1, 0, '649'),
(341, 14, '北港鎮', 1, 0, '651'),
(342, 14, '水林鄉', 1, 0, '652'),
(343, 14, '口湖鄉', 1, 0, '653'),
(344, 14, '四湖鄉', 1, 0, '654'),
(345, 14, '元長鄉', 1, 0, '655'),
(346, 15, '中西區', 1, 0, '700'),
(347, 15, '東區', 1, 0, '701'),
(348, 15, '南區', 1, 0, '702'),
(349, 15, '北區', 1, 0, '704'),
(350, 15, '安平區', 1, 0, '708'),
(351, 15, '安南區', 1, 0, '709'),
(352, 15, '永康區', 1, 0, '710'),
(353, 15, '歸仁區', 1, 0, '711'),
(354, 15, '新化區', 1, 0, '712'),
(355, 15, '左鎮區', 1, 0, '713'),
(356, 15, '玉井區', 1, 0, '714'),
(357, 15, '楠西區', 1, 0, '715'),
(358, 15, '南化區', 1, 0, '716'),
(359, 15, '仁德區', 1, 0, '717'),
(360, 15, '關廟區', 1, 0, '718'),
(361, 15, '龍崎區', 1, 0, '719'),
(362, 15, '官田區', 1, 0, '720'),
(363, 15, '麻豆區', 1, 0, '721'),
(364, 15, '佳里區', 1, 0, '722'),
(365, 15, '西港區', 1, 0, '723'),
(366, 15, '七股區', 1, 0, '724'),
(367, 15, '將軍區', 1, 0, '725'),
(368, 15, '學甲區', 1, 0, '726'),
(369, 15, '北門區', 1, 0, '727'),
(370, 15, '新營區', 1, 0, '730'),
(371, 15, '後壁區', 1, 0, '731'),
(372, 15, '白河區', 1, 0, '732'),
(373, 15, '東山區', 1, 0, '733'),
(374, 15, '六甲區', 1, 0, '734'),
(375, 15, '下營區', 1, 0, '735'),
(376, 15, '柳營區', 1, 0, '736'),
(377, 15, '鹽水區', 1, 0, '737'),
(378, 15, '善化區', 1, 0, '741'),
(379, 15, '大內區', 1, 0, '742'),
(380, 15, '山上區', 1, 0, '743'),
(381, 15, '新市區', 1, 0, '744'),
(382, 15, '安定區', 1, 0, '745'),
(383, 16, '新興區', 1, 0, '800'),
(384, 16, '前金區', 1, 0, '801'),
(385, 16, '苓雅區', 1, 0, '802'),
(386, 16, '鹽埕區', 1, 0, '803'),
(387, 16, '鼓山區', 1, 0, '804'),
(388, 16, '旗津區', 1, 0, '805'),
(389, 16, '前鎮區', 1, 0, '806'),
(390, 16, '三民區', 1, 0, '807'),
(391, 16, '楠梓區', 1, 0, '811'),
(392, 16, '小港區', 1, 0, '812'),
(393, 16, '左營區', 1, 0, '813'),
(394, 16, '仁武區', 1, 0, '814'),
(395, 16, '大社區', 1, 0, '815'),
(396, 16, '岡山區', 1, 0, '820'),
(397, 16, '路竹區', 1, 0, '821'),
(398, 16, '阿蓮區', 1, 0, '822'),
(399, 16, '田寮區', 1, 0, '823'),
(400, 16, '燕巢區', 1, 0, '824'),
(401, 16, '橋頭區', 1, 0, '825'),
(402, 16, '梓官區', 1, 0, '826'),
(403, 16, '彌陀區', 1, 0, '827'),
(404, 16, '永安區', 1, 0, '828'),
(405, 16, '湖內區', 1, 0, '829'),
(406, 16, '鳳山區', 1, 0, '830'),
(407, 16, '大寮區', 1, 0, '831'),
(408, 16, '林園區', 1, 0, '832'),
(409, 16, '鳥松區', 1, 0, '833'),
(410, 16, '大樹區', 1, 0, '840'),
(411, 16, '旗山區', 1, 0, '842'),
(412, 16, '美濃區', 1, 0, '843'),
(413, 16, '六龜區', 1, 0, '844'),
(414, 16, '內門區', 1, 0, '845'),
(415, 16, '杉林區', 1, 0, '846'),
(416, 16, '甲仙區', 1, 0, '847'),
(417, 16, '桃源區', 1, 0, '848'),
(418, 16, '那瑪夏', 1, 0, '849'),
(419, 16, '茂林區', 1, 0, '851'),
(420, 16, '茄萣區', 1, 0, '852'),
(421, 17, '屏東市', 1, 0, '900'),
(422, 17, '三地門', 2, 0, '901'),
(423, 17, '霧台鄉', 2, 0, '902'),
(424, 17, '瑪家鄉', 2, 0, '903'),
(425, 17, '九如鄉', 2, 0, '904'),
(426, 17, '里港鄉', 2, 0, '905'),
(427, 17, '高樹鄉', 2, 0, '906'),
(428, 17, '鹽埔鄉', 2, 0, '907'),
(429, 17, '長治鄉', 2, 0, '908'),
(430, 17, '麟洛鄉', 2, 0, '909'),
(431, 17, '竹田鄉', 2, 0, '911'),
(432, 17, '內埔鄉', 2, 0, '912'),
(433, 17, '萬丹鄉', 2, 0, '913'),
(434, 17, '潮州鎮', 3, 0, '920'),
(435, 17, '泰武鄉', 2, 0, '921'),
(436, 17, '來義鄉', 2, 0, '922'),
(437, 17, '萬巒鄉', 2, 0, '923'),
(438, 17, '崁頂鄉', 2, 0, '924'),
(439, 17, '新埤鄉', 2, 0, '925'),
(440, 17, '南州鄉', 2, 0, '926'),
(441, 17, '林邊鄉', 2, 0, '927'),
(442, 17, '東港鎮', 3, 0, '928'),
(443, 17, '琉球鄉', 2, 0, '929'),
(444, 17, '佳冬鄉', 2, 0, '931'),
(445, 17, '新園鄉', 2, 0, '932'),
(446, 17, '枋寮鄉', 2, 0, '940'),
(447, 17, '枋山鄉', 2, 0, '941'),
(448, 17, '春日鄉', 2, 0, '942'),
(449, 17, '獅子鄉', 2, 0, '943'),
(450, 17, '車城鄉', 2, 0, '944'),
(451, 17, '牡丹鄉', 2, 0, '945'),
(452, 17, '恆春鎮', 3, 0, '946'),
(453, 17, '滿州鄉', 3, 0, '947'),
(454, 18, '台東市', 2, 0, '950'),
(455, 18, '綠島鄉', 2, 0, '951'),
(456, 18, '蘭嶼鄉', 2, 0, '952'),
(457, 18, '延平鄉', 2, 0, '953'),
(458, 18, '卑南鄉', 2, 0, '954'),
(459, 18, '鹿野鄉', 2, 0, '955'),
(460, 18, '關山鎮', 2, 0, '956'),
(461, 18, '海端鄉', 2, 0, '957'),
(462, 18, '池上鄉', 2, 0, '958'),
(463, 18, '東河鄉', 2, 0, '959'),
(464, 18, '成功鎮', 2, 0, '961'),
(465, 18, '長濱鄉', 2, 0, '962'),
(466, 18, '太麻里鄉', 2, 0, '963'),
(467, 18, '金峰鄉', 2, 0, '964'),
(468, 18, '大武鄉', 2, 0, '965'),
(469, 18, '達仁鄉', 2, 0, '966'),
(470, 19, '花蓮市', 2, 0, '970'),
(471, 19, '新城鄉', 2, 0, '971'),
(472, 19, '秀林鄉', 2, 0, '972'),
(473, 19, '吉安鄉', 2, 0, '973'),
(474, 19, '壽豐鄉', 2, 0, '974'),
(475, 19, '鳳林鎮', 2, 0, '975'),
(476, 19, '光復鄉', 2, 0, '976'),
(477, 19, '豐濱鄉', 2, 0, '977'),
(478, 19, '瑞穗鄉', 2, 0, '978'),
(479, 19, '萬榮鄉', 2, 0, '979'),
(480, 19, '玉里鎮', 2, 0, '981'),
(481, 19, '卓溪鄉', 2, 0, '982'),
(482, 19, '富里鄉', 2, 0, '983'),
(483, 20, '馬公市', 2, 1, '880'),
(484, 20, '西嶼鄉', 2, 1, '881'),
(485, 20, '望安鄉', 2, 1, '882'),
(486, 20, '七美鄉', 2, 1, '883'),
(487, 20, '白沙鄉', 2, 1, '884'),
(488, 20, '湖西鄉', 2, 1, '885'),
(489, 21, '金沙鎮', 1, 0, '890'),
(490, 21, '金湖鎮', 1, 0, '891'),
(491, 21, '金寧鄉', 1, 0, '892'),
(492, 21, '金城鎮', 1, 0, '893'),
(493, 21, '烈嶼鄉', 1, 0, '894'),
(494, 21, '烏坵鄉', 1, 0, '896'),
(495, 22, '南竿鄉', 1, 0, '209'),
(496, 22, '北竿鄉', 1, 0, '210'),
(497, 22, '莒光鄉', 1, 0, '211'),
(498, 22, '東引鄉', 1, 0, '212');

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

--
-- 資料表結構 `ecs_reg_extend_info`
--

CREATE TABLE `ecs_reg_extend_info` (
  `Id` int UNSIGNED NOT NULL,
  `user_id` mediumint UNSIGNED NOT NULL,
  `reg_field_id` int UNSIGNED NOT NULL,
  `content` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- 資料表結構 `ecs_reg_fields`
--

CREATE TABLE `ecs_reg_fields` (
  `id` tinyint UNSIGNED NOT NULL,
  `reg_field_name` varchar(60) NOT NULL,
  `dis_order` tinyint UNSIGNED NOT NULL DEFAULT '100',
  `display` tinyint UNSIGNED NOT NULL DEFAULT '1',
  `type` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `is_need` tinyint UNSIGNED NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- 傾印資料表的資料 `ecs_reg_fields`
--


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

--
-- 資料表結構 `ecs_role`
--

CREATE TABLE `ecs_role` (
  `role_id` smallint UNSIGNED NOT NULL,
  `role_name` varchar(60) NOT NULL DEFAULT '',
  `action_list` text NOT NULL,
  `role_describe` text
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- 傾印資料表的資料 `ecs_role`
--

INSERT INTO `ecs_role` (`role_id`, `role_name`, `action_list`, `role_describe`) VALUES
(1, '管理員', 'goods_manage,remove_back,cat_manage,cat_drop,attr_manage,brand_manage,comment_priv,goods_type,tag_manage,goods_auto,virualcard,picture_batch,goods_export,goods_batch,gen_goods_script,article_cat,article_manage,shopinfo_manage,shophelp_manage,vote_priv,article_auto,integrate_users,sync_users,users_manage,users_drop,user_rank,feedback_priv,surplus_manage,account_manage,admin_manage,admin_drop,allot_priv,logs_manage,logs_drop,template_manage,agency_manage,suppliers_manage,role_manage,shop_config,ship_manage,payment,shiparea_manage,area_manage,friendlink,db_backup,db_renew,flash_manage,navigator,cron,affiliate,affiliate_ck,sitemap,file_priv,file_check,reg_fields,shop_authorized,webcollect_manage,order_os_edit,order_ps_edit,order_ss_edit,order_edit,order_view,order_view_finished,repay_manage,booking,sale_order_stats,client_flow_stats,delivery_view,back_view,topic_manage,snatch_manage,bonus_manage,gift_manage,card_manage,pack,ad_manage,auction,group_by,favourable,whole_sale,package_manage,exchange_goods,pre_sale,attention_list,email_list,magazine_list,view_sendlist,template_select,template_setup,library_manage,lang_edit,backup_setting,mail_template,db_backup,db_renew,db_optimize,sql_query,convert,sms_send', '系統管理員');

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

--
-- 資料表結構 `ecs_searchengine`
--

CREATE TABLE `ecs_searchengine` (
  `date` date NOT NULL DEFAULT '0000-00-00',
  `searchengine` varchar(20) NOT NULL DEFAULT '',
  `count` mediumint UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- 傾印資料表的資料 `ecs_searchengine`
--

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

--
-- 資料表結構 `ecs_sessions`
--

CREATE TABLE `ecs_sessions` (
  `sesskey` char(32) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
  `expiry` int UNSIGNED NOT NULL DEFAULT '0',
  `userid` mediumint UNSIGNED NOT NULL DEFAULT '0',
  `adminid` mediumint UNSIGNED NOT NULL DEFAULT '0',
  `ip` char(15) NOT NULL DEFAULT '',
  `user_name` varchar(60) NOT NULL,
  `user_rank` tinyint NOT NULL,
  `discount` decimal(3,2) NOT NULL,
  `email` varchar(60) NOT NULL,
  `data` char(255) NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- 傾印資料表的資料 `ecs_sessions`
--

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

--
-- 資料表結構 `ecs_sessions_data`
--

CREATE TABLE `ecs_sessions_data` (
  `sesskey` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
  `expiry` int UNSIGNED NOT NULL DEFAULT '0',
  `data` longtext NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- 傾印資料表的資料 `ecs_sessions_data`
--

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

--
-- 資料表結構 `ecs_shipping`
--

CREATE TABLE `ecs_shipping` (
  `shipping_id` tinyint UNSIGNED NOT NULL COMMENT '自增ID',
  `shipping_code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '物流代碼',
  `shipping_name` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '物流名稱',
  `shipping_desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '物流描述',
  `insure` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '0' COMMENT '保價',
  `support_cod` tinyint UNSIGNED NOT NULL DEFAULT '0' COMMENT '支援貨到付款',
  `shipping_fee` decimal(10,0) NOT NULL DEFAULT '0' COMMENT '運費',
  `shipping_config_field` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci COMMENT '物流設定欄位',
  `shipping_config` text COMMENT '物流設定檔',
  `enabled` tinyint UNSIGNED NOT NULL DEFAULT '0' COMMENT '是否有效',
  `shipping_print` text NOT NULL,
  `print_bg` varchar(255) DEFAULT NULL,
  `config_lable` text,
  `print_model` tinyint(1) DEFAULT '0',
  `is_test` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否為正式環境(0:測試,1:正式)',
  `shipping_order` tinyint UNSIGNED NOT NULL DEFAULT '0' COMMENT '排序'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- 傾印資料表的資料 `ecs_shipping`
--

INSERT INTO `ecs_shipping` (`shipping_id`, `shipping_code`, `shipping_name`, `shipping_desc`, `insure`, `support_cod`, `shipping_fee`, `shipping_config_field`, `shipping_config`, `enabled`, `shipping_print`, `print_bg`, `config_lable`, `print_model`, `is_test`, `shipping_order`) VALUES
(1, 'shipping', '宅配到府', '配送的運費是固定的', '0', 0, '10', NULL, '{}', 1, '', '', '', 2, 1, 20),
(2, 'ecpay', '超商取貨', '綠界超商取貨', '0', 1, '20', '[{\"name\":\"特店編號\",\"key\":\"MerchantId\"},{\"name\":\"HashKey\",\"key\":\"HashKey\"},\r\n{\"name\":\"HashIV\",\"key\":\"HashIv\"},\r\n{\"name\":\"寄件者姓名\",\"note\":\"退回時需身份證取貨，勿填公司名\",\"key\":\"SenderName\"},\r\n{\"name\":\"寄件者電話\",\"note\":\"退貨簡訊通知\",\"key\":\"SenderPhone\"}]', '{\"MerchantId\":\"3307480\",\"HashKey\":\"q5hFjEplGMphnyyi\",\"HashIv\":\"XldG9XzU8wwBJ2bC\",\"SenderPhone\":\"0915810309\",\"SenderName\":\"胡瑋仁\"}', 1, '', '', '', 2, 0, 10),
(3, 'self', '自取', '', '0', 1, '10', NULL, '{}', 0, '', '', '', 2, 0, 30);

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

--
-- 資料表結構 `ecs_shipping_area`
--

CREATE TABLE `ecs_shipping_area` (
  `shipping_area_id` smallint UNSIGNED NOT NULL,
  `shipping_area_name` varchar(150) NOT NULL DEFAULT '',
  `shipping_id` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `configure` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- 傾印資料表的資料 `ecs_shipping_area`
--

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

--
-- 資料表結構 `ecs_shop_config`
--

CREATE TABLE `ecs_shop_config` (
  `id` smallint UNSIGNED NOT NULL,
  `parent_id` smallint UNSIGNED NOT NULL DEFAULT '0',
  `code` varchar(30) NOT NULL DEFAULT '',
  `type` varchar(10) NOT NULL DEFAULT '',
  `store_range` varchar(255) NOT NULL DEFAULT '',
  `store_dir` varchar(255) NOT NULL DEFAULT '',
  `value` text NOT NULL,
  `sort_order` tinyint UNSIGNED NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- 傾印資料表的資料 `ecs_shop_config`
--

INSERT INTO `ecs_shop_config` (`id`, `parent_id`, `code`, `type`, `store_range`, `store_dir`, `value`, `sort_order`) VALUES
(1, 0, 'shop_info', 'group', '', '', '', 1),
(2, 0, 'basic', 'group', '', '', '', 1),
(3, 0, 'display', 'group', '', '', '', 1),
(4, 0, 'shopping_flow', 'group', '', '', '', 1),
(5, 0, 'smtp', 'group', '', '', '', 1),
(6, 0, 'hidden', 'hidden', '', '', '', 1),
(7, 0, 'goods', 'group', '', '', '', 1),
(90, 0, 'ecsdxt', 'group', '', '', '', 1),
(101, 1, 'shop_name', 'text', '', '', '電商', 1),
(102, 1, 'shop_title', 'text', '', '', '電商網站', 1),
(103, 1, 'shop_desc', 'text', '', '', '電商網站', 1),
(104, 1, 'shop_keywords', 'text', '', '', '', 1),
(108, 1, 'shop_address', 'text', '', '', '', 1),
(112, 1, 'line', 'text', '', '', '', 1),
(113, 1, 'service_company', 'text', '', '', '匯康科技', 1),
(114, 1, 'service_email', 'text', '', '', 'reigns@cityagogo.com.tw', 1),
(115, 1, 'service_phone', 'text', '', '', '0915810309', 1),
(116, 1, 'shop_closed', 'select', '0,1', '', '0', 1),
(117, 1, 'close_comment', 'textarea', '', '', '商店盤點中，請稍後', 1),
(118, 1, 'shop_logo', 'file', '', '../themes/{$template}/images/', '../themes/mb5_com_cn/images/logo.gif', 1),
(120, 1, 'user_notice', 'textarea', '', '', '用户中心公告！', 1),
(121, 1, 'shop_notice', 'textarea', '', '', '', 1),
(122, 1, 'shop_reg_closed', 'select', '1,0', '', '0', 1),
(201, 2, 'lang', 'manual', '', '', 'zh_tw', 1),
(204, 2, 'watermark', 'file', '', '../images/', '../images/watermark.gif', 1),
(205, 2, 'watermark_place', 'select', '0,1,2,3,4,5', '', '5', 1),
(206, 2, 'watermark_alpha', 'text', '', '', '50', 1),
(207, 2, 'use_storage', 'select', '1,0', '', '1', 1),
(208, 2, 'market_price_rate', 'text', '', '', '1.2', 1),
(209, 2, 'rewrite', 'select', '0,1,2', '', '0', 1),
(210, 2, 'integral_name', 'text', '', '', '金幣', 1),
(211, 2, 'integral_scale', 'text', '', '', '1', 1),
(212, 2, 'integral_percent', 'text', '', '', '100', 1),
(213, 2, 'sn_prefix', 'text', '', '', 'MDZ', 1),
(214, 2, 'comment_check', 'select', '0,1', '', '1', 1),
(215, 2, 'no_picture', 'file', '', '../images/', '', 1),
(218, 2, 'stats_code', 'textarea', '', '', '', 1),
(219, 2, 'cache_time', 'text', '', '', '1800', 1),
(220, 2, 'register_points', 'text', '', '', '5', 1),
(221, 2, 'enable_gzip', 'select', '0,1', '', '1', 1),
(222, 2, 'top10_time', 'select', '0,1,2,3,4', '', '0', 1),
(223, 2, 'timezone', 'options', '-12,-11,-10,-9,-8,-7,-6,-5,-4,-3.5,-3,-2,-1,0,1,2,3,3.5,4,4.5,5,5.5,5.75,6,6.5,7,8,9,9.5,10,11,12', '', '8', 1),
(224, 2, 'upload_size_limit', 'options', '-1,0,64,128,256,512,1024,2048,4096', '', '4096', 1),
(226, 2, 'cron_method', 'select', '0,1', '', '0', 1),
(227, 2, 'comment_factor', 'select', '0,1,2,3', '', '3', 1),
(228, 2, 'enable_order_check', 'select', '0,1', '', '1', 1),
(229, 2, 'default_storage', 'text', '', '', '500', 1),
(230, 2, 'bgcolor', 'text', '', '', '#FFFFFF', 1),
(231, 2, 'visit_stats', 'select', 'on,off', '', 'on', 1),
(232, 2, 'send_mail_on', 'select', 'on,off', '', 'off', 1),
(233, 2, 'auto_generate_gallery', 'select', '1,0', '', '1', 1),
(234, 2, 'retain_original_img', 'select', '1,0', '', '1', 1),
(235, 2, 'member_email_validate', 'select', '1,0', '', '0', 1),
(236, 2, 'message_board', 'select', '1,0', '', '1', 1),
(240, 2, 'token', 'hidden', '', '', '1d825bf072672566d6961b48d26b44378a5aff73417223d90a4a43327b17bfdc', 1),
(242, 2, 'send_verify_email', 'select', '1,0', '', '0', 1),
(243, 2, 'ent_id', 'hidden', '', '', '', 1),
(244, 2, 'ent_ac', 'hidden', '', '', '', 1),
(245, 2, 'ent_sign', 'hidden', '', '', '', 1),
(246, 2, 'ent_email', 'hidden', '', '', '', 1),
(301, 3, 'date_format', 'hidden', '', '', 'Y-m-d', 1),
(302, 3, 'time_format', 'text', '', '', 'Y-m-d H:i:s', 1),
(303, 3, 'currency_format', 'text', '', '', '<font>NT$%s</font>', 1),
(304, 3, 'thumb_width', 'text', '', '', '400', 1),
(305, 3, 'thumb_height', 'text', '', '', '400', 1),
(306, 3, 'image_width', 'text', '', '', '230', 1),
(307, 3, 'image_height', 'text', '', '', '230', 1),
(312, 3, 'top_number', 'text', '', '', '10', 1),
(313, 3, 'history_number', 'text', '', '', '5', 1),
(314, 3, 'comments_number', 'text', '', '', '5', 1),
(315, 3, 'bought_goods', 'text', '', '', '5', 1),
(316, 3, 'article_number', 'text', '', '', '5', 1),
(317, 3, 'goods_name_length', 'text', '', '', '30', 1),
(318, 3, 'price_format', 'select', '0,1,2,3,4,5', '', '0', 1),
(319, 3, 'page_size', 'text', '', '', '11', 1),
(320, 3, 'sort_order_type', 'select', '0,1,2', '', '0', 1),
(321, 3, 'sort_order_method', 'select', '0,1', '', '0', 1),
(322, 3, 'show_order_type', 'select', '0,1,2', '', '1', 1),
(323, 3, 'attr_related_number', 'text', '', '', '5', 1),
(324, 3, 'goods_gallery_number', 'text', '', '', '5', 1),
(325, 3, 'article_title_length', 'text', '', '', '15', 1),
(326, 3, 'name_of_region_1', 'text', '', '', '國家', 1),
(327, 3, 'name_of_region_2', 'text', '', '', '省', 1),
(328, 3, 'name_of_region_3', 'text', '', '', '市', 1),
(329, 3, 'name_of_region_4', 'text', '', '', '區', 1),
(330, 3, 'search_keywords', 'text', '', '', '', 0),
(332, 3, 'related_goods_number', 'text', '', '', '4', 1),
(333, 3, 'help_open', 'select', '0,1', '', '1', 1),
(334, 3, 'article_page_size', 'text', '', '', '5', 1),
(335, 3, 'page_style', 'select', '0,1', '', '1', 1),
(336, 3, 'recommend_order', 'select', '0,1', '', '0', 1),
(337, 3, 'index_ad', 'hidden', '', '', 'sys', 1),
(401, 4, 'can_invoice', 'select', '1,0', '', '1', 1),
(402, 4, 'use_integral', 'select', '1,0', '', '1', 1),
(403, 4, 'use_bonus', 'select', '1,0', '', '1', 1),
(404, 4, 'use_surplus', 'select', '1,0', '', '1', 1),
(405, 4, 'use_how_oos', 'select', '1,0', '', '1', 1),
(406, 4, 'send_confirm_email', 'select', '1,0', '', '0', 1),
(407, 4, 'send_ship_email', 'select', '1,0', '', '0', 1),
(408, 4, 'send_cancel_email', 'select', '1,0', '', '0', 1),
(409, 4, 'send_invalid_email', 'select', '1,0', '', '0', 1),
(410, 4, 'order_pay_note', 'select', '1,0', '', '1', 1),
(411, 4, 'order_unpay_note', 'select', '1,0', '', '1', 1),
(412, 4, 'order_ship_note', 'select', '1,0', '', '1', 1),
(413, 4, 'order_receive_note', 'select', '1,0', '', '1', 1),
(414, 4, 'order_unship_note', 'select', '1,0', '', '1', 1),
(415, 4, 'order_return_note', 'select', '1,0', '', '1', 1),
(416, 4, 'order_invalid_note', 'select', '1,0', '', '1', 1),
(417, 4, 'order_cancel_note', 'select', '1,0', '', '0', 1),
(418, 4, 'invoice_content', 'textarea', '', '', '購物清單', 1),
(419, 4, 'anonymous_buy', 'select', '1,0', '', '0', 1),
(420, 4, 'min_goods_amount', 'text', '', '', '0', 1),
(421, 4, 'one_step_buy', 'select', '1,0', '', '0', 1),
(422, 4, 'invoice_type', 'manual', '', '', 'a:2:{s:4:\"type\";a:3:{i:0;s:41:\"增值税普通發票(小規模納税人)\";i:1;s:38:\"增值税專用發票(一般納税人)\";i:2;s:0:\"\";}s:4:\"rate\";a:3:{i:0;d:1.5;i:1;d:3;i:2;d:0;}}', 1),
(423, 4, 'stock_dec_time', 'select', '1,0', '', '0', 1),
(424, 4, 'cart_confirm', 'options', '1,2,3,4', '', '4', 0),
(425, 4, 'send_service_email', 'select', '1,0', '', '0', 1),
(426, 4, 'show_goods_in_cart', 'select', '1,2,3', '', '3', 1),
(427, 4, 'show_attr_in_cart', 'select', '1,0', '', '1', 1),
(501, 5, 'smtp_host', 'text', '', '', 'smtp.qq.com', 1),
(502, 5, 'smtp_port', 'text', '', '', '25', 1),
(503, 5, 'smtp_user', 'text', '', '', '', 1),
(504, 5, 'smtp_pass', 'password', '', '', '', 1),
(505, 5, 'smtp_mail', 'text', '', '', '', 1),
(506, 5, 'mail_charset', 'select', 'UTF8,GB2312,BIG5', '', 'UTF8', 1),
(507, 5, 'mail_service', 'select', '0,1', '', '1', 0),
(508, 5, 'smtp_ssl', 'select', '0,1', '', '0', 0),
(601, 6, 'integrate_code', 'hidden', '', '', 'shop', 1),
(602, 6, 'integrate_config', 'hidden', '', '', '', 1),
(603, 6, 'hash_code', 'hidden', '', '', '2aab9f77cc5ab4694b2b6009f5785883', 1),
(604, 6, 'template', 'hidden', '', '', 'shengxian', 1),
(605, 6, 'install_date', 'hidden', '', '', '1447726949', 1),
(606, 6, 'ecs_version', 'hidden', '', '', 'v2.7.3', 1),
(607, 6, 'sms_user_name', 'hidden', '', '', '', 1),
(608, 6, 'sms_password', 'hidden', '', '', '', 1),
(609, 6, 'sms_auth_str', 'hidden', '', '', '', 1),
(610, 6, 'sms_domain', 'hidden', '', '', '', 1),
(611, 6, 'sms_count', 'hidden', '', '', '', 1),
(612, 6, 'sms_total_money', 'hidden', '', '', '', 1),
(613, 6, 'sms_balance', 'hidden', '', '', '', 1),
(614, 6, 'sms_last_request', 'hidden', '', '', '', 1),
(616, 6, 'affiliate', 'hidden', '', '', '{\"on\":\"1\",\"config\":{\"separator_type\":\"1\",\"expire\":\"24\",\"expire_unit\":\"hour\",\"level_money_all\":\"100\",\"level_point_all\":\"0\",\"level_register_all\":\"0\",\"level_register_up\":\"0\"},\"item\":[{\"level_money\":\"40\",\"level_point\":\"0\"},{\"level_money\":\"5\",\"level_point\":\"0\"},{\"level_money\":\"3\",\"level_point\":\"0\"},{\"level_money\":\"2\",\"level_point\":\"0\"}]}', 1),
(617, 6, 'captcha', 'hidden', '', '', '47', 1),
(618, 6, 'captcha_width', 'hidden', '', '', '100', 1),
(619, 6, 'captcha_height', 'hidden', '', '', '20', 1),
(620, 6, 'sitemap', 'hidden', '', '', 'a:6:{s:19:\"homepage_changefreq\";s:6:\"hourly\";s:17:\"homepage_priority\";s:3:\"0.9\";s:19:\"category_changefreq\";s:6:\"hourly\";s:17:\"category_priority\";s:3:\"0.8\";s:18:\"content_changefreq\";s:6:\"weekly\";s:16:\"content_priority\";s:3:\"0.7\";}', 0),
(621, 6, 'points_rule', 'hidden', '', '', '', 0),
(622, 6, 'flash_theme', 'hidden', '', '', 'dynfocus', 1),
(623, 6, 'stylename', 'hidden', '', '', '', 1),
(701, 7, 'show_goodssn', 'select', '1,0', '', '0', 1),
(702, 7, 'show_brand', 'select', '1,0', '', '1', 1),
(703, 7, 'show_goodsweight', 'select', '1,0', '', '0', 1),
(704, 7, 'show_goodsnumber', 'select', '1,0', '', '1', 1),
(705, 7, 'show_addtime', 'select', '1,0', '', '0', 1),
(706, 7, 'goodsattr_style', 'select', '1,0', '', '1', 1),
(707, 7, 'show_marketprice', 'select', '1,0', '', '1', 1),
(903, 2, 'message_check', 'select', '1,0', '', '1', 1),
(1019, 1, 'okback_time', 'text', '', '', '3', 1),
(1020, 1, 'delback_time', 'text', '', '', '3', 1),
(1021, 1, 'weixiu_time', 'text', '', '', '2', 1),
(9001, 9011, 'ecsdxt_gateway', 'options', '1,2', '', '1', 1),
(9002, 90, 'ecsdxt_user_name', 'text', '', '', 'limingsheng', 1),
(9003, 90, 'ecsdxt_pass_word', 'password', '', '', '111222', 1),
(9004, 90, 'ecsdxt_shop_mobile', 'text', '', '', '15916852053', 1),
(9005, 90, 'ecsdxt_smsgap', 'text', '', '', '60', 1),
(9006, 90, 'ecsdxt_mobile_reg', 'select', '1,0', '', '0', 1),
(9007, 90, 'ecsdxt_mobile_reg_value', 'textarea', '', '', '您的手機號：{$user_mobile}，註冊驗證碼：{$verify_code}，24小時內提交有效。感謝您的註冊！', 1),
(9008, 90, 'ecsdxt_mobile_log', 'select', '1,0', '', '0', 1),
(9009, 90, 'ecsdxt_mobile_pwd', 'select', '1,0', '', '0', 1),
(9010, 90, 'ecsdxt_mobile_pwd_value', 'textarea', '', '', '您的用户名：{$user_name}，新密碼：{$new_password}。請及時登陸修改密碼！', 1),
(9011, 90, 'ecsdxt_mobile_changepwd', 'select', '1,0', '', '0', 1),
(9012, 90, 'ecsdxt_mobile_changepwd_value', 'textarea', '', '', '您的用户名：{$user_name}，密碼已修改，新密碼：{$new_password}。請牢記新密碼！', 1),
(9013, 90, 'ecsdxt_mobile_bind', 'select', '1,0', '', '0', 1),
(9014, 90, 'ecsdxt_mobile_bind_value', 'textarea', '', '', '您的手機號：{$user_mobile}，綁定驗證碼：{$verify_code}。一天內提交有效！', 1),
(9015, 90, 'ecsdxt_mobile_cons', 'select', '1,0', '', '0', 1),
(9016, 90, 'ecsdxt_customer_registed', 'select', '1,0', '', '0', 1),
(9017, 90, 'ecsdxt_customer_registed_value', 'textarea', '', '', '您註冊的用户名：{$user_name}，密碼：{$user_pwd}。感謝您的註冊！', 1),
(9018, 90, 'ecsdxt_order_placed', 'select', '1,0', '', '0', 1),
(9019, 90, 'ecsdxt_order_placed_value', 'textarea', '', '', '您有新的訂單：{$order_sn}，收貨人：{$consignee}，電話：{$tel}，請及時確認訂單！', 1),
(9020, 90, 'ecsdxt_order_canceled', 'select', '1,0', '', '0', 1),
(9021, 90, 'ecsdxt_order_canceled_value', 'textarea', '', '', '訂單號 ：{$order_sn} 買家已取消訂單！', 1),
(9022, 90, 'ecsdxt_order_payed', 'select', '1,0', '', '0', 1),
(9023, 90, 'ecsdxt_order_payed_value', 'textarea', '', '', '訂單號 ：{$order_sn} 買家付款了。收貨人：{$consignee}，電話：{$tel}。請及時安排發貨！', 1),
(9024, 90, 'ecsdxt_order_confirm', 'select', '1,0', '', '0', 1),
(9025, 90, 'ecsdxt_order_confirm_value', 'textarea', '', '', '訂單號 ：{$order_sn} 買家已確認收貨！', 1),
(9026, 90, 'ecsdxt_customer_placed', 'select', '1,0', '', '0', 1),
(9027, 90, 'ecsdxt_customer_placed_value', 'textarea', '', '', '您的訂單：{$order_sn}，收貨人：{$consignee} 電話：{$tel}，已經成功提交。感謝您的購買！', 1),
(9028, 90, 'ecsdxt_customer_canceled', 'select', '1,0', '', '0', 1),
(9029, 90, 'ecsdxt_customer_canceled_value', 'textarea', '', '', '您的訂單：{$order_sn}，已取消！', 1),
(9030, 90, 'ecsdxt_customer_payed', 'select', '1,0', '', '0', 1),
(9031, 90, 'ecsdxt_customer_payed_value', 'textarea', '', '', '您的訂單：{$order_sn}，已於{$time}付款成功。感謝您的購買！', 1),
(9032, 90, 'ecsdxt_customer_confirm', 'select', '1,0', '', '0', 1),
(9033, 90, 'ecsdxt_customer_confirm_value', 'textarea', '', '', '您的訂單：{$order_sn}，確認收貨成功。感謝您購買與支持，歡迎您下次光臨！', 1),
(9034, 90, 'ecsdxt_order_picking', 'select', '1,0', '', '0', 1),
(9035, 90, 'ecsdxt_order_picking_value', 'textarea', '', '', '訂單號：{$order_sn} 已於{$time}配貨。如有問題請及時聯繫！', 1),
(9036, 90, 'ecsdxt_order_shipped', 'select', '1,0', '', '0', 1),
(9037, 90, 'ecsdxt_order_shipped_value', 'textarea', '', '', '訂單號：{$order_sn} 已於{$time}發貨，如有問題請及時聯繫！', 1),
(9038, 3, 'show_sales_type', 'select', '1,0', '', '0', 1);

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

--
-- 資料表結構 `ecs_snatch_log`
--

CREATE TABLE `ecs_snatch_log` (
  `log_id` mediumint UNSIGNED NOT NULL,
  `snatch_id` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `user_id` mediumint UNSIGNED NOT NULL DEFAULT '0',
  `bid_price` decimal(10,2) NOT NULL DEFAULT '0.00',
  `bid_time` int UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- 資料表結構 `ecs_stats`
--

CREATE TABLE `ecs_stats` (
  `access_time` int UNSIGNED NOT NULL DEFAULT '0',
  `ip_address` varchar(15) NOT NULL DEFAULT '',
  `visit_times` smallint UNSIGNED NOT NULL DEFAULT '1',
  `browser` varchar(60) NOT NULL DEFAULT '',
  `os` varchar(20) NOT NULL DEFAULT '',
  `language` varchar(20) NOT NULL DEFAULT '',
  `area` varchar(30) NOT NULL DEFAULT '',
  `referer_domain` varchar(100) NOT NULL DEFAULT '',
  `referer_path` varchar(200) NOT NULL DEFAULT '',
  `access_url` varchar(255) NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- 傾印資料表的資料 `ecs_stats`
--

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

--
-- 資料表結構 `ecs_suppliers`
--

CREATE TABLE `ecs_suppliers` (
  `suppliers_id` smallint UNSIGNED NOT NULL,
  `suppliers_name` varchar(255) DEFAULT NULL,
  `suppliers_desc` mediumtext,
  `is_check` tinyint UNSIGNED NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- 資料表結構 `ecs_tag`
--

CREATE TABLE `ecs_tag` (
  `tag_id` mediumint NOT NULL,
  `user_id` mediumint UNSIGNED NOT NULL DEFAULT '0',
  `goods_id` mediumint UNSIGNED NOT NULL DEFAULT '0',
  `tag_words` varchar(255) NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- 傾印資料表的資料 `ecs_tag`
--

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

--
-- 資料表結構 `ecs_template`
--

CREATE TABLE `ecs_template` (
  `filename` varchar(30) NOT NULL DEFAULT '',
  `region` varchar(40) NOT NULL DEFAULT '',
  `library` varchar(40) NOT NULL DEFAULT '',
  `sort_order` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `id` smallint UNSIGNED NOT NULL DEFAULT '0',
  `number` tinyint UNSIGNED NOT NULL DEFAULT '5',
  `type` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `theme` varchar(60) NOT NULL DEFAULT '',
  `remarks` varchar(30) NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- 傾印資料表的資料 `ecs_template`
--

INSERT INTO `ecs_template` (`filename`, `region`, `library`, `sort_order`, `id`, `number`, `type`, `theme`, `remarks`) VALUES
('index', '首頁圖片文章列表', '/library/cat_articles.lbi', 0, 16, 4, 3, 'shengxian', ''),
('index', '分類下產品區域', '/library/cat_goods.lbi', 5, 6, 8, 1, 'shengxian', ''),
('index', '分類下產品區域', '/library/cat_goods.lbi', 4, 5, 8, 1, 'shengxian', ''),
('index', '分類下產品區域', '/library/cat_goods.lbi', 3, 4, 8, 1, 'shengxian', ''),
('index', '分類下產品區域', '/library/cat_goods.lbi', 2, 3, 8, 1, 'shengxian', ''),
('index', '分類下產品區域', '/library/cat_goods.lbi', 1, 2, 8, 1, 'shengxian', ''),
('index', '分類下產品區域', '/library/cat_goods.lbi', 0, 1, 8, 1, 'shengxian', ''),
('index', '', '/library/brands.lbi', 0, 0, 16, 0, 'shengxian', ''),
('index', '', '/library/auction.lbi', 0, 0, 5, 0, 'shengxian', ''),
('index', '', '/library/group_buy.lbi', 0, 0, 5, 0, 'shengxian', ''),
('index', '', '/library/recommend_promotion.lbi', 0, 0, 5, 0, 'shengxian', ''),
('index', '', '/library/recommend_hot.lbi', 0, 0, 5, 0, 'shengxian', ''),
('index', '', '/library/recommend_new.lbi', 0, 0, 5, 0, 'shengxian', ''),
('index', '', '/library/recommend_best.lbi', 0, 0, 5, 0, 'shengxian', '');

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

--
-- 資料表結構 `ecs_temp_order`
--

CREATE TABLE `ecs_temp_order` (
  `id` int NOT NULL COMMENT '自增ID',
  `sn` varchar(255) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
  `user_id` varchar(100) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '用戶ID'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- 資料表結構 `ecs_topic`
--

CREATE TABLE `ecs_topic` (
  `topic_id` int UNSIGNED NOT NULL,
  `title` varchar(255) NOT NULL DEFAULT '''''',
  `intro` text NOT NULL,
  `start_time` int NOT NULL DEFAULT '0',
  `end_time` int NOT NULL DEFAULT '0',
  `data` text NOT NULL,
  `template` varchar(255) NOT NULL DEFAULT '''''',
  `css` text NOT NULL,
  `topic_img` varchar(255) DEFAULT NULL,
  `title_pic` varchar(255) DEFAULT NULL,
  `base_style` char(6) DEFAULT NULL,
  `htmls` mediumtext,
  `keywords` varchar(255) DEFAULT NULL,
  `description` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- 資料表結構 `ecs_users`
--

CREATE TABLE `ecs_users` (
  `user_id` mediumint UNSIGNED NOT NULL COMMENT '自增ID',
  `sso_user_id` varchar(100) NOT NULL DEFAULT '' COMMENT '統一uid',
  `email` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT 'Email信箱',
  `user_name` varchar(60) NOT NULL DEFAULT '' COMMENT '用戶帳號',
  `password` varchar(32) NOT NULL DEFAULT '' COMMENT '用戶密碼',
  `headimg` varchar(255) DEFAULT '' COMMENT '用戶照片',
  `sex` tinyint UNSIGNED NOT NULL DEFAULT '0' COMMENT '性別',
  `birthday` date NOT NULL DEFAULT '0000-00-00' COMMENT '生日',
  `user_money` decimal(10,0) NOT NULL DEFAULT '0' COMMENT '用戶餘額',
  `frozen_money` decimal(10,0) NOT NULL DEFAULT '0' COMMENT '凍結金額',
  `pay_points` int UNSIGNED NOT NULL DEFAULT '0' COMMENT '紅利點數',
  `rank_points` int UNSIGNED NOT NULL DEFAULT '0' COMMENT '等級點數',
  `address_id` mediumint UNSIGNED NOT NULL DEFAULT '0' COMMENT '住址 id',
  `reg_time` int UNSIGNED NOT NULL DEFAULT '0' COMMENT '註冊時間',
  `last_login` int UNSIGNED NOT NULL DEFAULT '0' COMMENT '最後登入時間',
  `last_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `last_ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '最後登入IP',
  `visit_count` smallint UNSIGNED NOT NULL DEFAULT '0',
  `user_rank` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `is_special` tinyint UNSIGNED NOT NULL DEFAULT '0' COMMENT '特別客戶',
  `ec_salt` varchar(10) DEFAULT NULL,
  `salt` varchar(10) NOT NULL DEFAULT '0',
  `refer_code` varchar(20) DEFAULT NULL COMMENT '推薦代碼',
  `parent_id` varchar(255) NOT NULL DEFAULT '' COMMENT '推薦人id',
  `flag` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `real_name` varchar(10) NOT NULL DEFAULT '' COMMENT '真實姓名',
  `alias` varchar(60) NOT NULL DEFAULT '',
  `line` varchar(60) NOT NULL DEFAULT '',
  `facebook` varchar(60) NOT NULL DEFAULT '',
  `office_phone` varchar(20) NOT NULL DEFAULT '',
  `home_phone` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '市話',
  `mobile_phone` varchar(20) NOT NULL COMMENT '行動電話',
  `is_validated` tinyint UNSIGNED NOT NULL DEFAULT '0' COMMENT '是否驗證',
  `is_slash` tinyint NOT NULL DEFAULT '0' COMMENT '是否購買SlashCard',
  `is_resale` tinyint NOT NULL DEFAULT '0' COMMENT '是否為分銷商',
  `credit_line` decimal(10,0) UNSIGNED NOT NULL DEFAULT '0' COMMENT '信用額度',
  `line_id` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT 'Line ID',
  `line_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT 'Line NickName',
  `line_picture` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT 'Line頭像'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- 傾印資料表的資料 `ecs_users`
--

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

--
-- 資料表結構 `ecs_users_auth`
--

CREATE TABLE `ecs_users_auth` (
  `id` int UNSIGNED NOT NULL,
  `user_id` int UNSIGNED NOT NULL DEFAULT '0',
  `user_name` varchar(60) NOT NULL,
  `identity_type` varchar(32) NOT NULL,
  `identifier` varchar(128) NOT NULL,
  `credential` varchar(128) NOT NULL,
  `verified` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `add_time` int UNSIGNED NOT NULL DEFAULT '0',
  `update_time` int NOT NULL DEFAULT '0',
  `type` tinyint(1) DEFAULT '1' COMMENT '1=PC 或者 手機'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- 資料表結構 `ecs_user_account`
--

CREATE TABLE `ecs_user_account` (
  `id` mediumint UNSIGNED NOT NULL COMMENT '自增ID',
  `user_id` mediumint UNSIGNED NOT NULL DEFAULT '0' COMMENT 'User ID',
  `admin_user` varchar(255) NOT NULL DEFAULT '' COMMENT '管理員ID',
  `amount` decimal(10,0) NOT NULL DEFAULT '0' COMMENT '金額',
  `add_time` int NOT NULL DEFAULT '0' COMMENT '新增時間',
  `paid_time` int NOT NULL DEFAULT '0' COMMENT '支付時間',
  `admin_note` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '管理員備註',
  `user_note` varchar(255) NOT NULL DEFAULT '' COMMENT '客戶備註',
  `process_type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '類型',
  `payment` varchar(90) NOT NULL DEFAULT '',
  `is_paid` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否支付(0,未支付，1：已支付,2:取消)'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- 資料表結構 `ecs_user_address`
--

CREATE TABLE `ecs_user_address` (
  `address_id` mediumint UNSIGNED NOT NULL COMMENT '自增ID',
  `address_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '名稱',
  `user_id` mediumint UNSIGNED NOT NULL DEFAULT '0' COMMENT '客戶編號',
  `consignee` varchar(60) NOT NULL DEFAULT '',
  `email` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT 'Email',
  `city` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '縣市',
  `district` varchar(255) NOT NULL DEFAULT '' COMMENT '區',
  `address` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '地址',
  `zipcode` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '郵遞區號',
  `tel` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '電話',
  `mobile` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '手機',
  `sign_building` varchar(120) NOT NULL DEFAULT '',
  `best_time` varchar(120) NOT NULL DEFAULT '',
  `is_default` tinyint NOT NULL DEFAULT '0' COMMENT '預設地址'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- 資料表結構 `ecs_user_bank`
--

CREATE TABLE `ecs_user_bank` (
  `id` int NOT NULL COMMENT '自增ID',
  `user_id` int NOT NULL COMMENT '客戶ID',
  `bank_name` varchar(100) NOT NULL COMMENT '銀行名稱',
  `bank_code` varchar(10) NOT NULL COMMENT '銀行代碼',
  `bank_account` varchar(100) NOT NULL COMMENT '銀行帳號'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- 資料表結構 `ecs_user_bonus`
--

CREATE TABLE `ecs_user_bonus` (
  `id` mediumint UNSIGNED NOT NULL,
  `bonus_id` int UNSIGNED NOT NULL DEFAULT '0',
  `bonus_sn` varchar(50) NOT NULL DEFAULT '',
  `user_id` mediumint UNSIGNED NOT NULL DEFAULT '0',
  `used_time` int UNSIGNED NOT NULL DEFAULT '0',
  `order_id` mediumint UNSIGNED NOT NULL DEFAULT '0',
  `emailed` tinyint UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- 傾印資料表的資料 `ecs_user_bonus`
--

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

--
-- 資料表結構 `ecs_user_card`
--

CREATE TABLE `ecs_user_card` (
  `id` int UNSIGNED NOT NULL,
  `user_id` mediumint UNSIGNED NOT NULL DEFAULT '0',
  `ct_id` int UNSIGNED NOT NULL DEFAULT '0',
  `card_level` varchar(60) NOT NULL DEFAULT '',
  `card_no` varchar(60) NOT NULL DEFAULT '',
  `card_pass` varchar(60) NOT NULL DEFAULT '',
  `card_status` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `send_type` varchar(60) NOT NULL DEFAULT '',
  `add_time` int UNSIGNED NOT NULL DEFAULT '0',
  `bind_time` int UNSIGNED NOT NULL DEFAULT '0',
  `user_money` decimal(10,2) NOT NULL DEFAULT '0.00',
  `pay_points` int UNSIGNED NOT NULL DEFAULT '0',
  `rank_points` int UNSIGNED NOT NULL DEFAULT '0',
  `true_name` varchar(60) NOT NULL DEFAULT '',
  `address` varchar(255) NOT NULL DEFAULT '',
  `mobile` varchar(60) NOT NULL DEFAULT '',
  `email` varchar(60) NOT NULL DEFAULT '',
  `sex` varchar(10) NOT NULL DEFAULT '',
  `is_show` int UNSIGNED NOT NULL DEFAULT '0',
  `des` varchar(255) NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- 資料表結構 `ecs_user_card_type`
--

CREATE TABLE `ecs_user_card_type` (
  `ct_id` int UNSIGNED NOT NULL,
  `ct_name` varchar(60) NOT NULL DEFAULT '',
  `des` varchar(255) NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- 資料表結構 `ecs_user_cvs`
--

CREATE TABLE `ecs_user_cvs` (
  `id` int NOT NULL COMMENT '自增ID',
  `user_id` int NOT NULL COMMENT '用戶ID',
  `type` varchar(10) COLLATE utf8mb4_general_ci NOT NULL COMMENT '店家類型',
  `store_id` varchar(10) COLLATE utf8mb4_general_ci NOT NULL COMMENT '店家代號',
  `store_name` varchar(100) COLLATE utf8mb4_general_ci NOT NULL COMMENT '店家名稱',
  `store_address` varchar(255) COLLATE utf8mb4_general_ci NOT NULL COMMENT '店家住址',
  `store_tel` varchar(100) COLLATE utf8mb4_general_ci NOT NULL COMMENT '店家電話',
  `is_default` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否為預設'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- 傾印資料表的資料 `ecs_user_cvs`
--

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

--
-- 資料表結構 `ecs_user_feed`
--

CREATE TABLE `ecs_user_feed` (
  `feed_id` mediumint UNSIGNED NOT NULL,
  `user_id` mediumint UNSIGNED NOT NULL DEFAULT '0',
  `value_id` mediumint UNSIGNED NOT NULL DEFAULT '0',
  `goods_id` mediumint UNSIGNED NOT NULL DEFAULT '0',
  `feed_type` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `is_feed` tinyint UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- 資料表結構 `ecs_user_rank`
--

CREATE TABLE `ecs_user_rank` (
  `rank_id` tinyint UNSIGNED NOT NULL,
  `rank_name` varchar(30) NOT NULL DEFAULT '',
  `min_points` int UNSIGNED NOT NULL DEFAULT '0',
  `max_points` int UNSIGNED NOT NULL DEFAULT '0',
  `discount` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `show_price` tinyint UNSIGNED NOT NULL DEFAULT '1',
  `special_rank` tinyint UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- 傾印資料表的資料 `ecs_user_rank`
--

INSERT INTO `ecs_user_rank` (`rank_id`, `rank_name`, `min_points`, `max_points`, `discount`, `show_price`, `special_rank`) VALUES
(6, '一星用户', 1000, 1999, 95, 1, 0),
(7, '二星用户', 2000, 2999, 90, 1, 0);

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

--
-- 資料表結構 `ecs_verifycode`
--

CREATE TABLE `ecs_verifycode` (
  `id` mediumint UNSIGNED NOT NULL,
  `mobile` char(12) NOT NULL,
  `getip` char(15) NOT NULL,
  `verifycode` char(6) NOT NULL,
  `dateline` int UNSIGNED NOT NULL DEFAULT '0',
  `reguid` mediumint UNSIGNED DEFAULT '0',
  `regdateline` int UNSIGNED DEFAULT '0',
  `status` tinyint(1) NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- 資料表結構 `ecs_virtual_card`
--

CREATE TABLE `ecs_virtual_card` (
  `card_id` mediumint NOT NULL,
  `goods_id` mediumint UNSIGNED NOT NULL DEFAULT '0',
  `card_sn` varchar(60) NOT NULL DEFAULT '',
  `card_password` varchar(60) NOT NULL DEFAULT '',
  `add_date` int NOT NULL DEFAULT '0',
  `end_date` int NOT NULL DEFAULT '0',
  `is_saled` tinyint(1) NOT NULL DEFAULT '0',
  `order_sn` varchar(20) NOT NULL DEFAULT '',
  `crc32` varchar(12) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- 資料表結構 `ecs_volume_price`
--

CREATE TABLE `ecs_volume_price` (
  `price_type` tinyint UNSIGNED NOT NULL,
  `goods_id` mediumint UNSIGNED NOT NULL,
  `volume_number` smallint UNSIGNED NOT NULL DEFAULT '0',
  `volume_price` decimal(10,2) NOT NULL DEFAULT '0.00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- 資料表結構 `ecs_vote`
--

CREATE TABLE `ecs_vote` (
  `vote_id` smallint UNSIGNED NOT NULL,
  `vote_name` varchar(250) NOT NULL DEFAULT '',
  `start_time` int UNSIGNED NOT NULL DEFAULT '0',
  `end_time` int UNSIGNED NOT NULL DEFAULT '0',
  `can_multi` tinyint UNSIGNED NOT NULL DEFAULT '0',
  `vote_count` int UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- 傾印資料表的資料 `ecs_vote`
--

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

--
-- 資料表結構 `ecs_vote_log`
--

CREATE TABLE `ecs_vote_log` (
  `log_id` mediumint UNSIGNED NOT NULL,
  `vote_id` smallint UNSIGNED NOT NULL DEFAULT '0',
  `ip_address` varchar(15) NOT NULL DEFAULT '',
  `vote_time` int UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- 資料表結構 `ecs_vote_option`
--

CREATE TABLE `ecs_vote_option` (
  `option_id` smallint UNSIGNED NOT NULL,
  `vote_id` smallint UNSIGNED NOT NULL DEFAULT '0',
  `option_name` varchar(250) NOT NULL DEFAULT '',
  `option_count` int UNSIGNED NOT NULL DEFAULT '0',
  `option_order` tinyint UNSIGNED NOT NULL DEFAULT '100'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- 資料表結構 `ecs_wholesale`
--

CREATE TABLE `ecs_wholesale` (
  `act_id` mediumint UNSIGNED NOT NULL,
  `goods_id` mediumint UNSIGNED NOT NULL,
  `goods_name` varchar(255) NOT NULL,
  `rank_ids` varchar(255) NOT NULL,
  `prices` text NOT NULL,
  `enabled` tinyint UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- 已傾印資料表的索引
--

--
-- 資料表索引 `ecs_account_log`
--
ALTER TABLE `ecs_account_log`
  ADD PRIMARY KEY (`log_id`),
  ADD KEY `user_id` (`user_id`);

--
-- 資料表索引 `ecs_ad`
--
ALTER TABLE `ecs_ad`
  ADD PRIMARY KEY (`ad_id`),
  ADD KEY `position_id` (`position_id`),
  ADD KEY `enabled` (`enabled`);

--
-- 資料表索引 `ecs_admin_action`
--
ALTER TABLE `ecs_admin_action`
  ADD PRIMARY KEY (`action_id`),
  ADD KEY `parent_id` (`parent_id`);

--
-- 資料表索引 `ecs_admin_log`
--
ALTER TABLE `ecs_admin_log`
  ADD PRIMARY KEY (`log_id`),
  ADD KEY `log_time` (`log_time`),
  ADD KEY `user_id` (`user_id`);

--
-- 資料表索引 `ecs_admin_message`
--
ALTER TABLE `ecs_admin_message`
  ADD PRIMARY KEY (`message_id`),
  ADD KEY `sender_id` (`sender_id`,`receiver_id`),
  ADD KEY `receiver_id` (`receiver_id`);

--
-- 資料表索引 `ecs_admin_user`
--
ALTER TABLE `ecs_admin_user`
  ADD PRIMARY KEY (`user_id`),
  ADD KEY `user_name` (`user_name`),
  ADD KEY `agency_id` (`agency_id`);

--
-- 資料表索引 `ecs_adsense`
--
ALTER TABLE `ecs_adsense`
  ADD KEY `from_ad` (`from_ad`);

--
-- 資料表索引 `ecs_ad_custom`
--
ALTER TABLE `ecs_ad_custom`
  ADD PRIMARY KEY (`ad_id`);

--
-- 資料表索引 `ecs_ad_position`
--
ALTER TABLE `ecs_ad_position`
  ADD PRIMARY KEY (`position_id`);

--
-- 資料表索引 `ecs_affiliate_log`
--
ALTER TABLE `ecs_affiliate_log`
  ADD PRIMARY KEY (`log_id`);

--
-- 資料表索引 `ecs_agency`
--
ALTER TABLE `ecs_agency`
  ADD PRIMARY KEY (`agency_id`),
  ADD KEY `agency_name` (`agency_name`);

--
-- 資料表索引 `ecs_area_region`
--
ALTER TABLE `ecs_area_region`
  ADD PRIMARY KEY (`shipping_area_id`,`region_id`);

--
-- 資料表索引 `ecs_article`
--
ALTER TABLE `ecs_article`
  ADD PRIMARY KEY (`article_id`),
  ADD KEY `cat_id` (`cat_id`);

--
-- 資料表索引 `ecs_article_cat`
--
ALTER TABLE `ecs_article_cat`
  ADD PRIMARY KEY (`cat_id`),
  ADD KEY `cat_type` (`cat_type`),
  ADD KEY `sort_order` (`sort_order`),
  ADD KEY `parent_id` (`parent_id`);

--
-- 資料表索引 `ecs_attribute`
--
ALTER TABLE `ecs_attribute`
  ADD PRIMARY KEY (`attr_id`),
  ADD KEY `cat_id` (`cat_id`);

--
-- 資料表索引 `ecs_auction_log`
--
ALTER TABLE `ecs_auction_log`
  ADD PRIMARY KEY (`log_id`),
  ADD KEY `act_id` (`act_id`);

--
-- 資料表索引 `ecs_auto_manage`
--
ALTER TABLE `ecs_auto_manage`
  ADD PRIMARY KEY (`item_id`,`type`);

--
-- 資料表索引 `ecs_back_action`
--
ALTER TABLE `ecs_back_action`
  ADD PRIMARY KEY (`action_id`),
  ADD KEY `back_id` (`back_id`);

--
-- 資料表索引 `ecs_back_goods`
--
ALTER TABLE `ecs_back_goods`
  ADD PRIMARY KEY (`rec_id`),
  ADD KEY `back_id` (`back_id`),
  ADD KEY `goods_id` (`goods_id`);

--
-- 資料表索引 `ecs_back_order`
--
ALTER TABLE `ecs_back_order`
  ADD PRIMARY KEY (`back_id`),
  ADD KEY `user_id` (`user_id`),
  ADD KEY `order_id` (`order_id`),
  ADD KEY `goods_id` (`goods_id`);

--
-- 資料表索引 `ecs_back_replay`
--
ALTER TABLE `ecs_back_replay`
  ADD PRIMARY KEY (`id`);

--
-- 資料表索引 `ecs_bonus`
--
ALTER TABLE `ecs_bonus`
  ADD PRIMARY KEY (`bonus_id`);

--
-- 資料表索引 `ecs_bonus_type`
--
ALTER TABLE `ecs_bonus_type`
  ADD PRIMARY KEY (`type_id`);

--
-- 資料表索引 `ecs_booking_goods`
--
ALTER TABLE `ecs_booking_goods`
  ADD PRIMARY KEY (`rec_id`),
  ADD KEY `user_id` (`user_id`);

--
-- 資料表索引 `ecs_brand`
--
ALTER TABLE `ecs_brand`
  ADD PRIMARY KEY (`brand_id`),
  ADD KEY `is_show` (`is_show`);

--
-- 資料表索引 `ecs_card`
--
ALTER TABLE `ecs_card`
  ADD PRIMARY KEY (`card_id`);

--
-- 資料表索引 `ecs_cart`
--
ALTER TABLE `ecs_cart`
  ADD PRIMARY KEY (`rec_id`),
  ADD KEY `session_id` (`session_id`);

--
-- 資料表索引 `ecs_cart_combo`
--
ALTER TABLE `ecs_cart_combo`
  ADD PRIMARY KEY (`rec_id`),
  ADD KEY `session_id` (`session_id`);

--
-- 資料表索引 `ecs_category`
--
ALTER TABLE `ecs_category`
  ADD PRIMARY KEY (`cat_id`),
  ADD KEY `parent_id` (`parent_id`);

--
-- 資料表索引 `ecs_cat_recommend`
--
ALTER TABLE `ecs_cat_recommend`
  ADD PRIMARY KEY (`cat_id`,`recommend_type`);

--
-- 資料表索引 `ecs_collect_goods`
--
ALTER TABLE `ecs_collect_goods`
  ADD PRIMARY KEY (`rec_id`),
  ADD KEY `user_id` (`user_id`),
  ADD KEY `goods_id` (`goods_id`),
  ADD KEY `is_attention` (`is_attention`);

--
-- 資料表索引 `ecs_comment`
--
ALTER TABLE `ecs_comment`
  ADD PRIMARY KEY (`comment_id`),
  ADD KEY `parent_id` (`parent_id`),
  ADD KEY `id_value` (`id_value`);

--
-- 資料表索引 `ecs_crons`
--
ALTER TABLE `ecs_crons`
  ADD PRIMARY KEY (`cron_id`),
  ADD KEY `nextime` (`nextime`),
  ADD KEY `enable` (`enable`),
  ADD KEY `cron_code` (`cron_code`);

--
-- 資料表索引 `ecs_delivery_goods`
--
ALTER TABLE `ecs_delivery_goods`
  ADD PRIMARY KEY (`rec_id`),
  ADD KEY `delivery_id` (`delivery_id`,`goods_id`),
  ADD KEY `goods_id` (`goods_id`);

--
-- 資料表索引 `ecs_delivery_order`
--
ALTER TABLE `ecs_delivery_order`
  ADD PRIMARY KEY (`delivery_id`),
  ADD KEY `user_id` (`user_id`),
  ADD KEY `order_id` (`order_id`);

--
-- 資料表索引 `ecs_email_list`
--
ALTER TABLE `ecs_email_list`
  ADD PRIMARY KEY (`id`);

--
-- 資料表索引 `ecs_email_sendlist`
--
ALTER TABLE `ecs_email_sendlist`
  ADD PRIMARY KEY (`id`);

--
-- 資料表索引 `ecs_error_log`
--
ALTER TABLE `ecs_error_log`
  ADD PRIMARY KEY (`id`),
  ADD KEY `time` (`time`);

--
-- 資料表索引 `ecs_exchange_goods`
--
ALTER TABLE `ecs_exchange_goods`
  ADD PRIMARY KEY (`goods_id`);

--
-- 資料表索引 `ecs_favourable_activity`
--
ALTER TABLE `ecs_favourable_activity`
  ADD PRIMARY KEY (`act_id`),
  ADD KEY `act_name` (`act_name`);

--
-- 資料表索引 `ecs_feedback`
--
ALTER TABLE `ecs_feedback`
  ADD PRIMARY KEY (`msg_id`),
  ADD KEY `user_id` (`user_id`);

--
-- 資料表索引 `ecs_friend_link`
--
ALTER TABLE `ecs_friend_link`
  ADD PRIMARY KEY (`link_id`),
  ADD KEY `show_order` (`show_order`);

--
-- 資料表索引 `ecs_goods`
--
ALTER TABLE `ecs_goods`
  ADD PRIMARY KEY (`goods_id`),
  ADD KEY `goods_sn` (`goods_sn`),
  ADD KEY `cat_id` (`cat_id`),
  ADD KEY `last_update` (`last_update`),
  ADD KEY `brand_id` (`brand_id`),
  ADD KEY `goods_weight` (`goods_weight`),
  ADD KEY `promote_end_date` (`promote_end_date`),
  ADD KEY `promote_start_date` (`promote_start_date`),
  ADD KEY `goods_number` (`goods_number`),
  ADD KEY `sort_order` (`sort_order`);

--
-- 資料表索引 `ecs_goods_activity`
--
ALTER TABLE `ecs_goods_activity`
  ADD PRIMARY KEY (`act_id`),
  ADD KEY `act_name` (`act_name`,`act_type`,`goods_id`);

--
-- 資料表索引 `ecs_goods_article`
--
ALTER TABLE `ecs_goods_article`
  ADD PRIMARY KEY (`goods_id`,`article_id`,`admin_id`);

--
-- 資料表索引 `ecs_goods_attr`
--
ALTER TABLE `ecs_goods_attr`
  ADD PRIMARY KEY (`goods_attr_id`),
  ADD KEY `goods_id` (`goods_id`),
  ADD KEY `attr_id` (`attr_id`);

--
-- 資料表索引 `ecs_goods_cat`
--
ALTER TABLE `ecs_goods_cat`
  ADD PRIMARY KEY (`goods_id`,`cat_id`);

--
-- 資料表索引 `ecs_goods_gallery`
--
ALTER TABLE `ecs_goods_gallery`
  ADD PRIMARY KEY (`img_id`),
  ADD KEY `goods_id` (`goods_id`);

--
-- 資料表索引 `ecs_goods_type`
--
ALTER TABLE `ecs_goods_type`
  ADD PRIMARY KEY (`cat_id`);

--
-- 資料表索引 `ecs_group_goods`
--
ALTER TABLE `ecs_group_goods`
  ADD PRIMARY KEY (`parent_id`,`goods_id`,`admin_id`);

--
-- 資料表索引 `ecs_ip_log`
--
ALTER TABLE `ecs_ip_log`
  ADD PRIMARY KEY (`id`);

--
-- 資料表索引 `ecs_keywords`
--
ALTER TABLE `ecs_keywords`
  ADD PRIMARY KEY (`date`,`searchengine`,`keyword`);

--
-- 資料表索引 `ecs_link_goods`
--
ALTER TABLE `ecs_link_goods`
  ADD PRIMARY KEY (`goods_id`,`link_goods_id`,`admin_id`);

--
-- 資料表索引 `ecs_mail_templates`
--
ALTER TABLE `ecs_mail_templates`
  ADD PRIMARY KEY (`template_id`),
  ADD UNIQUE KEY `template_code` (`template_code`),
  ADD KEY `type` (`type`);

--
-- 資料表索引 `ecs_member_price`
--
ALTER TABLE `ecs_member_price`
  ADD PRIMARY KEY (`price_id`),
  ADD KEY `goods_id` (`goods_id`,`user_rank`);

--
-- 資料表索引 `ecs_nav`
--
ALTER TABLE `ecs_nav`
  ADD PRIMARY KEY (`id`),
  ADD KEY `type` (`type`),
  ADD KEY `ifshow` (`ifshow`);

--
-- 資料表索引 `ecs_order_action`
--
ALTER TABLE `ecs_order_action`
  ADD PRIMARY KEY (`action_id`),
  ADD KEY `order_id` (`order_id`);

--
-- 資料表索引 `ecs_order_goods`
--
ALTER TABLE `ecs_order_goods`
  ADD PRIMARY KEY (`rec_id`),
  ADD KEY `order_id` (`order_id`),
  ADD KEY `goods_id` (`goods_id`);

--
-- 資料表索引 `ecs_order_info`
--
ALTER TABLE `ecs_order_info`
  ADD PRIMARY KEY (`order_id`),
  ADD UNIQUE KEY `order_sn` (`order_sn`),
  ADD KEY `user_id` (`user_id`),
  ADD KEY `order_status` (`order_status`),
  ADD KEY `shipping_status` (`shipping_status`),
  ADD KEY `pay_status` (`pay_status`),
  ADD KEY `shipping_id` (`shipping_id`),
  ADD KEY `pay_id` (`pay_id`),
  ADD KEY `extension_code` (`extension_code`,`extension_id`),
  ADD KEY `agency_id` (`agency_id`);

--
-- 資料表索引 `ecs_order_shipping`
--
ALTER TABLE `ecs_order_shipping`
  ADD PRIMARY KEY (`id`);

--
-- 資料表索引 `ecs_pack`
--
ALTER TABLE `ecs_pack`
  ADD PRIMARY KEY (`pack_id`);

--
-- 資料表索引 `ecs_package_goods`
--
ALTER TABLE `ecs_package_goods`
  ADD PRIMARY KEY (`package_id`,`goods_id`,`admin_id`,`product_id`);

--
-- 資料表索引 `ecs_payment`
--
ALTER TABLE `ecs_payment`
  ADD PRIMARY KEY (`pay_id`),
  ADD UNIQUE KEY `pay_code` (`pay_code`);

--
-- 資料表索引 `ecs_pay_log`
--
ALTER TABLE `ecs_pay_log`
  ADD PRIMARY KEY (`log_id`);

--
-- 資料表索引 `ecs_plugins`
--
ALTER TABLE `ecs_plugins`
  ADD PRIMARY KEY (`code`);

--
-- 資料表索引 `ecs_products`
--
ALTER TABLE `ecs_products`
  ADD PRIMARY KEY (`product_id`);

--
-- 資料表索引 `ecs_region`
--
ALTER TABLE `ecs_region`
  ADD PRIMARY KEY (`region_id`),
  ADD KEY `parent_id` (`parent_id`),
  ADD KEY `region_type` (`region_type`),
  ADD KEY `agency_id` (`agency_id`);

--
-- 資料表索引 `ecs_reg_extend_info`
--
ALTER TABLE `ecs_reg_extend_info`
  ADD PRIMARY KEY (`Id`);

--
-- 資料表索引 `ecs_reg_fields`
--
ALTER TABLE `ecs_reg_fields`
  ADD PRIMARY KEY (`id`);

--
-- 資料表索引 `ecs_role`
--
ALTER TABLE `ecs_role`
  ADD PRIMARY KEY (`role_id`),
  ADD KEY `user_name` (`role_name`);

--
-- 資料表索引 `ecs_searchengine`
--
ALTER TABLE `ecs_searchengine`
  ADD PRIMARY KEY (`date`,`searchengine`);

--
-- 資料表索引 `ecs_sessions`
--
ALTER TABLE `ecs_sessions`
  ADD PRIMARY KEY (`sesskey`),
  ADD KEY `expiry` (`expiry`);

--
-- 資料表索引 `ecs_sessions_data`
--
ALTER TABLE `ecs_sessions_data`
  ADD PRIMARY KEY (`sesskey`),
  ADD KEY `expiry` (`expiry`);

--
-- 資料表索引 `ecs_shipping`
--
ALTER TABLE `ecs_shipping`
  ADD PRIMARY KEY (`shipping_id`),
  ADD KEY `shipping_code` (`shipping_code`,`enabled`);

--
-- 資料表索引 `ecs_shipping_area`
--
ALTER TABLE `ecs_shipping_area`
  ADD PRIMARY KEY (`shipping_area_id`),
  ADD KEY `shipping_id` (`shipping_id`);

--
-- 資料表索引 `ecs_shop_config`
--
ALTER TABLE `ecs_shop_config`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `code` (`code`),
  ADD KEY `parent_id` (`parent_id`);

--
-- 資料表索引 `ecs_snatch_log`
--
ALTER TABLE `ecs_snatch_log`
  ADD PRIMARY KEY (`log_id`),
  ADD KEY `snatch_id` (`snatch_id`);

--
-- 資料表索引 `ecs_stats`
--
ALTER TABLE `ecs_stats`
  ADD KEY `access_time` (`access_time`);

--
-- 資料表索引 `ecs_suppliers`
--
ALTER TABLE `ecs_suppliers`
  ADD PRIMARY KEY (`suppliers_id`);

--
-- 資料表索引 `ecs_tag`
--
ALTER TABLE `ecs_tag`
  ADD PRIMARY KEY (`tag_id`),
  ADD KEY `user_id` (`user_id`),
  ADD KEY `goods_id` (`goods_id`);

--
-- 資料表索引 `ecs_template`
--
ALTER TABLE `ecs_template`
  ADD KEY `filename` (`filename`,`region`),
  ADD KEY `theme` (`theme`),
  ADD KEY `remarks` (`remarks`);

--
-- 資料表索引 `ecs_temp_order`
--
ALTER TABLE `ecs_temp_order`
  ADD PRIMARY KEY (`id`);

--
-- 資料表索引 `ecs_topic`
--
ALTER TABLE `ecs_topic`
  ADD KEY `topic_id` (`topic_id`);

--
-- 資料表索引 `ecs_users`
--
ALTER TABLE `ecs_users`
  ADD PRIMARY KEY (`user_id`),
  ADD UNIQUE KEY `user_name` (`user_name`),
  ADD KEY `email` (`email`),
  ADD KEY `parent_id` (`parent_id`),
  ADD KEY `flag` (`flag`),
  ADD KEY `line_id` (`line_id`);

--
-- 資料表索引 `ecs_users_auth`
--
ALTER TABLE `ecs_users_auth`
  ADD PRIMARY KEY (`id`),
  ADD KEY `identifier` (`identifier`);

--
-- 資料表索引 `ecs_user_account`
--
ALTER TABLE `ecs_user_account`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_id` (`user_id`),
  ADD KEY `is_paid` (`is_paid`);

--
-- 資料表索引 `ecs_user_address`
--
ALTER TABLE `ecs_user_address`
  ADD PRIMARY KEY (`address_id`),
  ADD KEY `user_id` (`user_id`);

--
-- 資料表索引 `ecs_user_bank`
--
ALTER TABLE `ecs_user_bank`
  ADD PRIMARY KEY (`id`);

--
-- 資料表索引 `ecs_user_bonus`
--
ALTER TABLE `ecs_user_bonus`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_id` (`user_id`);

--
-- 資料表索引 `ecs_user_card`
--
ALTER TABLE `ecs_user_card`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `card_no` (`card_no`),
  ADD KEY `user_id` (`user_id`);

--
-- 資料表索引 `ecs_user_card_type`
--
ALTER TABLE `ecs_user_card_type`
  ADD PRIMARY KEY (`ct_id`),
  ADD UNIQUE KEY `ct_name` (`ct_name`);

--
-- 資料表索引 `ecs_user_cvs`
--
ALTER TABLE `ecs_user_cvs`
  ADD PRIMARY KEY (`id`);

--
-- 資料表索引 `ecs_user_feed`
--
ALTER TABLE `ecs_user_feed`
  ADD PRIMARY KEY (`feed_id`);

--
-- 資料表索引 `ecs_user_rank`
--
ALTER TABLE `ecs_user_rank`
  ADD PRIMARY KEY (`rank_id`);

--
-- 資料表索引 `ecs_verifycode`
--
ALTER TABLE `ecs_verifycode`
  ADD PRIMARY KEY (`id`);

--
-- 資料表索引 `ecs_virtual_card`
--
ALTER TABLE `ecs_virtual_card`
  ADD PRIMARY KEY (`card_id`),
  ADD KEY `goods_id` (`goods_id`),
  ADD KEY `car_sn` (`card_sn`),
  ADD KEY `is_saled` (`is_saled`);

--
-- 資料表索引 `ecs_volume_price`
--
ALTER TABLE `ecs_volume_price`
  ADD PRIMARY KEY (`price_type`,`goods_id`,`volume_number`);

--
-- 資料表索引 `ecs_vote`
--
ALTER TABLE `ecs_vote`
  ADD PRIMARY KEY (`vote_id`);

--
-- 資料表索引 `ecs_vote_log`
--
ALTER TABLE `ecs_vote_log`
  ADD PRIMARY KEY (`log_id`),
  ADD KEY `vote_id` (`vote_id`);

--
-- 資料表索引 `ecs_vote_option`
--
ALTER TABLE `ecs_vote_option`
  ADD PRIMARY KEY (`option_id`),
  ADD KEY `vote_id` (`vote_id`);

--
-- 資料表索引 `ecs_wholesale`
--
ALTER TABLE `ecs_wholesale`
  ADD PRIMARY KEY (`act_id`),
  ADD KEY `goods_id` (`goods_id`);

--
-- 在傾印的資料表使用自動遞增(AUTO_INCREMENT)
--

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_account_log`
--
ALTER TABLE `ecs_account_log`
  MODIFY `log_id` mediumint UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增ID', AUTO_INCREMENT=1;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_ad`
--
ALTER TABLE `ecs_ad`
  MODIFY `ad_id` smallint UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增ID', AUTO_INCREMENT=1;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_admin_action`
--
ALTER TABLE `ecs_admin_action`
  MODIFY `action_id` tinyint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_admin_log`
--
ALTER TABLE `ecs_admin_log`
  MODIFY `log_id` int UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_admin_message`
--
ALTER TABLE `ecs_admin_message`
  MODIFY `message_id` smallint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_admin_user`
--
ALTER TABLE `ecs_admin_user`
  MODIFY `user_id` smallint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_ad_custom`
--
ALTER TABLE `ecs_ad_custom`
  MODIFY `ad_id` mediumint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_ad_position`
--
ALTER TABLE `ecs_ad_position`
  MODIFY `position_id` tinyint UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增ID', AUTO_INCREMENT=2;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_affiliate_log`
--
ALTER TABLE `ecs_affiliate_log`
  MODIFY `log_id` mediumint NOT NULL AUTO_INCREMENT COMMENT '自增ID', AUTO_INCREMENT=1;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_agency`
--
ALTER TABLE `ecs_agency`
  MODIFY `agency_id` smallint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_article`
--
ALTER TABLE `ecs_article`
  MODIFY `article_id` mediumint UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增ID', AUTO_INCREMENT=1;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_article_cat`
--
ALTER TABLE `ecs_article_cat`
  MODIFY `cat_id` smallint NOT NULL AUTO_INCREMENT COMMENT '自增ID', AUTO_INCREMENT=1;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_attribute`
--
ALTER TABLE `ecs_attribute`
  MODIFY `attr_id` smallint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_auction_log`
--
ALTER TABLE `ecs_auction_log`
  MODIFY `log_id` mediumint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_back_action`
--
ALTER TABLE `ecs_back_action`
  MODIFY `action_id` mediumint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_back_goods`
--
ALTER TABLE `ecs_back_goods`
  MODIFY `rec_id` mediumint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_back_order`
--
ALTER TABLE `ecs_back_order`
  MODIFY `back_id` mediumint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_back_replay`
--
ALTER TABLE `ecs_back_replay`
  MODIFY `id` mediumint NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_bonus`
--
ALTER TABLE `ecs_bonus`
  MODIFY `bonus_id` int NOT NULL AUTO_INCREMENT COMMENT '自增ID', AUTO_INCREMENT=1;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_bonus_type`
--
ALTER TABLE `ecs_bonus_type`
  MODIFY `type_id` smallint UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增ID', AUTO_INCREMENT=1;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_booking_goods`
--
ALTER TABLE `ecs_booking_goods`
  MODIFY `rec_id` mediumint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_brand`
--
ALTER TABLE `ecs_brand`
  MODIFY `brand_id` smallint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_card`
--
ALTER TABLE `ecs_card`
  MODIFY `card_id` tinyint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_cart`
--
ALTER TABLE `ecs_cart`
  MODIFY `rec_id` mediumint UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增ID', AUTO_INCREMENT=1;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_cart_combo`
--
ALTER TABLE `ecs_cart_combo`
  MODIFY `rec_id` mediumint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_category`
--
ALTER TABLE `ecs_category`
  MODIFY `cat_id` smallint UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增ID', AUTO_INCREMENT=1;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_collect_goods`
--
ALTER TABLE `ecs_collect_goods`
  MODIFY `rec_id` mediumint UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增ID', AUTO_INCREMENT=1;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_comment`
--
ALTER TABLE `ecs_comment`
  MODIFY `comment_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_crons`
--
ALTER TABLE `ecs_crons`
  MODIFY `cron_id` tinyint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_delivery_goods`
--
ALTER TABLE `ecs_delivery_goods`
  MODIFY `rec_id` mediumint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_delivery_order`
--
ALTER TABLE `ecs_delivery_order`
  MODIFY `delivery_id` mediumint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_email_list`
--
ALTER TABLE `ecs_email_list`
  MODIFY `id` mediumint NOT NULL AUTO_INCREMENT;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_email_sendlist`
--
ALTER TABLE `ecs_email_sendlist`
  MODIFY `id` mediumint NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_error_log`
--
ALTER TABLE `ecs_error_log`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_favourable_activity`
--
ALTER TABLE `ecs_favourable_activity`
  MODIFY `act_id` smallint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_feedback`
--
ALTER TABLE `ecs_feedback`
  MODIFY `msg_id` mediumint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_friend_link`
--
ALTER TABLE `ecs_friend_link`
  MODIFY `link_id` smallint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_goods`
--
ALTER TABLE `ecs_goods`
  MODIFY `goods_id` mediumint UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增ID', AUTO_INCREMENT=1;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_goods_activity`
--
ALTER TABLE `ecs_goods_activity`
  MODIFY `act_id` mediumint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_goods_attr`
--
ALTER TABLE `ecs_goods_attr`
  MODIFY `goods_attr_id` int UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增ID', AUTO_INCREMENT=1;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_goods_gallery`
--
ALTER TABLE `ecs_goods_gallery`
  MODIFY `img_id` mediumint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_goods_type`
--
ALTER TABLE `ecs_goods_type`
  MODIFY `cat_id` smallint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_ip_log`
--
ALTER TABLE `ecs_ip_log`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_mail_templates`
--
ALTER TABLE `ecs_mail_templates`
  MODIFY `template_id` tinyint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_member_price`
--
ALTER TABLE `ecs_member_price`
  MODIFY `price_id` mediumint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_nav`
--
ALTER TABLE `ecs_nav`
  MODIFY `id` mediumint NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_order_action`
--
ALTER TABLE `ecs_order_action`
  MODIFY `action_id` mediumint UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增ID', AUTO_INCREMENT=1;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_order_goods`
--
ALTER TABLE `ecs_order_goods`
  MODIFY `rec_id` mediumint UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增ID', AUTO_INCREMENT=1;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_order_info`
--
ALTER TABLE `ecs_order_info`
  MODIFY `order_id` mediumint UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增ID', AUTO_INCREMENT=1;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_order_shipping`
--
ALTER TABLE `ecs_order_shipping`
  MODIFY `id` int NOT NULL AUTO_INCREMENT COMMENT '自增ID', AUTO_INCREMENT=1;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_pack`
--
ALTER TABLE `ecs_pack`
  MODIFY `pack_id` tinyint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_payment`
--
ALTER TABLE `ecs_payment`
  MODIFY `pay_id` tinyint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_pay_log`
--
ALTER TABLE `ecs_pay_log`
  MODIFY `log_id` int UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_products`
--
ALTER TABLE `ecs_products`
  MODIFY `product_id` mediumint UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增ID', AUTO_INCREMENT=1;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_region`
--
ALTER TABLE `ecs_region`
  MODIFY `region_id` smallint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_reg_extend_info`
--
ALTER TABLE `ecs_reg_extend_info`
  MODIFY `Id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_reg_fields`
--
ALTER TABLE `ecs_reg_fields`
  MODIFY `id` tinyint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_role`
--
ALTER TABLE `ecs_role`
  MODIFY `role_id` smallint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_shipping`
--
ALTER TABLE `ecs_shipping`
  MODIFY `shipping_id` tinyint UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增ID', AUTO_INCREMENT=1;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_shipping_area`
--
ALTER TABLE `ecs_shipping_area`
  MODIFY `shipping_area_id` smallint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_shop_config`
--
ALTER TABLE `ecs_shop_config`
  MODIFY `id` smallint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_snatch_log`
--
ALTER TABLE `ecs_snatch_log`
  MODIFY `log_id` mediumint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_suppliers`
--
ALTER TABLE `ecs_suppliers`
  MODIFY `suppliers_id` smallint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_tag`
--
ALTER TABLE `ecs_tag`
  MODIFY `tag_id` mediumint NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_temp_order`
--
ALTER TABLE `ecs_temp_order`
  MODIFY `id` int NOT NULL AUTO_INCREMENT COMMENT '自增ID';

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_topic`
--
ALTER TABLE `ecs_topic`
  MODIFY `topic_id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_users`
--
ALTER TABLE `ecs_users`
  MODIFY `user_id` mediumint UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增ID', AUTO_INCREMENT=1;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_users_auth`
--
ALTER TABLE `ecs_users_auth`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_user_account`
--
ALTER TABLE `ecs_user_account`
  MODIFY `id` mediumint UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增ID', AUTO_INCREMENT=1;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_user_address`
--
ALTER TABLE `ecs_user_address`
  MODIFY `address_id` mediumint UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增ID', AUTO_INCREMENT=1;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_user_bank`
--
ALTER TABLE `ecs_user_bank`
  MODIFY `id` int NOT NULL AUTO_INCREMENT COMMENT '自增ID', AUTO_INCREMENT=1;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_user_bonus`
--
ALTER TABLE `ecs_user_bonus`
  MODIFY `id` mediumint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_user_card`
--
ALTER TABLE `ecs_user_card`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_user_card_type`
--
ALTER TABLE `ecs_user_card_type`
  MODIFY `ct_id` int UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_user_cvs`
--
ALTER TABLE `ecs_user_cvs`
  MODIFY `id` int NOT NULL AUTO_INCREMENT COMMENT '自增ID', AUTO_INCREMENT=1;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_user_feed`
--
ALTER TABLE `ecs_user_feed`
  MODIFY `feed_id` mediumint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_user_rank`
--
ALTER TABLE `ecs_user_rank`
  MODIFY `rank_id` tinyint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_verifycode`
--
ALTER TABLE `ecs_verifycode`
  MODIFY `id` mediumint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_virtual_card`
--
ALTER TABLE `ecs_virtual_card`
  MODIFY `card_id` mediumint NOT NULL AUTO_INCREMENT;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_vote`
--
ALTER TABLE `ecs_vote`
  MODIFY `vote_id` smallint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_vote_log`
--
ALTER TABLE `ecs_vote_log`
  MODIFY `log_id` mediumint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_vote_option`
--
ALTER TABLE `ecs_vote_option`
  MODIFY `option_id` smallint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `ecs_wholesale`
--
ALTER TABLE `ecs_wholesale`
  MODIFY `act_id` mediumint UNSIGNED NOT NULL AUTO_INCREMENT;
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 */;
