You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
145 lines
9.5 KiB
SQL
145 lines
9.5 KiB
SQL
CREATE TABLE `order` (
|
|
`id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
|
|
`request_id` varchar(20) NOT NULL DEFAULT '' COMMENT '请求ID',
|
|
`order_sn` varchar(20) 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_sn`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='订单表';
|
|
|
|
CREATE TABLE `user` (
|
|
`id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
|
|
`order_sn` 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 '投保人(当前登录用户)用户名',
|
|
`unitid` varchar(50) NOT NULL DEFAULT '' COMMENT '投保人(当前登录用户)单位ID',
|
|
`unitname` varchar(50) NOT NULL DEFAULT '' COMMENT '投保人(当前登录用户)企业名称',
|
|
`beiandiqu_code` varchar(50) NOT NULL DEFAULT '' COMMENT '备案地区编码',
|
|
`bank_name` varchar(100) NOT NULL DEFAULT '' COMMENT '投保企业基本户开户行',
|
|
`bank_card_name` varchar(100) 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_sn`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户表';
|
|
|
|
|
|
CREATE TABLE `projects` (
|
|
`id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
|
|
`order_sn` varchar(20) NOT NULL DEFAULT '' COMMENT '订单编号',
|
|
`name` varchar(500) NOT NULL DEFAULT '' COMMENT '项目名称',
|
|
`tpid` varchar(50) NOT NULL DEFAULT '' COMMENT '招标项目编号',
|
|
`bdid` varchar(50) NOT NULL DEFAULT '' COMMENT '标段包编号',
|
|
`bd_name` varchar(50) NOT NULL DEFAULT '' COMMENT '标段包名称',
|
|
`start_date` datetime default null 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` datetime default null COMMENT '保证金缴纳截止时间',
|
|
`create_time` datetime default null 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_sn`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='项目表';
|
|
|
|
|
|
CREATE TABLE `applicant` (
|
|
`id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
|
|
`order_sn` varchar(20) NOT NULL DEFAULT '' COMMENT '订单编号',
|
|
`applicant_name` varchar(100) NOT NULL DEFAULT '' COMMENT '姓名或企业名称',
|
|
`credit_code` varchar(100) NOT NULL DEFAULT '' COMMENT '身份证号码或统一社会信用代码',
|
|
`credit_vld` date DEFAULT null 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` datetime default null 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 '营业执照',
|
|
`sign_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_sn`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='投标人';
|
|
|
|
CREATE TABLE `assured` (
|
|
`id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
|
|
`order_sn` varchar(20) NOT NULL DEFAULT '' COMMENT '订单编号',
|
|
`assured_name` varchar(500) NOT NULL DEFAULT '' COMMENT '招标人名称',
|
|
`credit_code` varchar(100) NOT NULL DEFAULT '' COMMENT '身份证号码或统一社会信用代码',
|
|
`credit_vld` date DEFAULT null 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_sn`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='招标人';
|
|
|
|
CREATE TABLE `sign_log` (
|
|
`id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
|
|
`order_sn` 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_sn`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='签章日志';
|
|
|
|
CREATE TABLE `order_result` (
|
|
`id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
|
|
`order_sn` varchar(20) NOT NULL DEFAULT '' COMMENT '订单编号',
|
|
`policy_no` varchar(50) NOT NULL DEFAULT '' COMMENT '保单号',
|
|
`min_premium` varchar(12) NOT NULL DEFAULT '' COMMENT '最低保费,单位元',
|
|
`rate` varchar(12) NOT NULL DEFAULT '' COMMENT '费率,千分制',
|
|
`status` varchar(4) NOT NULL DEFAULT '' 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_sn`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='保单结果'; |