12345678910111213141516171819202122232425262728293031323334353637383940 |
- -- 拓展商品二维码分享功能,扩展相关的数据表
- /*分享链接表*/
- CREATE TABLE `distri_share_link` (
- `id` bigint NOT NULL AUTO_INCREMENT COMMENT '分享链接id',
- `name` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '链接名称',
- `status` tinyint NOT NULL DEFAULT 1 COMMENT '状态:是否启用。默认为1,表示启用;当值为0时,表示停用。',
- `create_user_id` bigint NOT NULL COMMENT '创建链接的用户id,关联消费者member_user表的主键',
- `category` tinyint NOT NULL COMMENT '分享链接类型编码:1.商城,2.店铺,3.商品',
- `object_id` bigint NULL COMMENT '链接对应业务对象id:如果“链接类型”是3=商品,这个id就是商品的spu表的id,即product_spu.id值。',
- `register_user_count` int NOT NULL DEFAULT 0 COMMENT '通过本分享链接,累计注册的用户总数,默认值是0。每注册一个新用户,累加1.',
- `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',
- `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者',
- `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
- `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',
- PRIMARY KEY (`id`) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '分享链接表' ROW_FORMAT = Dynamic;
- /*通过分享链接,新注册用户表*/
- CREATE TABLE `distri_share_link_register` (
- `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键id',
- `distri_share_link_id` bigint NOT NULL COMMENT '分享链接表id:关联分享链接表,本记录对应的分享链接表记录',
- `register_user_id` bigint NOT NULL COMMENT '注册用户id:通过distri_share_link_id分享链接,新注册的用户id,对应member_user表的id',
- `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',
- `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者',
- `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
- `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',
- PRIMARY KEY (`id`) USING BTREE
- ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '通过分享链接,新注册用户表' ROW_FORMAT = Dynamic;
|