MySQL Create Table SQL
Table Structure: okayapi_shopxo_s_order_goods_inventory_log:/tablelist/okayapi_shopxo_s_order_goods_inventory_log.html
-- MySQL Table okayapi_shopxo_s_order_goods_inventory_log
-- From: OkayAPI.com
CREATE TABLE `okayapi_shopxo_s_order_goods_inventory_log` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`order_id` int(11) NOT NULL DEFAULT '0' COMMENT '订单id',
`goods_id` int(11) NOT NULL DEFAULT '0' COMMENT '商品id',
`order_status` tinyint(2) NOT NULL DEFAULT '0' COMMENT '订单状态(0待确认, 1已确认/待支付, 2已支付/待发货, 3已发货/待收货, 4已完成, 5已取消, 6已关闭)',
`original_inventory` int(11) NOT NULL DEFAULT '0' COMMENT '原库存',
`new_inventory` int(11) NOT NULL DEFAULT '0' COMMENT '最新库存',
`is_rollback` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否回滚(0否, 1是)',
`rollback_time` int(11) NOT NULL DEFAULT '0' COMMENT '回滚时间',
KEY `order_id` (`order_id`),
KEY `goods_id` (`goods_id`),
KEY `order_status` (`order_status`),
KEY `original_inventory` (`original_inventory`),
KEY `new_inventory` (`new_inventory`),
KEY `is_rollback` (`is_rollback`),
KEY `rollback_time` (`rollback_time`),
PRIMARY KEY (`id`)
) ENGINE=InnoDB COMMENT 'ShopXO商城-订单商品库存变更日志';
After replication, you can go to the database to create the database table.
MySQL database table structure design
Displaying 1-7 of 7 results.
Field Name | Field Type | Default | IS NULL | Field Comment | Index | Demo Data |
---|---|---|---|---|---|---|
order_id | int(11) | 0 | 否 | 订单id | Normal Index | 0 |
goods_id | int(11) | 0 | 否 | 商品id | Normal Index | 0 |
order_status | tinyint(2) | 0 | 否 | 订单状态(0待确认, 1已确认/待支付, 2已支付/待发货, 3已发货/待收货, 4已完成, 5已取消, 6已关闭) | Normal Index | 0 |
original_inventory | int(11) | 0 | 否 | 原库存 | 0 | |
new_inventory | int(11) | 0 | 否 | 最新库存 | 0 | |
is_rollback | tinyint(1) | 0 | 否 | 是否回滚(0否, 1是) | 0 | |
rollback_time | int(11) | 0 | 否 | 回滚时间 | 0 |