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

MySQL建表SQL语句

数据库结构:商城系统-购物车表:https://open.yesapi.cn/tablelist/yesapi_yshopmall_yx_store_cart.html


-- 数据库大全:商城系统-购物车表
-- 来源:YesApi.cn
CREATE TABLE `yesapi_yshopmall_yx_store_cart` (
    `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
    `product_id` bigint(20) NOT NULL COMMENT '商品ID',
    `product_attr_unique` varchar(50) NOT NULL COMMENT '商品属性',
    `cart_num` smallint(5) NOT NULL DEFAULT '0' COMMENT '商品数量',
    `create_time` datetime NOT NULL COMMENT '添加时间',
    `is_pay` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0 = 未购买 1 = 已购买',
    `is_del` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否删除',
    `is_new` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否为立即购买',
    `combination_id` int(10) NOT NULL DEFAULT '0' COMMENT '拼团id',
    `seckill_id` int(10) NOT NULL DEFAULT '0' COMMENT '秒杀产品ID',
    `bargain_id` int(10) NOT NULL DEFAULT '0' COMMENT '砍价id',
    `uid` bigint(20) NOT NULL COMMENT '用户ID',
    `yesapi_yshopmall_yx_store_cart_type` varchar(32) NOT NULL DEFAULT 'product' COMMENT '类型',
    KEY `product_id` (`product_id`),
    KEY `uid` (`uid`),
    KEY `yesapi_yshopmall_yx_store_cart_type` (`yesapi_yshopmall_yx_store_cart_type`),
    PRIMARY KEY (`id`)
) ENGINE=InnoDB COMMENT '商城系统-购物车表';

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


MySQL数据库表结构设计

第 1-12 条, 共 12 条.
字段名称字段类型字段默认值是否允许为空字段描述索引字段数据示例
product_idbigint(20)商品ID普通索引
product_attr_uniquevarchar(50)商品属性无索引
cart_numsmallint(5)0商品数量无索引0
create_timedatetime添加时间无索引
is_paytinyint(1)00 = 未购买 1 = 已购买无索引0
is_deltinyint(1)0是否删除无索引0
is_newtinyint(1)0是否为立即购买无索引0
combination_idint(10)0拼团id无索引0
seckill_idint(10)0秒杀产品ID无索引0
bargain_idint(10)0砍价id无索引0
uidbigint(20)用户ID普通索引
yesapi_yshopmall_yx_store_cart_typevarchar(32)product类型普通索引product

猜你喜欢

MySQL数据库设计 商城系统-支付宝配置类

MySQL数据库设计 商城系统-代码生成字段信息存储

MySQL数据库设计 商城系统-部门

MySQL数据库设计 商城系统-数据字典

MySQL数据库设计 商城系统-数据字典详情

MySQL数据库设计 商城系统-邮箱配置

MySQL数据库设计 商城系统-代码生成器配置

MySQL数据库设计 商城系统-代码生成测试

MySQL数据库设计 商城系统-岗位

MySQL数据库设计 商城系统-本地存储

MySQL数据库设计 商城系统-系统日志

MySQL数据库设计 商城系统-菜单

MySQL数据库设计 商城系统-Sm.Ms图床

MySQL数据库设计 商城系统-七牛云配置

MySQL数据库设计 商城系统-七牛云文件存储

MySQL数据库设计 商城系统-定时任务

MySQL数据库设计 商城系统-定时任务日志

MySQL数据库设计 商城系统-角色表

MySQL数据库设计 商城系统-角色部门关联

MySQL数据库设计 商城系统-角色菜单关联



回到顶部 ↑