+ 立即免费创建此表 返回数据库大全

MySQL建表SQL语句

数据库结构:秒杀-秒杀订单信息:https://open.yesapi.cn/tablelist/yesapi_miaosha_order_info.html


-- 数据库大全:秒杀-秒杀订单信息
-- 来源:YesApi.cn
CREATE TABLE `yesapi_miaosha_order_info` (
    `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
    `user_id` bigint(20) NULL COMMENT '用户ID',
    `goods_id` bigint(20) NULL COMMENT '商品ID',
    `delivery_addr_id` bigint(20) NULL COMMENT '收获地址ID',
    `goods_name` varchar(16) NULL COMMENT '冗余过来的商品名称',
    `goods_count` int(11) NULL DEFAULT '0' COMMENT '商品数量',
    `goods_price` decimal(10,2) NULL DEFAULT '0.00' COMMENT '商品单价',
    `order_channel` tinyint(4) NULL DEFAULT '0' COMMENT '1pc,2android,3ios',
    `yesapi_miaosha_order_info_status` tinyint(4) NULL DEFAULT '0' COMMENT '订单状态,0新建未支付,1已支付,2已发货,3已收货,4已退款,5已完成',
    `create_date` datetime NULL COMMENT '订单的创建时间',
    `pay_date` datetime NULL COMMENT '支付时间',
    PRIMARY KEY (`id`)
) ENGINE=InnoDB COMMENT '秒杀-秒杀订单信息';

复制后,到数据库执行,即可创建此数据库表。


MySQL数据库表结构设计

第 1-10 条, 共 10 条.
字段名称字段类型字段默认值是否允许为空字段描述索引字段数据示例
user_idbigint(20)用户ID无索引
goods_idbigint(20)商品ID无索引
delivery_addr_idbigint(20)收获地址ID无索引
goods_namevarchar(16)冗余过来的商品名称无索引
goods_countint(11)0商品数量无索引0
goods_pricedecimal(10,2)0.00商品单价无索引0.00
order_channeltinyint(4)01pc,2android,3ios无索引0
yesapi_miaosha_order_info_statustinyint(4)0订单状态,0新建未支付,1已支付,2已发货,3已收货,4已退款,5已完成无索引0
create_datedatetime订单的创建时间无索引
pay_datedatetime支付时间无索引

猜你喜欢

MySQL数据库设计 秒杀-商品

MySQL数据库设计 秒杀-秒杀商品

MySQL数据库设计 秒杀-秒杀订单

MySQL数据库设计 秒杀-秒杀用户

MySQL数据库设计 秒杀-用户



回到顶部 ↑