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

MySQL建表SQL语句

数据库结构:商城系统-商品点赞和收藏表:https://open.yesapi.cn/tablelist/yesapi_yshopmall_yx_store_product_relation.html


-- 数据库大全:商城系统-商品点赞和收藏表
-- 来源:YesApi.cn
CREATE TABLE `yesapi_yshopmall_yx_store_product_relation` (
    `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
    `uid` bigint(20) NULL COMMENT '用户ID',
    `product_id` bigint(20) NULL COMMENT '商品ID',
    `yesapi_yshopmall_yx_store_product_relation_type` varchar(32) NULL COMMENT '类型(收藏(collect)、点赞(like))',
    `category` varchar(32) NULL COMMENT '某种类型的商品(普通商品、秒杀商品)',
    `create_time` datetime NULL COMMENT '添加时间',
    `is_del` tinyint(1) NULL DEFAULT '0' COMMENT '',
    KEY `uid` (`uid`),
    KEY `yesapi_yshopmall_yx_store_product_relation_type` (`yesapi_yshopmall_yx_store_product_relation_type`),
    KEY `category` (`category`),
    PRIMARY KEY (`id`)
) ENGINE=InnoDB COMMENT '商城系统-商品点赞和收藏表';

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


MySQL数据库表结构设计

第 1-6 条, 共 6 条.
字段名称字段类型字段默认值是否允许为空字段描述索引字段数据示例
uidbigint(20)用户ID普通索引
product_idbigint(20)商品ID无索引
yesapi_yshopmall_yx_store_product_relation_typevarchar(32)类型(收藏(collect)、点赞(like))普通索引
categoryvarchar(32)某种类型的商品(普通商品、秒杀商品)普通索引
create_timedatetime添加时间无索引
is_deltinyint(1)0无索引0

猜你喜欢

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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



回到顶部 ↑