From 465ed0fe59df449a216b5b198652d0dbf2864183 Mon Sep 17 00:00:00 2001 From: xiabin Date: Sat, 18 Jan 2025 17:57:56 +0800 Subject: [PATCH] add:ecpm.sql --- sql/ecpm.sql | 98 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 sql/ecpm.sql diff --git a/sql/ecpm.sql b/sql/ecpm.sql new file mode 100644 index 0000000..f40321c --- /dev/null +++ b/sql/ecpm.sql @@ -0,0 +1,98 @@ +/* + Navicat Premium Dump SQL + + Source Server : localhost + Source Server Type : MySQL + Source Server Version : 90100 (9.1.0) + Source Host : localhost:3306 + Source Schema : ecpm + + Target Server Type : MySQL + Target Server Version : 90100 (9.1.0) + File Encoding : 65001 + + Date: 18/01/2025 17:57:21 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for app_account +-- ---------------------------- +DROP TABLE IF EXISTS `app_account`; +CREATE TABLE `app_account` ( + `id` int UNSIGNED NOT NULL AUTO_INCREMENT, + `type` tinyint UNSIGNED NOT NULL COMMENT '类型(0:抖音,1:微信)', + `app_id` char(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + `secret` char(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', + `deleted_at` time NULL DEFAULT NULL, + PRIMARY KEY (`id` DESC) USING BTREE, + INDEX `app_id`(`app_id` ASC) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of app_account +-- ---------------------------- +INSERT INTO `app_account` VALUES (4, 1, 'wxd41b41895a9410ea', '1adc1cdb2a7ab7b166dd68ed89423c4e', '牛马v', NULL); +INSERT INTO `app_account` VALUES (3, 1, 'wxe8bf4985263c7e8b', 'e37f2806dac08ffc2c35906836340a3f', '糖果v', NULL); +INSERT INTO `app_account` VALUES (2, 0, 'tt5bc32d7ec4f6ccb907', 'da04822d0989831c6fd6e68ee847fa341bf6a23d', '糖果d', NULL); +INSERT INTO `app_account` VALUES (1, 0, 'tt8b32fd8f14071db707', '44018e80b1bde34395a52de67ce1e0c37c572d80', '牛马d', NULL); + +-- ---------------------------- +-- Table structure for app_user_info +-- ---------------------------- +DROP TABLE IF EXISTS `app_user_info`; +CREATE TABLE `app_user_info` ( + `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, + `app_account_id` int UNSIGNED NOT NULL COMMENT 'app_account表外键', + `openid` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + `unionid` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + `nickname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '昵称', + `avatar` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '头像', + `anonymous_openid` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '匿名openid', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of app_user_info +-- ---------------------------- +INSERT INTO `app_user_info` VALUES (1, 2, '_0005ITFnsqTvXpTC7wqg6yvQ1_mXhk1TbOv', '98be1c8a-84ab-50db-bfd6-e5a2dee9c224', '', '', ''); + +-- ---------------------------- +-- Table structure for douyin_ecpm_config +-- ---------------------------- +DROP TABLE IF EXISTS `douyin_ecpm_config`; +CREATE TABLE `douyin_ecpm_config` ( + `id` int UNSIGNED NOT NULL AUTO_INCREMENT, + `app_account_id` int UNSIGNED NOT NULL, + `ecpm_value` int UNSIGNED NOT NULL COMMENT '值', + `ecpm_view` int UNSIGNED NOT NULL COMMENT '浏览次数', + PRIMARY KEY (`id`) USING BTREE, + INDEX `app_account_id`(`app_account_id` ASC) USING BTREE, + CONSTRAINT `app_account_id` FOREIGN KEY (`app_account_id`) REFERENCES `app_account` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT +) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of douyin_ecpm_config +-- ---------------------------- +INSERT INTO `douyin_ecpm_config` VALUES (1, 1, 200, 2); +INSERT INTO `douyin_ecpm_config` VALUES (2, 2, 200, 2); + +-- ---------------------------- +-- Table structure for game_score +-- ---------------------------- +DROP TABLE IF EXISTS `game_score`; +CREATE TABLE `game_score` ( + `app_user_id` bigint UNSIGNED NOT NULL, + `app_account` int UNSIGNED NOT NULL, + `score` int UNSIGNED NOT NULL DEFAULT 0, + PRIMARY KEY (`app_user_id`, `app_account`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of game_score +-- ---------------------------- + +SET FOREIGN_KEY_CHECKS = 1;