-- SQL_公司資料表_新增串接網址欄位
ALTER TABLE `company`
ADD COLUMN `webpos_api_url`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'POS後台串接網址' AFTER `invoice_client_key_code`,
ADD COLUMN `onlineorder_api_url`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '線上訂餐串接網址' AFTER `webpos_api_url`;

-- SQL_分店資料表_新增網訂提醒分鐘設定欄位
ALTER TABLE `store_branch`
ADD COLUMN `online_check_time`  varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '網訂提醒分鐘設定' AFTER `online_freight_set`;

-- SQL_分店資料表，新增網訂各項金流手續費率欄位
ALTER TABLE `store_branch`
ADD COLUMN `online_esun_hand_rate`  float(10,2) NULL DEFAULT NULL COMMENT '網訂玉山金流手續費率' AFTER `online_check_time`,
ADD COLUMN `online_line_hand_rate`  float(10,2) NULL DEFAULT NULL COMMENT '網訂LINEPAY手續費率' AFTER `online_esun_hand_rate`,
ADD COLUMN `online_jko_hand_rate`  float(10,2) NULL DEFAULT NULL COMMENT '網訂街口支付手續費率' AFTER `online_line_hand_rate`;

-- SQL_分店資料表_新增前台金流相關欄位
ALTER TABLE `store_branch`
ADD COLUMN `ncccpay_open`  varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '聯合信用卡開啟' AFTER `InstanceId`,
ADD COLUMN `ncccpay_id`  varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '聯合信用卡ID' AFTER `ncccpay_open`,
ADD COLUMN `ncccpay_key`  varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '聯合信用卡金鑰' AFTER `ncccpay_id`,
ADD COLUMN `easycard_open`  varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '悠遊卡開啟' AFTER `ncccpay_key`,
ADD COLUMN `easycard_id`  varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '悠遊卡ID' AFTER `easycard_open`,
ADD COLUMN `easycard_key`  varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '悠遊卡金鑰' AFTER `easycard_id`,
ADD COLUMN `ipass_open`  varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '一卡通開啟' AFTER `easycard_key`,
ADD COLUMN `ipass_id`  varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '一卡通ID' AFTER `ipass_open`,
ADD COLUMN `ipass_key`  varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '一卡通金鑰' AFTER `ipass_id`,
ADD COLUMN `applepay_open`  varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'Apple Pay開啟' AFTER `ipass_key`,
ADD COLUMN `applepay_id`  varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'Apple Pay ID' AFTER `applepay_open`,
ADD COLUMN `applepay_key`  varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'Apple Pay金鑰' AFTER `applepay_id`,
ADD COLUMN `linepay_open`  varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'LINE Pay開啟' AFTER `applepay_key`,
ADD COLUMN `linepay_id`  varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'LINE Pay ID' AFTER `linepay_open`,
ADD COLUMN `jkopay_open`  varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '街口支付開啟' AFTER `linepay_key`,
ADD COLUMN `jkopay_id`  varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '街口支付ID' AFTER `jkopay_open`;

-- SQL_分店資料表_新增分店是否開發票欄位
ALTER TABLE `store_branch`
ADD COLUMN `inv_flag`  varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '分店是否開發票' AFTER `FTP_PWD`;
