🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
~~~[sql] CREATE TABLE `xi_cart` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `member_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '会员ID', `stores_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '门店ID', `goods_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商品ID', `sku_key` varchar(32) DEFAULT NULL COMMENT '存放SKU库存量项目ID进行拼接', `number` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '购买数量', `selected` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否选中,0=>未选中,1=>已选中', `sort` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '排序', `is_trash` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '删除,0=>否,1=>是', `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态,0=>禁用,1=>启用', `created_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '创建时间', `updated_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '更新时间', PRIMARY KEY (`id`), UNIQUE KEY `goods` (`member_id`,`goods_id`,`sku_key`,`is_trash`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='购物车'; ~~~