墨西哥信贷平台 · 核心 20 表 ER 图

数据源:生产库 MySQL 5.7.44(只读接入 127.0.0.1:13307)· 盘点 2026-10-22 · schema:mxcashloan 298 表 / mxrisk 24 表 / mxriskconf 98 表
从左到右即业务链路:客户 → 订单/授信 → 产品 → 还款 → 风控 → 名单
64,757订单 / 借据(order_info)
59,678客户(48,700 实际借款人)
3,295已结清单(loan_status=1)
3,669,722风控规则命中快照
1,633,884黑名单记录
200–14,000单笔额度(MXN)
PK 主键 FK 外键 箭头指向被引用表 虚线 = 非外键的名单匹配
① 客户域 ② 订单 / 授信域 ③ 产品配置域 ④ 还款域 ⑤ 风控决策域 ⑥ 名单 / 统计 1:N 1:N 1:N 1:1 1:N 1:N 1:N 1:1 1:N 1:N 1:N 1:N 1:1 1:N 1:N 1:N 1:N 1:1 1:N 1:N 1:N 匹配 客户主表 mxcashloan.cust_info · 59,678 id PK mobile_no curp model_score face_verified channel 客户银行卡 cust_bankcard_info · 95,586 id PK cust_info_id FK bank_card_no card_status 客户联系人 cust_linkman_info · 112,798 id PK cust_info_id FK relation_type contact_phone 客户影像件 cust_image_info · 126,154 id PK cust_info_id FK img_type img_url 客户画像 / 评分 cust_portrait_info · 68,725 id PK cust_info_id FK order_id FK sx_credit_score inx_score 设备关联 gaid_cust_info · 79,712 id PK cust_info_id FK gaid app_ssid 订单 / 借据主表 mxcashloan.order_info · 64,757 id PK order_no cust_info_id FK product_id FK apply_amt interest loan_status overdue_days created_time 订单-客户关联 order_cust_info · 64,758 id PK order_info_id FK cust_info_id FK 订单联系人快照 order_linkman_info · 82,072 id PK order_info_id FK cust_info_id FK contact_phone KYC / 活体 / INE advance_trade_info · 129,748 id PK cust_info_id FK trade_type response_message (PII) 产品 / App product_info · 19 id PK product_name appssid repayment_method 产品档位 product_detail_info · 42 id PK product_id FK duration service_fee_rate overdue_rate iva_rate 订单产品快照 order_product · 64,758 id PK order_id FK product_detail_id FK duration service_fee_rate 还款计划 order_repay_plan · 3,521 id PK order_info_id FK period total_repay_amount status 还款单 repay_order_info · 1,790 ID PK order_id FK cust_info_id FK amount_paid status pay_channel 还款流水 flow_repay_info · 1,827 id PK order_info_id FK cust_info_id FK repay_plan_ids amount 风控决策结果 mxrisk.risk_snapshot · 64,292 id PK order_id FK cust_id FK result reject_code 规则逐条命中 risk_strategy_snapshot · 3,669,722 id PK order_id FK strategy_id rule_id result 额度策略快照 risk_amount_strategy_snapshot · 1,991,503 id PK order_id FK cust_id FK product_detail_id FK amount result 黑名单 mxriskconf.t_blacklist · 1,633,884 id PK content content_type country description

核心 20 表清单

