/*
 Navicat Premium Dump SQL

 Source Server         : 101.200.130.134
 Source Server Type    : MySQL
 Source Server Version : 50728 (5.7.28)
 Source Host           : 101.200.130.134:3306
 Source Schema         : mallink

 Target Server Type    : MySQL
 Target Server Version : 50728 (5.7.28)
 File Encoding         : 65001

 Date: 01/08/2025 23:04:26
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for wx_vtwo_activity_grant_export_two
-- ----------------------------
DROP TABLE IF EXISTS `wx_vtwo_activity_grant_export_two`;
CREATE TABLE `wx_vtwo_activity_grant_export_two`  (
                                                      `id` bigint(20) NOT NULL COMMENT '主键ID',
                                                      `tenant_id` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '租户ID',
                                                      `parent_tenant_id` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '父租户ID',
                                                      `activity_id` bigint(20) NOT NULL COMMENT '活动ID',
                                                      `activity_type` smallint(1) NOT NULL,
                                                      `activity_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
                                                      `order_money_sum` decimal(10, 2) NOT NULL COMMENT '订单总金额',
                                                      `order_count` int(11) NOT NULL COMMENT '订单数量',
                                                      `cus_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '客户姓名',
                                                      `cus_phone` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '客户电话',
                                                      `lottery_num` json NULL COMMENT '抽奖券编码',
                                                      `lottery_count` int(11) NULL DEFAULT NULL COMMENT '抽奖券数量',
                                                      `anniversary_lottery_num` json NULL COMMENT '周年庆抽奖编码',
                                                      `real_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '实际领奖人',
                                                      `real_card` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '实际领奖人身份证号',
                                                      `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
                                                      `sign_img` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '签名图片',
                                                      `status` smallint(1) NOT NULL DEFAULT 1,
                                                      `grant_by` bigint(20) NULL DEFAULT NULL,
                                                      `grant_by_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
                                                      `grant_time` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
                                                      `order_detail` json NULL COMMENT '订单信息',
                                                      `order_grant_detail` json NULL COMMENT '订单发奖',
                                                      `order_grant_count` int(11) NULL DEFAULT NULL,
                                                      `joint_grant_detail` json NULL COMMENT '联单发奖',
                                                      `joint_grant_count` int(11) NULL DEFAULT NULL,
                                                      `cash_back_limit` decimal(10, 2) NULL DEFAULT NULL COMMENT '返现金额限制',
                                                      `cash_back` decimal(10, 2) NULL DEFAULT NULL COMMENT '返现金额',
                                                      `tax_deduction_rules` json NULL COMMENT '扣税规则',
                                                      `tax_amount` decimal(10, 2) NULL DEFAULT NULL COMMENT '税点金额',
                                                      PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '线下活动发奖' ROW_FORMAT = DYNAMIC;

SET FOREIGN_KEY_CHECKS = 1;
