DROP TABLE IF EXISTS `lm_user`;
CREATE TABLE `lm_user`  (
  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  `uuid` varchar (128)  DEFAULT '' COMMENT 'uuid',
  `code` varchar (128)  DEFAULT '' COMMENT '邀请码',
  `phone` varchar (20)  DEFAULT '' COMMENT '手机号',
  `mail` varchar (20)  DEFAULT '' COMMENT '邮件',
  `name` varchar (128)  DEFAULT '' COMMENT '呢称',
  `pwd` varchar (255)  DEFAULT '' COMMENT '密码',
  `token` varchar (255)  DEFAULT '' COMMENT 'token',
  `money` decimal (20,2)  DEFAULT '0' COMMENT '通证余额',
  `ensure_money` decimal (20,2)  DEFAULT '0' COMMENT '保证金',
  `push_money` decimal (20,2)  DEFAULT '0' COMMENT '可售额度',
  `pool_money` decimal (20,2)  DEFAULT '0' COMMENT '矿池矿金',
  `status` int (1)  DEFAULT '0' COMMENT '0 正常 1 禁止登录',
  `status_time` varchar (20)  DEFAULT '' COMMENT '封号时间',
  `add_time` varchar (20)  DEFAULT '' COMMENT '创建时间',
  `update_time` varchar (20)  DEFAULT '' COMMENT '更新时间即使活跃时间',
  `vip_level` int (1)  DEFAULT 0 COMMENT ' 等级 ',
  `is_admin` int (1)  DEFAULT 0 COMMENT '0 不是后台账号 1是 ',
  `sex` varchar (10)  DEFAULT '男' COMMENT '男女 ',
  `image` varchar (255)  DEFAULT '' COMMENT '头像 ',
  `pid` int (11)  DEFAULT 0 COMMENT '上级id ',
  `team` int (11)  DEFAULT 0 COMMENT '团队人数 ',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '用户表' ROW_FORMAT = Compact;


DROP TABLE IF EXISTS `lm_user_message`;
CREATE TABLE `lm_user_message`  (
  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` int (11)  DEFAULT 0 COMMENT '用户id',
  `phone` varchar (20)  DEFAULT '' COMMENT '手机号',
  `name` varchar (20)  DEFAULT '' COMMENT '银行卡持卡人',
  `bank_name` varchar (255)  DEFAULT '' COMMENT '银行卡名称',
  `bank_number` varchar (255)  DEFAULT '' COMMENT '银行卡号',
  `bank_branch` varchar (255)  DEFAULT '' COMMENT '开户支行',
  `ali_pay` varchar (255)  DEFAULT '' COMMENT '支付宝账号',
  `wx_pay` varchar (255)  DEFAULT '' COMMENT '微信账号',
  `ali_pay_image` varchar (255)  DEFAULT '' COMMENT '支付宝收款码',
  `wx_pay_image` varchar (255)  DEFAULT '' COMMENT '微信收款码',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '会员收款信息' ROW_FORMAT = Compact;

DROP TABLE IF EXISTS `lm_user_level`;
CREATE TABLE `lm_user_level`  (
  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  `level` int (11)  DEFAULT 0 COMMENT '等级',
  `bili` varchar (20)  DEFAULT '0' COMMENT '优惠比例',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '会员等级优惠' ROW_FORMAT = Compact;



DROP TABLE IF EXISTS `lm_banner`;
CREATE TABLE `lm_banner`  (
  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  `image` varchar (255)  DEFAULT '' COMMENT '图片',
  `status` int (1)  DEFAULT '0' COMMENT '0 显示 1 不显示',
  `text` text  DEFAULT '' COMMENT '内容',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '轮播图' ROW_FORMAT = Compact;

DROP TABLE IF EXISTS `lm_notice`;
CREATE TABLE `lm_notice`  (
  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  `name` varchar (255)  DEFAULT '' COMMENT '标题',
  `status` int (1)  DEFAULT '0' COMMENT '0 显示 1 不显示',
  `text` text  DEFAULT '' COMMENT '内容',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '公告' ROW_FORMAT = Compact;

DROP TABLE IF EXISTS `lm_message`;
CREATE TABLE `lm_message`  (
  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  `type` int (10)  DEFAULT '0' COMMENT '0 系统提示 1 资金 2 交易',
  `name` varchar (255)  DEFAULT '' COMMENT '标题',
  `add_time` varchar (20)  DEFAULT '' COMMENT '添加时间',
  `status` int (1)  DEFAULT '0' COMMENT '0 未度 1 已读',
  `content` varchar (255)  DEFAULT '' COMMENT '说明',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '消息推送' ROW_FORMAT = Compact;


DROP TABLE IF EXISTS `lm_problem`;
CREATE TABLE `lm_problem`  (
  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  `name` varchar (255)  DEFAULT '' COMMENT '标题',
  `text` text  DEFAULT '' COMMENT '说明',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '常见问题' ROW_FORMAT = Compact;


DROP TABLE IF EXISTS `lm_phone_code`;
CREATE TABLE `lm_phone_code`  (
  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  `phone` varchar (255)  DEFAULT '' COMMENT '手机号',
  `code` varchar (20)  DEFAULT '' COMMENT '验证码',
  `type` int (1)  DEFAULT 0 COMMENT '0 手机号码 1 邮箱验证',
  `add_time` varchar (20)  DEFAULT '' COMMENT '验证码',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '验证码' ROW_FORMAT = Compact;

DROP TABLE IF EXISTS `lm_feedback`;
CREATE TABLE `lm_feedback`  (
  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` int (11) DEFAULT 0 COMMENT '用户id',
  `content` varchar (255)DEFAULT '' COMMENT '内容',
  `image` text DEFAULT '' COMMENT '图片，拼接',
  `add_time` text DEFAULT '' COMMENT '添加时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '反馈意见' ROW_FORMAT = Compact;

DROP TABLE IF EXISTS `lm_state`;
CREATE TABLE `lm_state`  (
  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` int (11) DEFAULT 0 COMMENT '用户id',
  `order` int (11) DEFAULT 0 COMMENT '订单id',
  `content` varchar (255)DEFAULT '' COMMENT '内容',
  `image` text DEFAULT '' COMMENT '图片，拼接',
  `add_time` text DEFAULT '' COMMENT '添加时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '申述' ROW_FORMAT = Compact;

DROP TABLE IF EXISTS `lm_mining`;
CREATE TABLE `lm_mining`  (
  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  `num` int (11)  DEFAULT 0 COMMENT '数量',
  `mining` int (11)  DEFAULT 0 COMMENT '矿池数量',
  `enlarge_quota` int (11)  DEFAULT 0 COMMENT '放大额度',
   `ensure_money` decimal (20,2)  DEFAULT '0' COMMENT '保证金 买入人缴费',
   `breach_money` decimal (20,2)  DEFAULT '0' COMMENT '违约金 买入人缴费',
   `tong_money` decimal (20,2)  DEFAULT '0' COMMENT '手续费 通证卖出人缴费',
   `out_game` decimal (20,2)  DEFAULT '0' COMMENT '出局通证卖出人手续费',
   `direct_push` decimal (20,2)  DEFAULT '0' COMMENT '直推获得',
   `second_push` decimal (20,2)  DEFAULT '0' COMMENT '次推获得',
   `create_time` varchar (20)DEFAULT '' COMMENT '创建时间',
   `status` int (1)DEFAULT 0 COMMENT '0 进行中 1 暂停中',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '矿区' ROW_FORMAT = Compact;

DROP TABLE IF EXISTS `lm_order`;
CREATE TABLE `lm_order`  (
  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  `type` int (1)  DEFAULT 0 COMMENT '0 买入 1 卖出 废除',
  `buy_user` int (11)  DEFAULT 0 COMMENT '购买用户id',
  `push_user` int (11)  DEFAULT 0 COMMENT '卖出用户id',
  `number` int (11)  DEFAULT 0 COMMENT '发布数量',
  `enlarge_quota` int (11)  DEFAULT 0 COMMENT '放大额度',
  `order` varchar (255)  DEFAULT '' COMMENT '订单编号',
  `mining_id` int (11)  DEFAULT 0 COMMENT '区块id',
  `status` int (1)  DEFAULT 0 COMMENT '0 未匹配 1 已匹配或待支付 2已上传数据 3 已完成 4 已撤销 5 交易失败',
  `add_time` varchar (20)  DEFAULT '' COMMENT '添加时间',
  `stat_time` varchar (20)  DEFAULT '' COMMENT '未支付结束时间',
  `end_time` varchar (20)  DEFAULT '' COMMENT '完成时间',
  `msg` varchar (255)  DEFAULT '' COMMENT '失败原因',
  `image`text  DEFAULT '' COMMENT '上传图片，拼接',
    `ensure_money` decimal (20,2)  DEFAULT '0' COMMENT '保证金 买入人缴费',
   `out_game` decimal (20,2)  DEFAULT '0' COMMENT '出局手续费',
     `tong_money` decimal (20,2)  DEFAULT '0' COMMENT '通证',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '发布订单' ROW_FORMAT = Compact;

DROP TABLE IF EXISTS `lm_order_frequency`;
CREATE TABLE `lm_order_frequency`  (
  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` int (11)  DEFAULT 0 COMMENT '用户id',
  `mining_id` int (11)  DEFAULT 0 COMMENT '区块id',
  `buy` int (11)  DEFAULT 0 COMMENT '买入次数',
  `push` int (11)  DEFAULT 0 COMMENT '卖出次数',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '交易次数统计' ROW_FORMAT = Compact;

DROP TABLE IF EXISTS `lm_vendibility_finance`;
CREATE TABLE `lm_vendibility_finance`  (
  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` int (11)  DEFAULT 0 COMMENT '用户id',
  `mining_id` int (11)  DEFAULT 0 COMMENT '区块id',
  `order_id` int (11)  DEFAULT 0 COMMENT '订单id',
  `money` decimal (20,2)  DEFAULT 0 COMMENT '获得交易区块',
  `pool` int(11)  DEFAULT 0 COMMENT '矿池数量',
  `push_money` decimal (20,2)  DEFAULT 0 COMMENT '可售额度',
  `add_time` varchar (20) DEFAULT '' COMMENT '添加时间',
  `buy` int (11) DEFAULT 0 COMMENT '当前买入次数',
  `push` int (11) DEFAULT 0 COMMENT '当前卖出次数',
  `status` int (1) DEFAULT 0 COMMENT '0 增加 1 减少',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '可售余额' ROW_FORMAT = Compact;


DROP TABLE IF EXISTS `lm_commission_finance`;
CREATE TABLE `lm_commission_finance`  (
  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` int (11)  DEFAULT 0 COMMENT '用户id',
  `name` varchar (255)  DEFAULT '' COMMENT '名称',
  `money` decimal (20,2)  DEFAULT 0 COMMENT '金额',
   `status` int (1) DEFAULT 0 COMMENT '0 增加 1 减少',
  `add_time` varchar (20) DEFAULT 0 COMMENT '添加时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '佣金记录' ROW_FORMAT = Compact;


DROP TABLE IF EXISTS `lm_bond_finance`;
CREATE TABLE `lm_bond_finance`  (
  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` int (11)  DEFAULT 0 COMMENT '用户id',
  `name` varchar (255)  DEFAULT '' COMMENT '名称',
  `money` decimal (20,2)  DEFAULT 0 COMMENT '金额',
   `status` int (1) DEFAULT 0 COMMENT '0 增加 1 减少',
  `add_time` varchar (20) DEFAULT 0 COMMENT '添加时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '保证金记录' ROW_FORMAT = Compact;

DROP TABLE IF EXISTS `lm_bond`;
CREATE TABLE `lm_bond`  (
  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` int (11)  DEFAULT 0 COMMENT '用户id',
  `type` int (1)  DEFAULT 0 COMMENT '0 充值 1 提现',
  `money` decimal (20,2)  DEFAULT 0 COMMENT '金额',
   `status` int (1) DEFAULT 0 COMMENT '0 申请中 1 审核通过',
  `add_time` varchar (20) DEFAULT 0 COMMENT '添加时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '保证金提现和充值' ROW_FORMAT = Compact;


DROP TABLE IF EXISTS `lm_general_finance`;
CREATE TABLE `lm_general_finance`  (
  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` int (11)  DEFAULT 0 COMMENT '用户id',
  `money` decimal (20,2)  DEFAULT 0 COMMENT '金额',
  `actual_money` decimal (20,2)  DEFAULT 0 COMMENT '实际到账金额',
  `charge_money` decimal (20,2)  DEFAULT 0 COMMENT '手续费',
   `status` int (1) DEFAULT 0 COMMENT '0 申请中 1 审核通过',
  `add_time` varchar (20) DEFAULT 0 COMMENT '添加时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '通证充值' ROW_FORMAT = Compact;


DROP TABLE IF EXISTS `lm_general_transfer`;
CREATE TABLE `lm_general_transfer`  (
  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` int (11)  DEFAULT 0 COMMENT '用户id',
  `puser_id` int (11)  DEFAULT 0 COMMENT '收款用户id',
  `account` varchar (255)  DEFAULT 0 COMMENT '转账账户',
  `money` decimal (20,2)  DEFAULT 0 COMMENT '金额',
   `status` int (1) DEFAULT 0 COMMENT '0 申请中 1 审核通过',
  `add_time` varchar (20) DEFAULT 0 COMMENT '添加时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '通证转账' ROW_FORMAT = Compact;


DROP TABLE IF EXISTS `lm_finance`;
CREATE TABLE `lm_finance`  (
  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` int (11)  DEFAULT 0 COMMENT '用户id',
  `name` varchar (255)  DEFAULT 0 COMMENT '说明',
  `money` decimal (20,2)  DEFAULT 0 COMMENT '金额',
  `status` int (1)  DEFAULT 0 COMMENT '0 增加 1减少',
  `add_time` varchar (20) DEFAULT 0 COMMENT '添加时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '资产明细' ROW_FORMAT = Compact;


DROP TABLE IF EXISTS `lm_system`;
CREATE TABLE `lm_system`  (
  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  `name` varchar (128)  DEFAULT '' COMMENT '变量名称',
  `value` text  DEFAULT '' COMMENT '内容',
  `type` varchar (128) DEFAULT '' COMMENT '类型',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统设置' ROW_FORMAT = Compact;


DROP TABLE IF EXISTS `lm_about`;
CREATE TABLE `lm_about`  (
  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  `text` text  DEFAULT '' COMMENT '内容',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '关于我们' ROW_FORMAT = Compact;



DROP TABLE IF EXISTS `lm_quotation`;
CREATE TABLE `lm_quotation`  (
  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
   `day` int (11) not null  DEFAULT '0' COMMENT '星期几',
   `status` int (1) not null  DEFAULT '0' COMMENT '0 开启中 1 关闭',
   `stat` int (11) not null  DEFAULT '0' COMMENT '开始时间',
   `end` int (11) 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 = Compact;