CREATE TABLE IF NOT EXISTS `web_payment` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `payment_id` varchar(255) NOT NULL,
  `package_id` varchar(255) NOT NULL,
  `account_id` int(20) DEFAULT NULL,
  `pay_amount` int(20) DEFAULT NULL,
  `total_amount` int(20) DEFAULT NULL,
  `create_date` datetime NOT NULL,
  `pay_date` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=tis620;

CREATE TABLE IF NOT EXISTS `web_cash_send` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `payment_id` varchar(255) NOT NULL,
  `account_id` int(11) NOT NULL,
  `userid` varchar(255) NOT NULL,
  `amount` int(20) NOT NULL,
  `status` tinyint(1) NOT NULL DEFAULT 0,
  `create_date` datetime NOT NULL,
  `send_date` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=tis620;

CREATE TABLE IF NOT EXISTS `web_item_send` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `payment_id` varchar(255) NOT NULL,
  `account_id` int(11) NOT NULL,
  `userid` varchar(255) NOT NULL,
  `char_id` int(20) NOT NULL,
  `item1_id` int(20) NOT NULL DEFAULT 0,
  `item1_amount` int(20) NOT NULL DEFAULT 0,
  `item1_refine` int(20) NOT NULL DEFAULT 0,
  `item2_id` int(20) NOT NULL DEFAULT 0,
  `item2_amount` int(20) NOT NULL DEFAULT 0,
  `item2_refine` int(20) NOT NULL DEFAULT 0,
  `item3_id` int(20) NOT NULL DEFAULT 0,
  `item3_amount` int(20) NOT NULL DEFAULT 0,
  `item3_refine` int(20) NOT NULL DEFAULT 0,
  `item4_id` int(20) NOT NULL DEFAULT 0,
  `item4_amount` int(20) NOT NULL DEFAULT 0,
  `item4_refine` int(20) NOT NULL DEFAULT 0,
  `item5_id` int(20) NOT NULL DEFAULT 0,
  `item5_amount` int(20) NOT NULL DEFAULT 0,
  `item5_refine` int(20) NOT NULL DEFAULT 0,
  `status` tinyint(1) NOT NULL DEFAULT 0,
  `create_date` datetime NOT NULL,
  `send_date` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=tis620;