数据库表设计
会员卡表
![a9dbc7b34afbaa2b2d3ea2b54a0f80ef.png](https://i-blog.csdnimg.cn/blog_migrate/cda9c50d6921720e49c3bcc3c539e5ea.jpeg)
会员卡配置表
![53141ce80d67f69a2892b908ee4604f2.png](https://i-blog.csdnimg.cn/blog_migrate/379f94a0ac84b39dff27e846775bd3df.jpeg)
用户购买会员卡表
![1ce5d043e035c7fd00c1496ea87b11f1.png](https://i-blog.csdnimg.cn/blog_migrate/0c5bd2a63bea67256a59dae3cd92e9fa.jpeg)
用户领取优惠券记录表
![fd0974c0cd28ac61af0fde0af248b5f8.png](https://i-blog.csdnimg.cn/blog_migrate/8b2944c8e300b8a4f23699a6ff42b7fa.jpeg)
mysql脚本
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for mcs_member_card
-- ----------------------------
DROP TABLE IF EXISTS `mcs_member_card`;
CREATE TABLE `mcs_member_card` (
`id` char(36) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'guid主键',
`site_id` int(10) NULL DEFAULT NULL COMMENT '站点',
`member_level` tinyint(4) NULL DEFAULT NULL COMMENT '会员级别',
`card_image` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '默认图片',
`card_amount` bigint(20) NULL DEFAULT NULL COMMENT '会员卡金额',
`card_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NUL