|
|
@@ -0,0 +1,23 @@
|
|
|
+DROP TABLE IF EXISTS `hy_monitor_consume`;
|
|
|
+CREATE TABLE `hy_monitor_consume`
|
|
|
+(
|
|
|
+ `id` bigint(20) NOT NULL,
|
|
|
+ `auth_id` bigint(20) NULL DEFAULT NULL,
|
|
|
+ `mechanism_id` bigint(20) NULL DEFAULT NULL COMMENT '消费场所',
|
|
|
+ `user_id` bigint(255) NULL DEFAULT NULL COMMENT '消费用户',
|
|
|
+ `source_area` varchar(100) NULL DEFAULT NULL COMMENT '来源地区',
|
|
|
+ `money` decimal(11, 2) NULL DEFAULT NULL COMMENT '消费金额',
|
|
|
+ `gender` tinyint(4) NULL DEFAULT 1 COMMENT '性别 1、男 2、女',
|
|
|
+ `age` int(11) NULL DEFAULT 0 COMMENT '年龄',
|
|
|
+ `age_section` tinyint(4) NULL DEFAULT 1 COMMENT '1、0-17岁 2、18-22岁 3、23-26岁 4、26岁以上',
|
|
|
+ `creator` bigint(20) NULL DEFAULT NULL COMMENT '创建者',
|
|
|
+ `create_date` datetime NULL DEFAULT NULL COMMENT '创建时间',
|
|
|
+ `is_deleted` tinyint(4) NULL DEFAULT 0 COMMENT '是否已删除 0 否 1 是',
|
|
|
+ PRIMARY KEY (`id`) USING BTREE,
|
|
|
+ INDEX `idx_authid_isdeleted_userid_sourcearea`(`auth_id`, `is_deleted`, `user_id`, `source_area`) USING BTREE,
|
|
|
+ INDEX `idx_authid_isdeleted_money`(`auth_id`, `is_deleted`, `money`) USING BTREE,
|
|
|
+ INDEX `idx_authid_isdeleted_createdate`(`auth_id`, `is_deleted`, `create_date`) USING BTREE,
|
|
|
+ INDEX `idx_isdeleted_createdate`(`is_deleted`, `create_date`) USING BTREE,
|
|
|
+ INDEX `idx_authid_isdeleted_userid_agesection`(`auth_id`, `is_deleted`, `user_id`, `age_section`) USING BTREE,
|
|
|
+ INDEX `create_date`(`create_date`) USING BTREE
|
|
|
+) ENGINE=InnoDB COMMENT='文旅行业-产业监测系统-用户消费数据';
|