域表(中文)物理表名行数关键字段
① 客户域客户主表mxcashloan.cust_info59,678id PK · mobile_no · curp · model_score · face_verified · channel
① 客户域客户银行卡cust_bankcard_info95,586id PK · cust_info_id FK · bank_card_no · card_status
① 客户域客户联系人cust_linkman_info112,798id PK · cust_info_id FK · relation_type · contact_phone
① 客户域客户影像件cust_image_info126,154id PK · cust_info_id FK · img_type · img_url
① 客户域客户画像 / 评分cust_portrait_info68,725id PK · cust_info_id FK · order_id FK · sx_credit_score · inx_score
① 客户域设备关联gaid_cust_info79,712id PK · cust_info_id FK · gaid · app_ssid
② 订单 / 授信域订单 / 借据主表mxcashloan.order_info64,757id PK · order_no · cust_info_id FK · product_id FK · apply_amt · interest · loan_status · overdue_days · created_time
② 订单 / 授信域订单-客户关联order_cust_info64,758id PK · order_info_id FK · cust_info_id FK
② 订单 / 授信域订单联系人快照order_linkman_info82,072id PK · order_info_id FK · cust_info_id FK · contact_phone
② 订单 / 授信域KYC / 活体 / INEadvance_trade_info129,748id PK · cust_info_id FK · trade_type · response_message (PII)
③ 产品配置域产品 / Appproduct_info19id PK · product_name · appssid · repayment_method
③ 产品配置域产品档位product_detail_info42id PK · product_id FK · duration · service_fee_rate · overdue_rate · iva_rate
③ 产品配置域订单产品快照order_product64,758id PK · order_id FK · product_detail_id FK · duration · service_fee_rate
④ 还款域还款计划order_repay_plan3,521id PK · order_info_id FK · period · total_repay_amount · status
④ 还款域还款单repay_order_info1,790ID PK · order_id FK · cust_info_id FK · amount_paid · status · pay_channel
④ 还款域还款流水flow_repay_info1,827id PK · order_info_id FK · cust_info_id FK · repay_plan_ids · amount
⑤ 风控决策域风控决策结果mxrisk.risk_snapshot64,292id PK · order_id FK · cust_id FK · result · reject_code
⑤ 风控决策域规则逐条命中risk_strategy_snapshot3,669,722id PK · order_id FK · strategy_id · rule_id · result
⑤ 风控决策域额度策略快照risk_amount_strategy_snapshot1,991,503id PK · order_id FK · cust_id FK · product_detail_id FK · amount · result
⑥ 名单 / 统计黑名单mxriskconf.t_blacklist1,633,884id PK · content · content_type · country · description

关联关系(22 条)

源表目标表基数域
mxcashloan.cust_infocust_bankcard_info1:N① 客户域
mxcashloan.cust_infocust_linkman_info1:N① 客户域
mxcashloan.cust_infocust_image_info1:N① 客户域
mxcashloan.cust_infocust_portrait_info1:1① 客户域
mxcashloan.cust_infogaid_cust_info1:N① 客户域
mxcashloan.cust_infomxcashloan.order_info1:N② 订单 / 授信域
mxcashloan.cust_infoadvance_trade_info1:N② 订单 / 授信域
mxcashloan.order_infoorder_cust_info1:1② 订单 / 授信域
mxcashloan.order_infoorder_linkman_info1:N② 订单 / 授信域
product_infoproduct_detail_info1:N③ 产品配置域
product_detail_infoorder_product1:N③ 产品配置域
product_infomxcashloan.order_info1:N③ 产品配置域
mxcashloan.order_infoorder_product1:1③ 产品配置域
mxcashloan.order_infoorder_repay_plan1:N④ 还款域
mxcashloan.order_inforepay_order_info1:N④ 还款域
mxcashloan.order_infoflow_repay_info1:N④ 还款域
order_repay_planflow_repay_info1:N④ 还款域
mxcashloan.order_infomxrisk.risk_snapshot1:1⑤ 风控决策域
mxcashloan.order_inforisk_strategy_snapshot1:N⑤ 风控决策域
mxcashloan.order_inforisk_amount_strategy_snapshot1:N⑤ 风控决策域
mxcashloan.cust_inforisk_amount_strategy_snapshot1:N⑤ 风控决策域
mxriskconf.t_blacklistmxcashloan.cust_info匹配⑥ 名单 / 统计
三条链路读法
① 授信链路:cust_info → order_info → risk_strategy_snapshot(逐规则)→ risk_amount_strategy_snapshot(定额度)→ order_product(定档位)
② 放款链路:order_info.loan_status / payout_id / bank_card_id → 支付通道(本库只有状态,流水在网关)
③ 回收链路:order_repay_plan(应有分期)→ repay_order_info(还款单)→ flow_repay_info(支付流水)
读图必须知道的两个数据事实
1. 还款侧数据几乎为空:order_repay_plan 仅 3,521 行、repay_order_info 1,790 行、flow_repay_info 1,827 行, 催收任务表(order_collection_task / oa_daily_collect_rate)为 0 行 → 回款与催收流水不在这套库,不能直接算回款率与坏账。
2. 风控侧完整:367 万行规则快照可逐单还原命中,199 万行额度快照可还原额度策略;黑名单 163 万行无外键,靠手机号 / 证件 / 卡号匹配。