修复一些问题,个人账号功能完善,注册功能完善,收藏,购物车功能完善,初版基本完成,投入测试
This commit is contained in:
@@ -235,7 +235,7 @@ create table t_user
|
||||
shop_id bigint unsigned default 0 null comment '所属店铺ID,关联店铺表主键(0表示无所属店铺)',
|
||||
nickname varchar(50) not null comment '用户昵称',
|
||||
account varchar(50) not null comment '用户账号(登录用)',
|
||||
phone varchar(20) null comment '手机号',
|
||||
phone varchar(50) null comment '手机号',
|
||||
email varchar(100) null comment '邮箱',
|
||||
phone_verified tinyint unsigned default 0 null comment '手机号是否已验证:0-未验证,1-已验证',
|
||||
email_verified tinyint unsigned default 0 null comment '邮箱是否已验证:0-未验证,1-已验证',
|
||||
@@ -576,4 +576,25 @@ create table t_order_item
|
||||
) comment '订单商品表';
|
||||
|
||||
create index idx_order_id
|
||||
on t_order_item (order_id) comment '按订单查询商品的索引';
|
||||
on t_order_item (order_id) comment '按订单查询商品的索引';
|
||||
|
||||
|
||||
-- 商品收藏表
|
||||
create table t_wishlist
|
||||
(
|
||||
id bigint unsigned auto_increment comment '收藏记录唯一主键ID'
|
||||
primary key comment '商品收藏主键索引',
|
||||
user_id bigint unsigned not null comment '关联用户表主键',
|
||||
product_id bigint unsigned not null comment '关联商品表主键',
|
||||
create_time datetime default CURRENT_TIMESTAMP not null comment '创建时间',
|
||||
update_time datetime default CURRENT_TIMESTAMP not null on update CURRENT_TIMESTAMP comment '更新时间',
|
||||
is_delete tinyint unsigned default 0 null comment '逻辑删除:0-未删除,1-已删除',
|
||||
constraint uk_user_product
|
||||
unique (user_id, product_id) comment '用户-商品唯一索引'
|
||||
) comment '商品收藏表';
|
||||
|
||||
create index idx_user_id
|
||||
on t_wishlist (user_id) comment '按用户查询收藏的索引';
|
||||
|
||||
create index idx_product_id
|
||||
on t_wishlist (product_id) comment '按商品查询收藏的索引';
|
||||
|
||||
Reference in New Issue
Block a user