初心小程序
#数据库 ucs
CREATE TABLE `tb_mindfire` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`pid` int(11) NOT NULL DEFAULT '0' COMMENT '如果是付费的,则有pid',
`from_user_openid` varchar(100) NOT NULL COMMENT '分享者openid',
`to_user_openid` varchar(100) DEFAULT NULL COMMENT '被分享者openid',
`context` varchar(255) NOT NULL COMMENT '过滤特殊字符之后的表白内容',
`context_tmp` varchar(255) NOT NULL COMMENT '原始表白内容',
`context_hash` varchar(255) DEFAULT NULL COMMENT '内容哈希值',
`context_hash_resource` varchar(255) DEFAULT NULL COMMENT '组合后的哈希原文',
`deal_hash` varchar(100) DEFAULT NULL COMMENT '交易哈希',
`block` int(11) DEFAULT NULL COMMENT '块高度',
`company_spend` varchar(255) DEFAULT NULL COMMENT '实际支付',
`order_id` varchar(255) DEFAULT NULL COMMENT '如果加速,付费订单号',
`order_type` varchar(255) DEFAULT NULL COMMENT '支付类型',
`type` smallint(1) NOT NULL COMMENT '1代表表白,2代表承诺,3代表心愿',
`status` smallint(1) NOT NULL DEFAULT '1' COMMENT '1代表预处理(分享未点击),2代表待上链(分享已点击),3代表正在上链,4代表交易成功,5代表交易失败,6代表交易隐藏',
`is_show` smallint(1) NOT NULL DEFAULT '1' COMMENT '是否在首页展示,默认1展示,2不展示',
`success_time` timestamp NULL DEFAULT NULL COMMENT '上链成功时间',
`begin_time` timestamp NULL DEFAULT NULL COMMENT '开始上链时间',
`add_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`lastupdatetime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `deal_hash` (`deal_hash`) USING BTREE,
KEY `order_id` (`order_id`),
KEY `pid` (`pid`),
KEY `from_user_openid` (`from_user_openid`),
KEY `to_user_openid` (`to_user_openid`),
KEY `success_time` (`success_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
CREATE TABLE `tb_mindfire_gas_price_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`index_date` varchar(255) NOT NULL,
`gas_price` varchar(255) NOT NULL,
`type` smallint(1) NOT NULL DEFAULT '1' COMMENT '1是脚本自动添加,2是手动添加',
`add_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`lastupdatetime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `add_time` (`add_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
CREATE TABLE `tb_mindfire_likenum` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`assoc_id` int(11) NOT NULL,
`open_id` varchar(255) NOT NULL,
`add_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`lastupdatetime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `assoc_id` (`assoc_id`,`open_id`),
KEY `open_id` (`open_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
CREATE TABLE `tb_mindfire_rate_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`indexdate` int(11) NOT NULL,
`rate` varchar(255) NOT NULL,
`add_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`lastupdatetime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `indexdate` (`indexdate`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
CREATE TABLE `tb_mindfire_success` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`assoc_id` int(11) NOT NULL,
`add_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`lastupdatetime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `add_time` (`add_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
CREATE TABLE `tb_mindfire_user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`mindfire_openid` varchar(100) NOT NULL COMMENT '初心openid',
`nike_name` varchar(255) NOT NULL COMMENT '昵称',
`logo_img` varchar(255) NOT NULL COMMENT '头像',
`logo_img_upload` varchar(255) DEFAULT NULL COMMENT '上传到服务器的地址',
`phone` varchar(255) DEFAULT NULL COMMENT '手机号',
`add_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`lastupdatetime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `mindfire_openid` (`mindfire_openid`),
KEY `phone` (`phone`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4