代码拉取完成,页面将自动刷新
/*
Navicat Premium Data Transfer
Source Server : ad
Source Server Type : MySQL
Source Server Version : 50721
Source Host : localhost:3306
Source Schema : db_srb
Target Server Type : MySQL
Target Server Version : 50721
File Encoding : 65001
Date: 02/10/2021 16:24:30
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for borrow_info
-- ----------------------------
DROP TABLE IF EXISTS `borrow_info`;
CREATE TABLE `borrow_info` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '编号',
`user_id` bigint(20) NOT NULL DEFAULT 0 COMMENT '借款用户id',
`amount` decimal(10, 2) NULL DEFAULT NULL COMMENT '借款金额',
`period` int(11) NULL DEFAULT NULL COMMENT '借款期限',
`borrow_year_rate` decimal(10, 2) NULL DEFAULT NULL COMMENT '年化利率',
`return_method` tinyint(3) NULL DEFAULT NULL COMMENT '还款方式 1-等额本息 2-等额本金 3-每月还息一次还本 4-一次还本',
`money_use` tinyint(3) NULL DEFAULT NULL COMMENT '资金用途',
`status` tinyint(3) NOT NULL DEFAULT 0 COMMENT '状态(0:未提交,1:审核中, 2:审核通过, -1:审核不通过)',
`create_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
`update_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '更新时间',
`is_deleted` tinyint(1) NOT NULL DEFAULT 0 COMMENT '逻辑删除(1:已删除,0:未删除)',
PRIMARY KEY (`id`) USING BTREE,
INDEX `idx_user_id`(`user_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '借款信息表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for borrower
-- ----------------------------
DROP TABLE IF EXISTS `borrower`;
CREATE TABLE `borrower` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '编号',
`user_id` bigint(20) NOT NULL DEFAULT 0 COMMENT '用户id',
`name` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '姓名',
`id_card` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0' COMMENT '身份证号',
`mobile` varchar(11) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '手机',
`sex` tinyint(3) NULL DEFAULT NULL COMMENT '性别(1:男 0:女)',
`age` tinyint(3) NULL DEFAULT NULL COMMENT '年龄',
`education` tinyint(3) NULL DEFAULT NULL COMMENT '学历',
`is_marry` tinyint(1) NULL DEFAULT NULL COMMENT '是否结婚(1:是 0:否)',
`industry` tinyint(3) NULL DEFAULT NULL COMMENT '行业',
`income` tinyint(3) NULL DEFAULT NULL COMMENT '月收入',
`return_source` tinyint(3) NULL DEFAULT NULL COMMENT '还款来源',
`contacts_name` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '联系人名称',
`contacts_mobile` varchar(11) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '联系人手机',
`contacts_relation` tinyint(3) NULL DEFAULT NULL COMMENT '联系人关系',
`status` tinyint(3) NOT NULL DEFAULT 0 COMMENT '状态(0:未认证,1:认证中, 2:认证通过, -1:认证失败)',
`create_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
`update_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '更新时间',
`is_deleted` tinyint(1) NOT NULL DEFAULT 0 COMMENT '逻辑删除(1:已删除,0:未删除)',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `uk_user_id`(`user_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '借款人' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for borrower_attach
-- ----------------------------
DROP TABLE IF EXISTS `borrower_attach`;
CREATE TABLE `borrower_attach` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '编号',
`borrower_id` bigint(20) NOT NULL DEFAULT 0 COMMENT '借款人id',
`image_type` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图片类型(idCard1:身份证正面,idCard2:身份证反面,house:房产证,car:车)',
`image_url` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图片路径',
`image_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图片名称',
`create_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
`update_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '更新时间',
`is_deleted` tinyint(1) NOT NULL DEFAULT 0 COMMENT '逻辑删除(1:已删除,0:未删除)',
PRIMARY KEY (`id`) USING BTREE,
INDEX `idx_borrower_id`(`borrower_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '借款人上传资源表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for dict
-- ----------------------------
DROP TABLE IF EXISTS `dict`;
CREATE TABLE `dict` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`parent_id` bigint(20) NOT NULL DEFAULT 0 COMMENT '上级id',
`name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '名称',
`value` int(11) NULL DEFAULT NULL COMMENT '值',
`dict_code` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '编码',
`create_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
`update_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '更新时间',
`is_deleted` tinyint(1) NOT NULL DEFAULT 0 COMMENT '删除标记(0:不可用 1:可用)',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `uk_parent_id_value`(`parent_id`, `value`) USING BTREE,
INDEX `idx_parent_id`(`parent_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 82008 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '数据字典' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of dict
-- ----------------------------
INSERT INTO `dict` VALUES (1, 0, '全部分类', NULL, 'ROOT', '2021-09-08 23:53:37', '2021-09-08 23:53:37', 0);
INSERT INTO `dict` VALUES (20000, 1, '行业', 44, 'industry', '2021-09-08 23:53:37', '2021-09-09 23:00:10', 0);
INSERT INTO `dict` VALUES (20001, 20000, 'IT', 1, NULL, '2021-09-08 23:53:37', '2021-09-08 23:53:37', 0);
INSERT INTO `dict` VALUES (20002, 20000, '医生', 2, NULL, '2021-09-08 23:53:37', '2021-09-08 23:53:37', 0);
INSERT INTO `dict` VALUES (20003, 20000, '教师', 3, NULL, '2021-09-08 23:53:37', '2021-09-08 23:53:37', 0);
INSERT INTO `dict` VALUES (20004, 20000, '导游', 4, NULL, '2021-09-08 23:53:37', '2021-09-08 23:53:37', 0);
INSERT INTO `dict` VALUES (20005, 20000, '律师', 5, NULL, '2021-09-08 23:53:37', '2021-09-08 23:53:37', 0);
INSERT INTO `dict` VALUES (20006, 20000, '其他', 6, NULL, '2021-09-08 23:53:37', '2021-09-08 23:53:37', 0);
INSERT INTO `dict` VALUES (30000, 1, '学历', NULL, 'education', '2021-09-08 23:53:37', '2021-09-08 23:53:37', 0);
INSERT INTO `dict` VALUES (30001, 30000, '高中', 1, NULL, '2021-09-08 23:53:37', '2021-09-08 23:53:37', 0);
INSERT INTO `dict` VALUES (30002, 30000, '大专', 2, NULL, '2021-09-08 23:53:37', '2021-09-08 23:53:37', 0);
INSERT INTO `dict` VALUES (30003, 30000, '本科', 3, NULL, '2021-09-08 23:53:37', '2021-09-08 23:53:37', 0);
INSERT INTO `dict` VALUES (30004, 30000, '研究生', 4, NULL, '2021-09-08 23:53:37', '2021-09-08 23:53:37', 0);
INSERT INTO `dict` VALUES (30005, 30000, '其他', 5, NULL, '2021-09-08 23:53:37', '2021-09-08 23:53:37', 0);
INSERT INTO `dict` VALUES (40000, 1, '收入', NULL, 'income', '2021-09-08 23:53:37', '2021-09-08 23:53:37', 0);
INSERT INTO `dict` VALUES (40001, 40000, '0-3000', 1, NULL, '2021-09-08 23:53:37', '2021-09-08 23:53:37', 0);
INSERT INTO `dict` VALUES (40002, 40000, '3000-5000', 2, NULL, '2021-09-08 23:53:37', '2021-09-08 23:53:37', 0);
INSERT INTO `dict` VALUES (40003, 40000, '5000-10000', 3, NULL, '2021-09-08 23:53:37', '2021-09-08 23:53:37', 0);
INSERT INTO `dict` VALUES (40004, 40000, '10000以上', 4, NULL, '2021-09-08 23:53:37', '2021-09-08 23:53:37', 0);
INSERT INTO `dict` VALUES (50000, 1, '收入来源', NULL, 'returnSource', '2021-09-08 23:53:37', '2021-09-08 23:53:37', 0);
INSERT INTO `dict` VALUES (50001, 50000, '工资', 1, NULL, '2021-09-08 23:53:37', '2021-09-08 23:53:37', 0);
INSERT INTO `dict` VALUES (50002, 50000, '股票', 2, NULL, '2021-09-08 23:53:37', '2021-09-08 23:53:37', 0);
INSERT INTO `dict` VALUES (50003, 50000, '兼职', 3, NULL, '2021-09-08 23:53:37', '2021-09-08 23:53:37', 0);
INSERT INTO `dict` VALUES (60000, 1, '关系', NULL, 'relation', '2021-09-08 23:53:37', '2021-09-08 23:53:37', 0);
INSERT INTO `dict` VALUES (60001, 60000, '夫妻', 1, NULL, '2021-09-08 23:53:37', '2021-09-08 23:53:37', 0);
INSERT INTO `dict` VALUES (60002, 60000, '兄妹', 2, NULL, '2021-09-08 23:53:37', '2021-09-08 23:53:37', 0);
INSERT INTO `dict` VALUES (60003, 60000, '父母', 3, NULL, '2021-09-08 23:53:37', '2021-09-08 23:53:37', 0);
INSERT INTO `dict` VALUES (60004, 60000, '其他', 4, NULL, '2021-09-08 23:53:37', '2021-09-08 23:53:37', 0);
INSERT INTO `dict` VALUES (70000, 1, '还款方式', NULL, 'returnMethod', '2021-09-08 23:53:37', '2021-09-08 23:53:37', 0);
INSERT INTO `dict` VALUES (70001, 70000, '等额本息', 1, NULL, '2021-09-08 23:53:37', '2021-09-08 23:53:37', 0);
INSERT INTO `dict` VALUES (70002, 70000, '等额本金', 2, NULL, '2021-09-08 23:53:37', '2021-09-08 23:53:37', 0);
INSERT INTO `dict` VALUES (70003, 70000, '每月还息一次还本', 3, NULL, '2021-09-08 23:53:37', '2021-09-08 23:53:37', 0);
INSERT INTO `dict` VALUES (70004, 70000, '一次还本还息', 4, NULL, '2021-09-08 23:53:37', '2021-09-08 23:53:37', 0);
INSERT INTO `dict` VALUES (80000, 1, '资金用途', NULL, 'moneyUse', '2021-09-08 23:53:37', '2021-09-08 23:53:37', 0);
INSERT INTO `dict` VALUES (80001, 80000, '旅游', 1, NULL, '2021-09-08 23:53:37', '2021-09-08 23:53:37', 0);
INSERT INTO `dict` VALUES (80002, 80000, '买房', 2, NULL, '2021-09-08 23:53:37', '2021-09-08 23:53:37', 0);
INSERT INTO `dict` VALUES (80003, 80000, '装修', 3, NULL, '2021-09-08 23:53:37', '2021-09-08 23:53:37', 0);
INSERT INTO `dict` VALUES (80004, 80000, '医疗', 4, NULL, '2021-09-08 23:53:37', '2021-09-08 23:53:37', 0);
INSERT INTO `dict` VALUES (80005, 80000, '美容', 5, NULL, '2021-09-08 23:53:37', '2021-09-08 23:53:37', 0);
INSERT INTO `dict` VALUES (80006, 80000, '其他', 6, NULL, '2021-09-08 23:53:37', '2021-09-08 23:53:37', 0);
INSERT INTO `dict` VALUES (81000, 1, '借款状态', NULL, 'borrowStatus', '2021-09-08 23:53:37', '2021-09-08 23:53:37', 0);
INSERT INTO `dict` VALUES (81001, 81000, '待审核', 0, NULL, '2021-09-08 23:53:37', '2021-09-08 23:53:37', 0);
INSERT INTO `dict` VALUES (81002, 81000, '审批通过', 1, NULL, '2021-09-08 23:53:37', '2021-09-08 23:53:37', 0);
INSERT INTO `dict` VALUES (81003, 81000, '还款中', 2, NULL, '2021-09-08 23:53:37', '2021-09-08 23:53:37', 0);
INSERT INTO `dict` VALUES (81004, 81000, '结束', 3, NULL, '2021-09-08 23:53:37', '2021-09-08 23:53:37', 0);
INSERT INTO `dict` VALUES (81005, 81000, '审批不通过', -1, NULL, '2021-09-08 23:53:37', '2021-09-08 23:53:37', 0);
INSERT INTO `dict` VALUES (82000, 1, '学校性质', NULL, 'SchoolStatus', '2021-09-08 23:53:37', '2021-09-08 23:53:37', 0);
INSERT INTO `dict` VALUES (82001, 82000, '211/985', NULL, NULL, '2021-09-08 23:53:37', '2021-09-08 23:53:37', 0);
INSERT INTO `dict` VALUES (82002, 82000, '一本', NULL, NULL, '2021-09-08 23:53:37', '2021-09-08 23:53:37', 0);
INSERT INTO `dict` VALUES (82003, 82000, '二本', NULL, NULL, '2021-09-08 23:53:37', '2021-09-08 23:53:37', 0);
INSERT INTO `dict` VALUES (82004, 82000, '三本', NULL, NULL, '2021-09-08 23:53:37', '2021-09-08 23:53:37', 0);
INSERT INTO `dict` VALUES (82005, 82000, '高职高专', NULL, NULL, '2021-09-08 23:53:37', '2021-09-08 23:53:37', 0);
INSERT INTO `dict` VALUES (82006, 82000, '中职中专', NULL, NULL, '2021-09-08 23:53:37', '2021-09-08 23:53:37', 0);
INSERT INTO `dict` VALUES (82007, 82000, '高中及以下', NULL, NULL, '2021-09-08 23:53:37', '2021-09-08 23:53:37', 0);
-- ----------------------------
-- Table structure for integral_grade
-- ----------------------------
DROP TABLE IF EXISTS `integral_grade`;
CREATE TABLE `integral_grade` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '编号',
`integral_start` int(11) NULL DEFAULT NULL COMMENT '积分区间开始',
`integral_end` int(11) NULL DEFAULT NULL COMMENT '积分区间结束',
`borrow_amount` decimal(10, 2) NULL DEFAULT NULL COMMENT '借款额度',
`create_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
`update_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '更新时间',
`is_deleted` tinyint(1) NOT NULL DEFAULT 0 COMMENT '逻辑删除(1:已删除,0:未删除)',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1442114416119132162 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '积分等级表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of integral_grade
-- ----------------------------
INSERT INTO `integral_grade` VALUES (1, 10, 122, 10000.00, '2020-12-08 17:02:29', '2021-09-07 19:24:27', 0);
INSERT INTO `integral_grade` VALUES (2, 51, 100, 30000.00, '2020-12-08 17:02:42', '2021-09-07 21:14:11', 1);
INSERT INTO `integral_grade` VALUES (3, 101, 2000, 100000.00, '2020-12-08 17:02:57', '2021-09-07 21:07:44', 1);
INSERT INTO `integral_grade` VALUES (1434909198990180353, 44, 4, 4444.00, '2021-09-06 23:59:47', '2021-09-07 19:24:42', 1);
INSERT INTO `integral_grade` VALUES (1435238911151546370, 2, 3, 221.00, '2021-09-07 21:49:56', '2021-09-07 21:49:56', 0);
INSERT INTO `integral_grade` VALUES (1435238970085711874, 2, 4444, 1.00, '2021-09-07 21:50:10', '2021-09-07 21:50:10', 0);
INSERT INTO `integral_grade` VALUES (1435239840588341250, 2, 2, 1.00, '2021-09-07 21:53:38', '2021-09-07 21:53:44', 1);
INSERT INTO `integral_grade` VALUES (1435246661331951618, 222, 222, 212.00, '2021-09-07 22:20:44', '2021-09-07 22:20:44', 0);
INSERT INTO `integral_grade` VALUES (1442114416119132161, 2, 3, 1.00, '2021-09-26 21:10:44', '2021-09-26 21:10:44', 0);
-- ----------------------------
-- Table structure for lend
-- ----------------------------
DROP TABLE IF EXISTS `lend`;
CREATE TABLE `lend` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '编号',
`user_id` bigint(20) NULL DEFAULT NULL COMMENT '借款用户id',
`borrow_info_id` bigint(20) NULL DEFAULT NULL COMMENT '借款信息id',
`lend_no` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '标的编号',
`title` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '标题',
`amount` decimal(10, 2) NULL DEFAULT NULL COMMENT '标的金额',
`period` int(11) NULL DEFAULT NULL COMMENT '投资期数',
`lend_year_rate` decimal(10, 2) NULL DEFAULT NULL COMMENT '年化利率',
`service_rate` decimal(10, 2) NULL DEFAULT NULL COMMENT '平台服务费率',
`return_method` tinyint(3) NULL DEFAULT NULL COMMENT '还款方式',
`lowest_amount` decimal(10, 2) NULL DEFAULT NULL COMMENT '最低投资金额',
`invest_amount` decimal(10, 2) NULL DEFAULT NULL COMMENT '已投金额',
`invest_num` int(11) NULL DEFAULT NULL COMMENT '投资人数',
`publish_date` datetime(0) NULL DEFAULT NULL COMMENT '发布日期',
`lend_start_date` date NULL DEFAULT NULL COMMENT '开始日期',
`lend_end_date` date NULL DEFAULT NULL COMMENT '结束日期',
`lend_info` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '说明',
`expect_amount` decimal(10, 2) NULL DEFAULT NULL COMMENT '平台预期收益',
`real_amount` decimal(10, 2) NULL DEFAULT NULL COMMENT '实际收益',
`status` tinyint(3) NOT NULL DEFAULT 0 COMMENT '状态',
`check_time` datetime(0) NULL DEFAULT NULL COMMENT '审核时间',
`check_admin_id` bigint(1) NULL DEFAULT NULL COMMENT '审核用户id',
`payment_time` datetime(0) NULL DEFAULT NULL COMMENT '放款时间',
`payment_admin_id` datetime(0) NULL DEFAULT NULL COMMENT '放款人id',
`create_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
`update_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '更新时间',
`is_deleted` tinyint(1) NOT NULL DEFAULT 0 COMMENT '逻辑删除(1:已删除,0:未删除)',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `uk_lend_no`(`lend_no`) USING BTREE,
INDEX `idx_user_id`(`user_id`) USING BTREE,
INDEX `idx_borrow_info_id`(`borrow_info_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '标的准备表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for lend_item
-- ----------------------------
DROP TABLE IF EXISTS `lend_item`;
CREATE TABLE `lend_item` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '编号',
`lend_item_no` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '投资编号',
`lend_id` bigint(20) NOT NULL DEFAULT 0 COMMENT '标的id',
`invest_user_id` bigint(20) NULL DEFAULT NULL COMMENT '投资用户id',
`invest_name` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '投资人名称',
`invest_amount` decimal(10, 2) NULL DEFAULT NULL COMMENT '投资金额',
`lend_year_rate` decimal(10, 2) NULL DEFAULT NULL COMMENT '年化利率',
`invest_time` datetime(0) NULL DEFAULT NULL COMMENT '投资时间',
`lend_start_date` date NULL DEFAULT NULL COMMENT '开始日期',
`lend_end_date` date NULL DEFAULT NULL COMMENT '结束日期',
`expect_amount` decimal(10, 2) NULL DEFAULT NULL COMMENT '预期收益',
`real_amount` decimal(10, 2) NULL DEFAULT NULL COMMENT '实际收益',
`status` tinyint(3) NULL DEFAULT NULL COMMENT '状态(0:默认 1:已支付 2:已还款)',
`create_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
`update_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '更新时间',
`is_deleted` tinyint(1) NOT NULL DEFAULT 0 COMMENT '逻辑删除(1:已删除,0:未删除)',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `uk_lend_item_no`(`lend_item_no`) USING BTREE,
INDEX `idx_lend_id`(`lend_id`) USING BTREE,
INDEX `idx_invest_user_id`(`invest_user_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '标的出借记录表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for lend_item_return
-- ----------------------------
DROP TABLE IF EXISTS `lend_item_return`;
CREATE TABLE `lend_item_return` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '编号',
`lend_return_id` bigint(20) NULL DEFAULT NULL COMMENT '标的还款id',
`lend_item_id` bigint(20) NULL DEFAULT NULL COMMENT '标的项id',
`lend_id` bigint(20) NOT NULL DEFAULT 0 COMMENT '标的id',
`invest_user_id` bigint(1) NULL DEFAULT NULL COMMENT '出借用户id',
`invest_amount` decimal(10, 2) NULL DEFAULT NULL COMMENT '出借金额',
`current_period` int(11) NULL DEFAULT NULL COMMENT '当前的期数',
`lend_year_rate` decimal(10, 2) NULL DEFAULT NULL COMMENT '年化利率',
`return_method` tinyint(3) NULL DEFAULT NULL COMMENT '还款方式 1-等额本息 2-等额本金 3-每月还息一次还本 4-一次还本',
`principal` decimal(10, 2) NULL DEFAULT NULL COMMENT '本金',
`interest` decimal(10, 2) NULL DEFAULT NULL COMMENT '利息',
`total` decimal(10, 2) NULL DEFAULT NULL COMMENT '本息',
`fee` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '手续费',
`return_date` date NULL DEFAULT NULL COMMENT '还款时指定的还款日期',
`real_return_time` datetime(0) NULL DEFAULT NULL COMMENT '实际发生的还款时间',
`is_overdue` tinyint(1) NULL DEFAULT NULL COMMENT '是否逾期',
`overdue_total` decimal(10, 2) NULL DEFAULT NULL COMMENT '逾期金额',
`status` tinyint(3) NULL DEFAULT NULL COMMENT '状态(0-未归还 1-已归还)',
`create_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
`update_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '更新时间',
`is_deleted` tinyint(1) NOT NULL DEFAULT 0 COMMENT '逻辑删除(1:已删除,0:未删除)',
PRIMARY KEY (`id`) USING BTREE,
INDEX `idx_lend_return_id`(`lend_return_id`) USING BTREE,
INDEX `idx_lend_item_id`(`lend_item_id`) USING BTREE,
INDEX `idx_lend_id`(`lend_id`) USING BTREE,
INDEX `idx_invest_user_id`(`invest_user_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '标的出借回款记录表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for lend_return
-- ----------------------------
DROP TABLE IF EXISTS `lend_return`;
CREATE TABLE `lend_return` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '编号',
`lend_id` bigint(20) NULL DEFAULT NULL COMMENT '标的id',
`borrow_info_id` bigint(20) NOT NULL DEFAULT 0 COMMENT '借款信息id',
`return_no` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '还款批次号',
`user_id` bigint(20) NULL DEFAULT NULL COMMENT '借款人用户id',
`amount` decimal(10, 2) NULL DEFAULT NULL COMMENT '借款金额',
`base_amount` decimal(10, 2) NULL DEFAULT NULL COMMENT '计息本金额',
`current_period` int(11) NULL DEFAULT NULL COMMENT '当前的期数',
`lend_year_rate` decimal(10, 2) NULL DEFAULT NULL COMMENT '年化利率',
`return_method` tinyint(3) NULL DEFAULT NULL COMMENT '还款方式 1-等额本息 2-等额本金 3-每月还息一次还本 4-一次还本',
`principal` decimal(10, 2) NULL DEFAULT NULL COMMENT '本金',
`interest` decimal(10, 2) NULL DEFAULT NULL COMMENT '利息',
`total` decimal(10, 2) NULL DEFAULT NULL COMMENT '本息',
`fee` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '手续费',
`return_date` date NULL DEFAULT NULL COMMENT '还款时指定的还款日期',
`real_return_time` datetime(0) NULL DEFAULT NULL COMMENT '实际发生的还款时间',
`is_overdue` tinyint(1) NULL DEFAULT NULL COMMENT '是否逾期',
`overdue_total` decimal(10, 2) NULL DEFAULT NULL COMMENT '逾期金额',
`is_last` tinyint(1) NULL DEFAULT NULL COMMENT '是否最后一次还款',
`status` tinyint(3) NULL DEFAULT NULL COMMENT '状态(0-未归还 1-已归还)',
`create_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
`update_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '更新时间',
`is_deleted` tinyint(1) NOT NULL DEFAULT 0 COMMENT '逻辑删除(1:已删除,0:未删除)',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `uk_return_no`(`return_no`) USING BTREE,
INDEX `idx_lend_id`(`lend_id`) USING BTREE,
INDEX `idx_borrow_info_id`(`borrow_info_id`) USING BTREE,
INDEX `idx_user_id`(`user_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '还款记录表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for trans_flow
-- ----------------------------
DROP TABLE IF EXISTS `trans_flow`;
CREATE TABLE `trans_flow` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '编号',
`user_id` bigint(20) NOT NULL DEFAULT 0 COMMENT '用户id',
`user_name` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户名称',
`trans_no` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '交易单号',
`trans_type` tinyint(3) NOT NULL DEFAULT 0 COMMENT '交易类型(1:充值 2:提现 3:投标 4:投资回款 ...)',
`trans_type_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '交易类型名称',
`trans_amount` decimal(10, 2) NULL DEFAULT NULL COMMENT '交易金额',
`memo` varchar(300) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
`create_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
`update_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '更新时间',
`is_deleted` tinyint(1) NOT NULL DEFAULT 0 COMMENT '逻辑删除(1:已删除,0:未删除)',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `uk_trans_no`(`trans_no`) USING BTREE,
INDEX `idx_user_id`(`user_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '交易流水表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for user_account
-- ----------------------------
DROP TABLE IF EXISTS `user_account`;
CREATE TABLE `user_account` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '编号',
`user_id` bigint(20) NOT NULL DEFAULT 0 COMMENT '用户id',
`amount` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '帐户可用余额',
`freeze_amount` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '冻结金额',
`create_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
`update_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '更新时间',
`is_deleted` tinyint(1) NOT NULL DEFAULT 0 COMMENT '逻辑删除(1:已删除,0:未删除)',
`version` int(11) NOT NULL DEFAULT 0 COMMENT '版本号',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `uk_user_id`(`user_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1441707482719301634 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户账户' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of user_account
-- ----------------------------
INSERT INTO `user_account` VALUES (1441707482719301633, 1441707482442477569, 0.00, 0.00, '2021-09-25 18:13:44', '2021-09-25 18:13:44', 0, 0);
-- ----------------------------
-- Table structure for user_bind
-- ----------------------------
DROP TABLE IF EXISTS `user_bind`;
CREATE TABLE `user_bind` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '编号',
`user_id` bigint(20) NOT NULL DEFAULT 0 COMMENT '用户id',
`name` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '用户姓名',
`id_card` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '身份证号',
`bank_no` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '银行卡号',
`bank_type` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '银行类型',
`mobile` varchar(11) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '手机号',
`bind_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '绑定账户协议号',
`status` tinyint(3) NULL DEFAULT NULL COMMENT '状态',
`create_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
`update_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '更新时间',
`is_deleted` tinyint(1) NOT NULL DEFAULT 0 COMMENT '逻辑删除(1:已删除,0:未删除)',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `uk_user_id`(`user_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1443886202372562946 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户绑定表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of user_bind
-- ----------------------------
INSERT INTO `user_bind` VALUES (1443874996844867585, 1441707482442477569, '李四', '429006199708214512', '621700827006295411', '浦发银行', '15623285112', NULL, 0, '2021-10-01 17:46:39', '2021-10-01 17:46:39', 0);
INSERT INTO `user_bind` VALUES (1443886202372562945, 1441707482442477570, '方启豪', '429006198525525252', '1552559966324555', '中国银行', '15623278548', 'a7232956a7ad4353941da22f896eb48b', 1, '2021-10-01 18:31:11', '2021-10-01 18:31:11', 0);
-- ----------------------------
-- Table structure for user_info
-- ----------------------------
DROP TABLE IF EXISTS `user_info`;
CREATE TABLE `user_info` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '编号',
`user_type` tinyint(3) NOT NULL DEFAULT 0 COMMENT '1:出借人 2:借款人',
`mobile` varchar(11) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '手机号',
`password` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '用户密码',
`nick_name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户昵称',
`name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户姓名',
`id_card` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '身份证号',
`email` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '邮箱',
`openid` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '微信用户标识openid',
`head_img` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '头像',
`bind_status` tinyint(3) NOT NULL DEFAULT 0 COMMENT '绑定状态(0:未绑定,1:绑定成功 -1:绑定失败)',
`borrow_auth_status` tinyint(3) NOT NULL DEFAULT 0 COMMENT '借款人认证状态(0:未认证 1:认证中 2:认证通过 -1:认证失败)',
`bind_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '绑定账户协议号',
`integral` int(11) NOT NULL DEFAULT 0 COMMENT '用户积分',
`status` tinyint(3) NOT NULL DEFAULT 1 COMMENT '状态(0:锁定 1:正常)',
`create_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
`update_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '更新时间',
`is_deleted` tinyint(1) NOT NULL DEFAULT 0 COMMENT '逻辑删除(1:已删除,0:未删除)',
PRIMARY KEY (`id`) USING BTREE,
INDEX `uk_mobile`(`mobile`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1441707482442477571 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户基本信息' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of user_info
-- ----------------------------
INSERT INTO `user_info` VALUES (1441707482442477569, 1, '15623278505', '202cb962ac59075b964b07152d234b70', '15623278505', '15623278505', NULL, NULL, NULL, 'https://eric123.oss-cn-shanghai.aliyuncs.com/2021/05/19/cover/6fc26885-d01b-4663-9cfb-cbf6e1ce3c13b21c8701a18b87d6277fd470b5403f381f30e9245701.jpg?versionId=CAEQIRiBgMCPjcKUzBciIDcxYmQxNGFmZTA5ZjQyMmVhZGVlMWU1MDUwMWZiNjdj', 0, 0, NULL, 0, 1, '2021-09-25 18:13:44', '2021-09-27 21:17:41', 0);
INSERT INTO `user_info` VALUES (1441707482442477570, 2, '15027269805', '202cb962ac59075b964b07152d234b70', '15027269805', '方启豪', '429006198525525252', NULL, NULL, NULL, 1, 0, 'a7232956a7ad4353941da22f896eb48b', 0, 1, '2021-09-26 22:15:10', '2021-09-27 20:17:34', 0);
-- ----------------------------
-- Table structure for user_integral
-- ----------------------------
DROP TABLE IF EXISTS `user_integral`;
CREATE TABLE `user_integral` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '编号',
`user_id` bigint(20) NULL DEFAULT NULL COMMENT '用户id',
`integral` int(11) NULL DEFAULT NULL COMMENT '积分',
`content` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '获取积分说明',
`create_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
`update_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '更新时间',
`is_deleted` tinyint(1) NOT NULL DEFAULT 0 COMMENT '逻辑删除(1:已删除,0:未删除)',
PRIMARY KEY (`id`) USING BTREE,
INDEX `idx_user_id`(`user_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户积分记录表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for user_login_record
-- ----------------------------
DROP TABLE IF EXISTS `user_login_record`;
CREATE TABLE `user_login_record` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '编号',
`user_id` bigint(20) NULL DEFAULT NULL COMMENT '用户id',
`ip` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'ip',
`create_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
`update_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '更新时间',
`is_deleted` tinyint(1) NOT NULL DEFAULT 0 COMMENT '逻辑删除(1:已删除,0:未删除)',
PRIMARY KEY (`id`) USING BTREE,
INDEX `idx_user_id`(`user_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1443902203487121411 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户登录记录表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of user_login_record
-- ----------------------------
INSERT INTO `user_login_record` VALUES (1441741214108876801, 1441707482442477569, '0:0:0:0:0:0:0:1', '2021-09-25 20:27:46', '2021-09-25 20:27:46', 1);
INSERT INTO `user_login_record` VALUES (1441743999646826498, 1441707482442477569, '127.0.0.1', '2021-09-25 20:38:50', '2021-09-25 20:38:50', 1);
INSERT INTO `user_login_record` VALUES (1441744070224379905, 1441707482442477569, '0:0:0:0:0:0:0:1', '2021-09-25 20:39:07', '2021-09-25 20:39:07', 1);
INSERT INTO `user_login_record` VALUES (1441744097571241985, 1441707482442477569, '0:0:0:0:0:0:0:1', '2021-09-25 20:39:13', '2021-09-25 20:39:13', 1);
INSERT INTO `user_login_record` VALUES (1441745353970909185, 1441707482442477569, '127.0.0.1', '2021-09-25 20:44:13', '2021-09-25 20:44:13', 0);
INSERT INTO `user_login_record` VALUES (1441749353940221954, 1441707482442477569, '0:0:0:0:0:0:0:1', '2021-09-25 21:00:07', '2021-09-25 21:00:07', 0);
INSERT INTO `user_login_record` VALUES (1441749823555469314, 1441707482442477569, '127.0.0.1', '2021-09-25 21:01:59', '2021-09-25 21:01:59', 0);
INSERT INTO `user_login_record` VALUES (1441749930606690305, 1441707482442477569, '127.0.0.1', '2021-09-25 21:02:24', '2021-09-25 21:02:24', 0);
INSERT INTO `user_login_record` VALUES (1441750721212022785, 1441707482442477569, '127.0.0.1', '2021-09-25 21:05:33', '2021-09-25 21:05:33', 0);
INSERT INTO `user_login_record` VALUES (1441750922911907842, 1441707482442477569, '127.0.0.1', '2021-09-25 21:06:21', '2021-09-25 21:06:21', 0);
INSERT INTO `user_login_record` VALUES (1441751873244725249, 1441707482442477569, '0:0:0:0:0:0:0:1', '2021-09-25 21:10:07', '2021-09-25 21:10:07', 0);
INSERT INTO `user_login_record` VALUES (1441770421576900609, 1441707482442477569, '0:0:0:0:0:0:0:1', '2021-09-25 22:23:49', '2021-09-25 22:23:49', 0);
INSERT INTO `user_login_record` VALUES (1443863090121695233, 1441707482442477569, '192.168.25.1', '2021-10-01 16:59:21', '2021-10-01 16:59:21', 0);
INSERT INTO `user_login_record` VALUES (1443875251325874177, 1441707482442477570, '192.168.25.1', '2021-10-01 17:47:40', '2021-10-01 17:47:40', 0);
INSERT INTO `user_login_record` VALUES (1443876016643747842, 1441707482442477569, '192.168.25.1', '2021-10-01 17:50:42', '2021-10-01 17:50:42', 0);
INSERT INTO `user_login_record` VALUES (1443885532684820482, 1441707482442477570, '192.168.25.1', '2021-10-01 18:28:31', '2021-10-01 18:28:31', 0);
INSERT INTO `user_login_record` VALUES (1443902203487121410, 1441707482442477570, '192.168.25.1', '2021-10-01 19:34:46', '2021-10-01 19:34:46', 0);
SET FOREIGN_KEY_CHECKS = 1;
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。