多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
~~~[sql] CREATE TABLE `xi_member` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `username` varchar(32) NOT NULL DEFAULT '' COMMENT '用户名', `password` char(32) NOT NULL DEFAULT '' COMMENT '密码', `auth_key` varchar(32) DEFAULT NULL COMMENT '认证密钥', `mobile` varchar(16) NOT NULL DEFAULT '' COMMENT '手机号码', `avatar` varchar(255) NOT NULL DEFAULT 'http://oss.dgyouduo.com/static/img/no-image.png' COMMENT '头像', `nickname` varchar(16) NOT NULL DEFAULT '' COMMENT '用户昵称', `sex` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '性别,0=>未知,1=>男,2=>女', `wechat_openid` varchar(32) DEFAULT NULL COMMENT '微信openid', `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 `username` (`username`), UNIQUE KEY `mobile` (`mobile`), UNIQUE KEY `auth_key` (`auth_key`), UNIQUE KEY `wechat_openid` (`wechat_openid`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='会员'; ~~~ ~~~[sql] CREATE TABLE `xi_member_address` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `member_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '会员ID', `consignee` varchar(16) NOT NULL DEFAULT '' COMMENT '收货人', `mobile` varchar(16) NOT NULL DEFAULT '' COMMENT '手机', `email` varchar(32) NOT NULL COMMENT '邮箱', `country` int(11) unsigned NOT NULL DEFAULT '86' COMMENT '国家', `province` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '省份', `city` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '城市', `district` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '地区', `twon` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '乡镇', `address` varchar(64) NOT NULL DEFAULT '' COMMENT '详细地址', `zipcode` varchar(8) NOT NULL DEFAULT '' COMMENT '邮编', `longitude` varchar(16) NOT NULL COMMENT '经度', `latitude` varchar(16) NOT NULL COMMENT '纬度', `is_default` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否默认地址', `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`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='会员地址'; ~~~ ~~~[sql] CREATE TABLE `xi_member_integral` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `member_id` int(11) unsigned NOT NULL COMMENT '会员ID', `money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' 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 `member_id` (`member_id`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='会员积分'; ~~~ ~~~[sql] CREATE TABLE `xi_member_integral_log` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `member_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '会员ID', `integral_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '积分ID', `operator_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '操作者ID', `recharge_sn` varchar(32) NOT NULL DEFAULT '' COMMENT '充值唯一编码,生成规则用的是订单sn号的规则', `operate` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '操作,0=>购物奖励,1=>购物兑换,2=>手动扣除,3=>手动充值', `money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '金额', `before` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '变动前', `after` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '变动后', `remark` varchar(128) NOT NULL DEFAULT '' 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`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='会员积分记录'; ~~~ ~~~[sql] CREATE TABLE `xi_member_wallet` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `member_id` int(11) unsigned NOT NULL COMMENT '会员ID', `money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' 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 `member_id` (`member_id`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='会员钱包'; ~~~ ~~~[sql] CREATE TABLE `xi_member_wallet_log` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `member_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '会员ID', `wallet_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '钱包ID', `operator_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '操作者ID', `recharge_sn` varchar(32) NOT NULL DEFAULT '' COMMENT '充值唯一编码,生成规则用的是订单sn号的规则', `operate` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '操作,0=>会员提现,1=>会员充值,2=>手动扣除,3=>手动充值,4=>提现反驳补回余额,5=>购物消费,6=>分销奖励', `money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '金额', `before` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '变动前', `after` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '变动后', `remark` varchar(128) NOT NULL DEFAULT '' 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`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='会员钱包记录'; ~~~