/* Navicat Premium Data Transfer Source Server : elf-new Source Server Type : MySQL Source Server Version : 80032 (8.0.32) Source Host : 124.223.222.61:3306 Source Schema : insure Target Server Type : MySQL Target Server Version : 80032 (8.0.32) File Encoding : 65001 Date: 11/07/2024 02:03:28 */ SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for admins -- ---------------------------- DROP TABLE IF EXISTS `admins`; CREATE TABLE `admins` ( `id` int NOT NULL AUTO_INCREMENT COMMENT '主键', `username` varchar(20) NOT NULL COMMENT '手机号', `nickname` varchar(32) NOT NULL DEFAULT '' COMMENT '昵称', `password_hash` varchar(64) NOT NULL COMMENT '登录密码', `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '账号状体(1启用)', `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '最后更新时间', PRIMARY KEY (`id`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='管理员表'; -- ---------------------------- -- Table structure for applicant -- ---------------------------- DROP TABLE IF EXISTS `applicant`; CREATE TABLE `applicant` ( `id` int NOT NULL AUTO_INCREMENT COMMENT '主键', `order_no` varchar(20) NOT NULL DEFAULT '' COMMENT '订单编号', `applicant_name` varchar(100) NOT NULL DEFAULT '' COMMENT '姓名或企业名称', `credit_code` varchar(100) NOT NULL DEFAULT '' COMMENT '身份证号码或统一社会信用代码', `credit_vld` varchar(20) NOT NULL DEFAULT '' COMMENT '证件有效期', `contact_name` varchar(100) NOT NULL DEFAULT '' COMMENT '联系人', `contact_mobile` varchar(50) DEFAULT NULL COMMENT '联系手机', `com_tel_area` varchar(50) DEFAULT NULL COMMENT '公司联系电话区号', `province` varchar(50) NOT NULL DEFAULT '' COMMENT '省编码', `city` varchar(50) NOT NULL DEFAULT '' COMMENT '市编码', `district` varchar(50) NOT NULL DEFAULT '' COMMENT '区编码', `address` varchar(200) NOT NULL DEFAULT '' COMMENT '详细地址', `email` varchar(50) NOT NULL DEFAULT '' COMMENT '邮箱', `legal_name` varchar(50) NOT NULL DEFAULT '' COMMENT '投保企业法人姓名', `legal_num` varchar(50) NOT NULL DEFAULT '' COMMENT '投保企业法人证件号', `com_tel_num` varchar(50) NOT NULL DEFAULT '' COMMENT '投保企业法人联系方式', `license_files` varchar(1000) NOT NULL DEFAULT '' COMMENT '营业执照', `invoice_type` varchar(20) NOT NULL DEFAULT '' COMMENT '发票类型', `invoice_accept_email` varchar(100) NOT NULL DEFAULT '' COMMENT '发票接收邮箱', `sign_url` varchar(500) NOT NULL DEFAULT '' COMMENT '签章文件下载地址', `signed_url` varchar(500) NOT NULL DEFAULT '' COMMENT '已签章文件下载地址', `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '最后更新时间', PRIMARY KEY (`id`) USING BTREE, UNIQUE KEY `udx_ordersn` (`order_no`) ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='投标人'; -- ---------------------------- -- Table structure for assured -- ---------------------------- DROP TABLE IF EXISTS `assured`; CREATE TABLE `assured` ( `id` int NOT NULL AUTO_INCREMENT COMMENT '主键', `order_no` varchar(20) NOT NULL DEFAULT '' COMMENT '订单编号', `assured_name` varchar(500) NOT NULL DEFAULT '' COMMENT '招标人名称', `credit_code` varchar(100) NOT NULL DEFAULT '' COMMENT '身份证号码或统一社会信用代码', `credit_vld` varchar(20) NOT NULL DEFAULT '' COMMENT '证件有效期', `contact_name` varchar(100) NOT NULL DEFAULT '' COMMENT '联系人', `contact_mobile` varchar(50) DEFAULT NULL COMMENT '联系手机', `com_tel_area` varchar(50) DEFAULT NULL COMMENT '公司联系电话区号', `province` varchar(50) NOT NULL DEFAULT '' COMMENT '省编码', `city` varchar(50) NOT NULL DEFAULT '' COMMENT '市编码', `district` varchar(50) NOT NULL DEFAULT '' COMMENT '区编码', `address` varchar(200) NOT NULL DEFAULT '' COMMENT '详细地址', `com_tel_num` varchar(50) NOT NULL DEFAULT '' COMMENT '招标企业法人联系方式', `tender_bank_account` varchar(100) NOT NULL DEFAULT '' COMMENT '招标人银行账号', `tender_bank_openbank` varchar(100) NOT NULL DEFAULT '' COMMENT '招标人银行开户行', `tender_account_name` varchar(100) NOT NULL DEFAULT '' COMMENT '招标人银行账户名称', `agency` varchar(100) NOT NULL DEFAULT '' COMMENT '招标代理机构名称', `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '最后更新时间', PRIMARY KEY (`id`) USING BTREE, UNIQUE KEY `udx_ordersn` (`order_no`) ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='招标人'; -- ---------------------------- -- Table structure for invoice -- ---------------------------- DROP TABLE IF EXISTS `invoice`; CREATE TABLE `invoice` ( `id` int NOT NULL AUTO_INCREMENT COMMENT '主键', `order_no` varchar(20) NOT NULL DEFAULT '' COMMENT '订单编号', `header` varchar(255) NOT NULL DEFAULT '' COMMENT '发票抬头', `tax_number` varchar(50) NOT NULL DEFAULT '' COMMENT '税号', `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '最后更新时间', PRIMARY KEY (`id`) USING BTREE, UNIQUE KEY `udx_orderno` (`order_no`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='发票信息'; -- ---------------------------- -- Table structure for order -- ---------------------------- DROP TABLE IF EXISTS `order`; CREATE TABLE `order` ( `id` int NOT NULL AUTO_INCREMENT COMMENT '主键', `order_no` varchar(20) NOT NULL DEFAULT '' COMMENT '订单编号', `order_sn` varchar(32) NOT NULL DEFAULT '' COMMENT '订单编号', `request_id` varchar(20) NOT NULL DEFAULT '' COMMENT '请求ID', `token` varchar(32) NOT NULL DEFAULT '' COMMENT 'Token', `status` varchar(20) NOT NULL DEFAULT '' COMMENT '状态', `pay_url` varchar(500) NOT NULL DEFAULT '' COMMENT '支付url', `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '最后更新时间', PRIMARY KEY (`id`) USING BTREE, UNIQUE KEY `udx_ordersn` (`order_no`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='订单表'; -- ---------------------------- -- Table structure for order_result -- ---------------------------- DROP TABLE IF EXISTS `order_result`; CREATE TABLE `order_result` ( `id` int NOT NULL AUTO_INCREMENT COMMENT '主键', `order_no` varchar(20) NOT NULL DEFAULT '' COMMENT '订单编号', `order_sn` varchar(32) NOT NULL DEFAULT '' COMMENT '订单编号', `policy_no` varchar(50) NOT NULL DEFAULT '' COMMENT '保单号', `min_premium` varchar(12) NOT NULL DEFAULT '' COMMENT '最低保费,单位元', `rate` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '费率,千分制', `status` varchar(4) NOT NULL DEFAULT '0' COMMENT '状态', `service_amount` varchar(12) NOT NULL DEFAULT '' COMMENT '保费金额', `gurantee_link` varchar(500) NOT NULL DEFAULT '' COMMENT '已生效的保函下载地址', `gurantee_link_md5` varchar(32) NOT NULL DEFAULT '' COMMENT '已生效的保函文件的md5', `gurantee_ofd_link` varchar(500) NOT NULL DEFAULT '' COMMENT '已生效的保函下载ofd地址', `gurantee_ofd_link_md5` varchar(32) NOT NULL DEFAULT '' COMMENT '已生效的保函下载ofd文件的md5', `invoice_link` varchar(500) NOT NULL DEFAULT '' COMMENT '发票下载地址', `invoice_link_md5` varchar(32) NOT NULL DEFAULT '' COMMENT '发票下载地址MD5', `confirm_receipt_link` varchar(500) NOT NULL DEFAULT '' COMMENT '到账确认函下载地址', `confirm_receipt_link_md5` varchar(32) NOT NULL DEFAULT '' COMMENT '到账确认函md5值', `remark` varchar(500) NOT NULL DEFAULT '' COMMENT '备注', `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '最后更新时间', PRIMARY KEY (`id`) USING BTREE, UNIQUE KEY `udx_ordersn` (`order_no`) ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='保单结果'; -- ---------------------------- -- Table structure for project -- ---------------------------- DROP TABLE IF EXISTS `project`; CREATE TABLE `project` ( `id` int NOT NULL AUTO_INCREMENT COMMENT '主键', `order_no` varchar(20) NOT NULL DEFAULT '' COMMENT '订单编号', `name` varchar(500) NOT NULL DEFAULT '' COMMENT '项目名称', `tp_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '招标项目编号', `bd_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '标段包编号', `bd_name` varchar(50) NOT NULL DEFAULT '' COMMENT '标段包名称', `start_date` varchar(50) NOT NULL DEFAULT '' COMMENT '开标时间', `amount` decimal(12,2) NOT NULL DEFAULT '0.00' COMMENT '保证金金额', `province` varchar(50) NOT NULL DEFAULT '' COMMENT '省编码', `city` varchar(50) NOT NULL DEFAULT '' COMMENT '市编码', `district` varchar(50) NOT NULL DEFAULT '' COMMENT '区编码', `bzj_etime` varchar(50) NOT NULL DEFAULT '' COMMENT '保证金缴纳截止时间', `create_time` varchar(50) NOT NULL DEFAULT '' COMMENT '项目发布时间', `plan_date` varchar(50) NOT NULL DEFAULT '' COMMENT '计划工期', `build_price` varchar(50) NOT NULL DEFAULT '' COMMENT '项目预计造价', `build_place` varchar(800) NOT NULL DEFAULT '' COMMENT '项目建设地点', `tender_project_type` varchar(50) NOT NULL DEFAULT '' COMMENT '招标项目类别', `valid_period` varchar(50) NOT NULL DEFAULT '' COMMENT '投标有效期', `tender_notice_url` varchar(500) NOT NULL DEFAULT '' COMMENT '招标公告地址', `tender_file_url` varchar(500) NOT NULL DEFAULT '' COMMENT '招标文件下载地址', `tender_file_url_md5` varchar(32) NOT NULL DEFAULT '' COMMENT '招标文件md5值', `project_approval_no` varchar(50) NOT NULL DEFAULT '' COMMENT '项目审批文号', `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '最后更新时间', PRIMARY KEY (`id`) USING BTREE, UNIQUE KEY `udx_ordersn` (`order_no`) ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='项目表'; -- ---------------------------- -- Table structure for sign_log -- ---------------------------- DROP TABLE IF EXISTS `sign_log`; CREATE TABLE `sign_log` ( `id` int NOT NULL AUTO_INCREMENT COMMENT '主键', `order_no` varchar(20) NOT NULL DEFAULT '' COMMENT '订单编号', `is_upload_pdf` tinyint(1) NOT NULL DEFAULT '0', `file_info` varchar(500) NOT NULL DEFAULT '' COMMENT '文件信息', `pc_info` varchar(500) NOT NULL DEFAULT '' COMMENT 'pc信息', `ca_info` varchar(500) NOT NULL DEFAULT '' COMMENT '签章信息', `sign_url` varchar(500) NOT NULL DEFAULT '' COMMENT '签章文件下载地址', `params` varchar(500) NOT NULL DEFAULT '' COMMENT '参数', `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '最后更新时间', PRIMARY KEY (`id`) USING BTREE, KEY `idx_ordersn` (`order_no`) ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='签章日志'; -- ---------------------------- -- Table structure for user -- ---------------------------- DROP TABLE IF EXISTS `user`; CREATE TABLE `user` ( `id` int NOT NULL AUTO_INCREMENT COMMENT '主键', `order_no` varchar(20) NOT NULL DEFAULT '' COMMENT '订单编号', `user_id` varchar(50) NOT NULL DEFAULT '' COMMENT '投保人(当前登录用户)ID', `mobile` varchar(50) NOT NULL DEFAULT '' COMMENT '投保人(当前登录用户)手机号', `username` varchar(50) NOT NULL DEFAULT '' COMMENT '投保人(当前登录用户)用户名', `unit_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '投保人(当前登录用户)单位ID', `unit_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '投保人(当前登录用户)企业名称', `beiandiqu_code` varchar(50) NOT NULL DEFAULT '' COMMENT '备案地区编码', `bank_name` varchar(100) NOT NULL DEFAULT '' COMMENT '投保企业基本户开户行', `bank_card_num` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '投保企业基本户银行卡号', `bank_user_name` varchar(100) NOT NULL DEFAULT '' COMMENT '投保企业基本户名称', `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '最后更新时间', PRIMARY KEY (`id`) USING BTREE, UNIQUE KEY `udx_ordersn` (`order_no`) ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='用户表'; SET FOREIGN_KEY_CHECKS = 1; CREATE TABLE `revoke` ( `id` int NOT NULL AUTO_INCREMENT COMMENT '主键', `policy_no` varchar(50) NOT NULL DEFAULT '' COMMENT '保单号', `bank_name` varchar(150) NOT NULL DEFAULT '' COMMENT '银行名称', `account_name` varchar(150) NOT NULL DEFAULT '' COMMENT '退款账户', `bank_card_num` varchar(150) NOT NULL DEFAULT '' COMMENT '收款账号', `back_preminum` varchar(150) NOT NULL DEFAULT '' COMMENT '赔付金额', `contact_name` varchar(150) NOT NULL DEFAULT '' COMMENT '联系人', `contact_phone` varchar(150) NOT NULL DEFAULT '' COMMENT '联系电话', `status` varchar(10) not null default '' comment '状态', `file_list` text default null COMMENT '退保材料', `reason` text default null COMMENT '原因材料', `msg` text default null COMMENT '结果信息', `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '最后更新时间', PRIMARY KEY (`id`) USING BTREE, UNIQUE KEY `udx_policyno` (`policy_no`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='退保记录'; CREATE TABLE `claim` ( `id` int NOT NULL AUTO_INCREMENT COMMENT '主键', `policy_no` varchar(50) NOT NULL DEFAULT '' COMMENT '保单号', `bank_name` varchar(150) NOT NULL DEFAULT '' COMMENT '银行名称', `account_name` varchar(150) NOT NULL DEFAULT '' COMMENT '退款账户', `bank_card_num` varchar(150) NOT NULL DEFAULT '' COMMENT '收款账号', `back_preminum` varchar(150) NOT NULL DEFAULT '' COMMENT '赔付金额', `contact_name` varchar(150) NOT NULL DEFAULT '' COMMENT '联系人', `contact_phone` varchar(150) NOT NULL DEFAULT '' COMMENT '联系电话', `status` varchar(10) not null default '' comment '状态', `file_list` text default null COMMENT '理赔材料', `reason` text default null COMMENT '原因材料', `msg` text default null COMMENT '结果信息', `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '最后更新时间', PRIMARY KEY (`id`) USING BTREE, UNIQUE KEY `udx_policyno` (`policy_no`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='理赔记录';