MySQL Create Table SQL
Table Structure: okayapi_shopxo_s_order:/tablelist/okayapi_shopxo_s_order.html
-- MySQL Table okayapi_shopxo_s_order
-- From: OkayAPI.com
CREATE TABLE `okayapi_shopxo_s_order` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`order_no` char(60) NOT NULL COMMENT '订单号',
`user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户id',
`shop_id` int(11) NOT NULL DEFAULT '0' COMMENT '店铺id',
`receive_address_id` int(11) NOT NULL DEFAULT '0' COMMENT '收件地址id',
`receive_name` char(60) NOT NULL COMMENT '收件人-姓名',
`receive_tel` char(15) NOT NULL COMMENT '收件人-电话',
`receive_province` int(11) NOT NULL DEFAULT '0' COMMENT '收件人-省',
`receive_city` int(11) NOT NULL DEFAULT '0' COMMENT '收件人-市',
`receive_county` int(11) NOT NULL DEFAULT '0' COMMENT '收件人-县/区',
`receive_address` char(200) NOT NULL COMMENT '收件人-详细地址',
`user_note` char(255) NOT NULL COMMENT '用户备注',
`express_id` int(11) NOT NULL DEFAULT '0' COMMENT '快递id',
`express_number` char(60) NOT NULL COMMENT '快递单号',
`payment_id` int(11) NOT NULL DEFAULT '0' COMMENT '支付方式id',
`okayapi_shopxo_s_order_status` tinyint(2) NOT NULL DEFAULT '0' COMMENT '订单状态(0待确认, 1已确认/待支付, 2已支付/待发货, 3已发货/待收货, 4已完成, 5已取消, 6已关闭)',
`pay_status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '支付状态(0未支付, 1已支付, 2已退款, 3部分退款)',
`extension_data` longtext NOT NULL COMMENT '扩展展示数据',
`buy_number_count` int(11) NOT NULL DEFAULT '0' COMMENT '购买商品总数量',
`increase_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '增加的金额',
`preferential_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '优惠金额',
`price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '订单单价',
`total_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '订单总价(订单最终价格)',
`pay_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '已支付金额',
`refund_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '退款金额',
`returned_quantity` int(11) NOT NULL DEFAULT '0' COMMENT '退货数量',
`client_type` char(30) NOT NULL COMMENT '客户端类型(pc, h5, ios, android, alipay, weixin, baidu)取APPLICATION_CLIENT_TYPE常量值',
`pay_time` int(11) NOT NULL DEFAULT '0' COMMENT '支付时间',
`confirm_time` int(11) NOT NULL DEFAULT '0' COMMENT '确认时间',
`delivery_time` int(11) NOT NULL DEFAULT '0' COMMENT '发货时间',
`cancel_time` int(11) NOT NULL DEFAULT '0' COMMENT '取消时间',
`collect_time` int(11) NOT NULL DEFAULT '0' COMMENT '收货时间',
`close_time` int(11) NOT NULL DEFAULT '0' COMMENT '关闭时间',
`comments_time` int(11) NOT NULL DEFAULT '0' COMMENT '评论时间',
`is_comments` int(11) NOT NULL DEFAULT '0' COMMENT '商家是否已评论(0否, 大于0评论时间)',
`user_is_comments` int(11) NOT NULL DEFAULT '0' COMMENT '用户是否已评论(0否, 大于0评论时间)',
`is_delete_time` int(11) NOT NULL DEFAULT '0' COMMENT '商家是否已删除(0否, 大于0删除时间)',
`user_is_delete_time` int(11) NOT NULL DEFAULT '0' COMMENT '用户是否已删除(0否, 大于0删除时间)',
`upd_time` int(11) NOT NULL DEFAULT '0' COMMENT '更新时间',
KEY `order_no` (`order_no`),
KEY `user_id` (`user_id`),
KEY `shop_id` (`shop_id`),
KEY `receive_address_id` (`receive_address_id`),
KEY `receive_name` (`receive_name`),
KEY `receive_tel` (`receive_tel`),
KEY `receive_province` (`receive_province`),
KEY `receive_city` (`receive_city`),
KEY `receive_county` (`receive_county`),
KEY `receive_address` (`receive_address`),
KEY `user_note` (`user_note`),
KEY `express_id` (`express_id`),
KEY `express_number` (`express_number`),
KEY `payment_id` (`payment_id`),
KEY `okayapi_shopxo_s_order_status` (`okayapi_shopxo_s_order_status`),
KEY `pay_status` (`pay_status`),
KEY `extension_data` (`extension_data`),
KEY `buy_number_count` (`buy_number_count`),
KEY `increase_price` (`increase_price`),
KEY `preferential_price` (`preferential_price`),
KEY `price` (`price`),
KEY `total_price` (`total_price`),
KEY `pay_price` (`pay_price`),
KEY `refund_price` (`refund_price`),
KEY `returned_quantity` (`returned_quantity`),
KEY `client_type` (`client_type`),
KEY `pay_time` (`pay_time`),
KEY `confirm_time` (`confirm_time`),
KEY `delivery_time` (`delivery_time`),
KEY `cancel_time` (`cancel_time`),
KEY `collect_time` (`collect_time`),
KEY `close_time` (`close_time`),
KEY `comments_time` (`comments_time`),
KEY `is_comments` (`is_comments`),
KEY `user_is_comments` (`user_is_comments`),
KEY `is_delete_time` (`is_delete_time`),
KEY `user_is_delete_time` (`user_is_delete_time`),
KEY `upd_time` (`upd_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-38 of 38 results.
Field Name | Field Type | Default | IS NULL | Field Comment | Index | Demo Data |
---|---|---|---|---|---|---|
order_no | char(60) | 否 | 订单号 | Unique Index | ||
user_id | int(11) | 0 | 否 | 用户id | Normal Index | 0 |
shop_id | int(11) | 0 | 否 | 店铺id | Normal Index | 0 |
receive_address_id | int(11) | 0 | 否 | 收件地址id | 0 | |
receive_name | char(60) | 否 | 收件人-姓名 | |||
receive_tel | char(15) | 否 | 收件人-电话 | |||
receive_province | int(11) | 0 | 否 | 收件人-省 | 0 | |
receive_city | int(11) | 0 | 否 | 收件人-市 | 0 | |
receive_county | int(11) | 0 | 否 | 收件人-县/区 | 0 | |
receive_address | char(200) | 否 | 收件人-详细地址 | |||
user_note | char(255) | 否 | 用户备注 | |||
express_id | int(11) | 0 | 否 | 快递id | 0 | |
express_number | char(60) | 否 | 快递单号 | |||
payment_id | int(11) | 0 | 否 | 支付方式id | 0 | |
okayapi_shopxo_s_order_status | tinyint(2) | 0 | 否 | 订单状态(0待确认, 1已确认/待支付, 2已支付/待发货, 3已发货/待收货, 4已完成, 5已取消, 6已关闭) | Normal Index | 0 |
pay_status | tinyint(1) | 0 | 否 | 支付状态(0未支付, 1已支付, 2已退款, 3部分退款) | Normal Index | 0 |
extension_data | longtext | 是 | 扩展展示数据 | |||
buy_number_count | int(11) | 0 | 否 | 购买商品总数量 | 0 | |
increase_price | decimal(10,2) unsigned | 0.00 | 否 | 增加的金额 | 0.00 | |
preferential_price | decimal(10,2) unsigned | 0.00 | 否 | 优惠金额 | 0.00 | |
price | decimal(10,2) unsigned | 0.00 | 否 | 订单单价 | 0.00 | |
total_price | decimal(10,2) unsigned | 0.00 | 否 | 订单总价(订单最终价格) | 0.00 | |
pay_price | decimal(10,2) unsigned | 0.00 | 否 | 已支付金额 | 0.00 | |
refund_price | decimal(10,2) | 0.00 | 否 | 退款金额 | 0.00 | |
returned_quantity | int(11) | 0 | 否 | 退货数量 | 0 | |
client_type | char(30) | 否 | 客户端类型(pc, h5, ios, android, alipay, weixin, baidu)取APPLICATION_CLIENT_TYPE常量值 | |||
pay_time | int(11) | 0 | 否 | 支付时间 | 0 | |
confirm_time | int(11) | 0 | 否 | 确认时间 | 0 | |
delivery_time | int(11) | 0 | 否 | 发货时间 | 0 | |
cancel_time | int(11) | 0 | 否 | 取消时间 | 0 | |
collect_time | int(11) | 0 | 否 | 收货时间 | 0 | |
close_time | int(11) | 0 | 否 | 关闭时间 | 0 | |
comments_time | int(11) | 0 | 否 | 评论时间 | 0 | |
is_comments | int(11) | 0 | 否 | 商家是否已评论(0否, 大于0评论时间) | 0 | |
user_is_comments | int(11) | 0 | 否 | 用户是否已评论(0否, 大于0评论时间) | 0 | |
is_delete_time | int(11) | 0 | 否 | 商家是否已删除(0否, 大于0删除时间) | 0 | |
user_is_delete_time | int(11) | 0 | 否 | 用户是否已删除(0否, 大于0删除时间) | 0 | |
upd_time | int(11) | 0 | 否 | 更新时间 | 0 |