· 8 years ago · Dec 06, 2017, 04:00 PM
1CREATE TABLE IF NOT EXISTS `jos_vm_orders` (
2 `order_id` int(11) NOT NULL AUTO_INCREMENT,
3 `user_id` int(11) NOT NULL DEFAULT '0',
4 `vendor_id` int(11) NOT NULL DEFAULT '0',
5 `order_number` varchar(32) DEFAULT NULL,
6 `user_info_id` varchar(32) DEFAULT NULL,
7 `order_total` decimal(15,5) NOT NULL DEFAULT '0.00000',
8 `order_subtotal` decimal(15,5) DEFAULT NULL,
9 `order_tax` decimal(10,2) DEFAULT NULL,
10 `order_tax_details` text NOT NULL,
11 `order_shipping` decimal(10,2) DEFAULT NULL,
12 `order_shipping_tax` decimal(10,2) DEFAULT NULL,
13 `coupon_discount` decimal(12,2) NOT NULL DEFAULT '0.00',
14 `coupon_code` varchar(32) DEFAULT NULL,
15 `order_discount` decimal(12,2) NOT NULL DEFAULT '0.00',
16 `order_currency` varchar(16) DEFAULT NULL,
17 `order_status` char(1) DEFAULT NULL,
18 `cdate` int(11) DEFAULT NULL,
19 `mdate` int(11) DEFAULT NULL,
20 `ship_method_id` varchar(255) DEFAULT NULL,
21 `customer_note` text NOT NULL,
22 `ip_address` varchar(15) NOT NULL DEFAULT '',
23 PRIMARY KEY (`order_id`),
24 KEY `idx_orders_user_id` (`user_id`),
25 KEY `idx_orders_vendor_id` (`vendor_id`),
26 KEY `idx_orders_order_number` (`order_number`),
27 KEY `idx_orders_user_info_id` (`user_info_id`),
28 KEY `idx_orders_ship_method_id` (`ship_method_id`)
29) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Used to store all orders' AUTO_INCREMENT=18 ;