Skip to content

当前数据库结构说明

  • 文档性质:参考资料 / 实库结构快照
  • 生成时间:2026-08-14 00:05:01 +08:00
  • 数据来源:Laravel 默认连接 mysql 直连 MySQL information_schema 与业务库 idc
  • 数据库:idc
  • MySQL 版本:8.0.29
  • 当前表数量:62
  • 字段数量:885
  • 索引数量:309
  • 外键约束数量:92
  • CHECK 约束数量:0
  • 说明:
    • 本文只导出表结构元数据,不包含任何业务行数据。
    • 行数来自 information_schema.TABLES.TABLE_ROWS,InnoDB 下仅作估算。
    • 字段、索引、外键与约束均来自当前实库,不以迁移文件或历史快照推断。
    • 需要更新时在项目根目录执行:php backend/scripts/export_database_structure.php

自动生成:请优先通过脚本重刷本文档,避免手工维护结构信息产生漂移。

1. 结构概览

1.1 表清单

表名类型引擎估算行数数据大小索引大小自增值排序规则表注释
account_transactionsBASE TABLEInnoDB656144 KB304 KB1,753utf8mb4_unicode_ci账户流水表,记录现金账户、授信账户、推荐奖励账户的每一次余额变化
activity_logsBASE TABLEInnoDB38,84324.56 MB9.06 MB1,049,773utf8mb4_unicode_ci
admin_user_rolesBASE TABLEInnoDB216 KB32 KB228utf8mb4_unicode_ci
admin_usersBASE TABLEInnoDB216 KB48 KB314utf8mb4_unicode_ci
agent_applicationsBASE TABLEInnoDB016 KB32 KB1utf8mb4_unicode_ci
archive_audit_logsBASE TABLEInnoDB016 KB32 KB2utf8mb4_unicode_ci
automation_logsBASE TABLEInnoDB737160 KB192 KB1,408utf8mb4_unicode_ci
content_articlesBASE TABLEInnoDB1496 KB160 KB35utf8mb4_unicode_ci
content_categoriesBASE TABLEInnoDB416 KB48 KB11utf8mb4_unicode_ci
coupon_campaignsBASE TABLEInnoDB016 KB48 KB15utf8mb4_unicode_ci
couponsBASE TABLEInnoDB316 KB48 KB92utf8mb4_unicode_ci
failed_jobsBASE TABLEInnoDB2154.52 MB16 KB462utf8mb4_unicode_ci
first_product_groupsBASE TABLEInnoDB616 KB32 KB58utf8mb4_unicode_ci
gateway_logsBASE TABLEInnoDB8864 KB112 KB1,000,089utf8mb4_unicode_ci
integration_plugin_bindingsBASE TABLEInnoDB1016 KB80 KB13utf8mb4_unicode_ci
integration_plugin_configsBASE TABLEInnoDB816 KB16 KB10utf8mb4_unicode_ci
integration_plugin_runtime_logsBASE TABLEInnoDB17,15524.55 MB5.31 MB1,018,561utf8mb4_unicode_ci
integration_pluginsBASE TABLEInnoDB1264 KB48 KB23utf8mb4_unicode_ci
invoice_itemsBASE TABLEInnoDB2,776512 KB96 KB2,845utf8mb4_unicode_ci账单明细表,记录账单内每个收费项目和快照信息
invoicesBASE TABLEInnoDB2,9781.52 MB1.48 MB3,064utf8mb4_unicode_ci账单主表,所有购买、续费、充值、扣款和退款流程以账单为财务入口
jobsBASE TABLEInnoDB016 KB16 KB4,732utf8mb4_unicode_ci
media_filesBASE TABLEInnoDB1216 KB48 KB62utf8mb4_unicode_ci
member_levelsBASE TABLEInnoDB316 KB48 KB9utf8mb4_unicode_ci
message_logsBASE TABLEInnoDB78312.52 MB1,008 KB3,057utf8mb4_unicode_ci
migrationsBASE TABLEInnoDB17516 KB0 B188utf8mb4_unicode_ci
notice_readsBASE TABLEInnoDB14216 KB48 KB185utf8mb4_unicode_ci
notification_templatesBASE TABLEInnoDB56272 KB32 KB981utf8mb4_unicode_ci
operation_logsBASE TABLEInnoDB181,26078.61 MB37.09 MB178,740utf8mb4_unicode_ci
ordersBASE TABLEInnoDB291352 KB176 KB3,124utf8mb4_unicode_ci
password_reset_tokensBASE TABLEInnoDB016 KB0 Butf8mb4_unicode_ci
payment_callbacksBASE TABLEInnoDB328320 KB96 KB500utf8mb4_unicode_ci支付回调审计表,保存第三方通知、查询、退款等回调验签结果
paymentsBASE TABLEInnoDB319320 KB160 KB375utf8mb4_unicode_ci第三方支付记录表,仅记录真实外部资金流入和退款状态,不记录余额/免费/手工开服
personal_access_tokensBASE TABLEInnoDB37096 KB80 KB408utf8mb4_unicode_ci
product_upstream_bindingsBASE TABLEInnoDB1398.52 MB96 KB270utf8mb4_unicode_ci
productsBASE TABLEInnoDB1279.52 MB48 KB379utf8mb4_unicode_ci商品表,记录可售卖产品的分类、定价、库存、上游绑定和开通策略
recharge_recordsBASE TABLEInnoDB2416 KB144 KB25utf8mb4_unicode_ci
referral_account_logsBASE TABLEInnoDB616 KB64 KB7utf8mb4_unicode_ci
referral_rewardsBASE TABLEInnoDB516 KB96 KB11utf8mb4_unicode_ci
referral_withdrawalsBASE TABLEInnoDB016 KB48 KB4utf8mb4_unicode_ci
refundsBASE TABLEInnoDB216 KB96 KB4utf8mb4_unicode_ci
rolesBASE TABLEInnoDB216 KB16 KB398utf8mb4_unicode_ci
schedule_run_logsBASE TABLEInnoDB149,72031.56 MB21.09 MB152,327utf8mb4_unicode_ci
schedule_task_runsBASE TABLEInnoDB3,4081.52 MB1.23 MB3,568utf8mb4_unicode_ci
schedule_ticksBASE TABLEInnoDB27916 KB48 KB315utf8mb4_unicode_ci
second_product_groupsBASE TABLEInnoDB1516 KB32 KB45utf8mb4_unicode_ci
service_connection_snapshotsBASE TABLEInnoDB183304 KB80 KB214utf8mb4_unicode_ci
service_provision_attemptsBASE TABLEInnoDB233112 KB80 KB444utf8mb4_unicode_ci
service_runtime_snapshotsBASE TABLEInnoDB183272 KB80 KB214utf8mb4_unicode_ci
service_upstream_bindingsBASE TABLEInnoDB178144 KB112 KB300utf8mb4_unicode_ci
servicesBASE TABLEInnoDB1381.52 MB128 KB314utf8mb4_unicode_ci服务实例表,记录用户已购买产品的生命周期、计费、上游和续费状态
sessionsBASE TABLEInnoDB016 KB32 KButf8mb4_unicode_ci
settingsBASE TABLEInnoDB11396 KB16 KB343utf8mb4_unicode_ci
supplier_plugin_bindingsBASE TABLEInnoDB216 KB64 KB105utf8mb4_unicode_ci
suppliersBASE TABLEInnoDB216 KB32 KB93utf8mb4_unicode_ci
third_product_groupsBASE TABLEInnoDB2616 KB32 KB49utf8mb4_unicode_ci
ticket_repliesBASE TABLEInnoDB17748 KB32 KB178utf8mb4_unicode_ci
ticketsBASE TABLEInnoDB6916 KB96 KB76utf8mb4_unicode_ci
user_accountsBASE TABLEInnoDB41164 KB0 Butf8mb4_unicode_ci用户账户余额源表,集中承载现金余额、授信和推荐奖励余额
user_couponsBASE TABLEInnoDB2516 KB64 KB90utf8mb4_unicode_ci
user_notificationsBASE TABLEInnoDB10864 KB48 KB158utf8mb4_unicode_ci
usersBASE TABLEInnoDB482128 KB176 KB484utf8mb4_unicode_ci
verification_historiesBASE TABLEInnoDB9764 KB48 KB103utf8mb4_unicode_ci

1.2 字段类型分布

类型字段数
bigint184
char1
date1
decimal42
int38
json56
longtext10
mediumtext1
smallint1
text15
timestamp169
tinyint50
varchar317

1.3 JSON 字段

  • activity_logs.context
  • automation_logs.meta
  • coupon_campaigns.weekdays
  • coupon_campaigns.billing_cycles
  • coupon_campaigns.product_ids
  • coupons.billing_cycles
  • coupons.product_ids
  • gateway_logs.request_data
  • gateway_logs.response_data
  • integration_plugin_bindings.config_json
  • integration_plugin_bindings.has_secret_json
  • integration_plugin_bindings.runtime_policy_json
  • integration_plugin_configs.config_json
  • integration_plugin_configs.has_secret_json
  • integration_plugin_runtime_logs.request_meta_json
  • integration_plugin_runtime_logs.response_meta_json
  • integration_plugins.capabilities_json
  • integration_plugins.config_schema_json
  • invoice_items.meta_json
  • invoices.config_snapshot
  • invoices.config_pricing_snapshot
  • invoices.coupon_snapshot
  • message_logs.params_json
  • notification_templates.variables_json
  • notification_templates.provider_variables_json
  • operation_logs.context
  • orders.config_snapshot
  • orders.config_pricing_snapshot
  • orders.coupon_snapshot
  • orders.service_snapshot
  • payment_callbacks.payload_json
  • payments.callback_raw
  • product_upstream_bindings.upstream_product_snapshot_json
  • product_upstream_bindings.option_schema_json
  • product_upstream_bindings.provision_policy_json
  • products.pricing
  • products.config_options
  • products.purchase_requires
  • roles.permissions
  • schedule_run_logs.summary
  • schedule_task_runs.summary
  • service_connection_snapshots.connection_json
  • service_connection_snapshots.has_secret_json
  • service_provision_attempts.request_meta_json
  • service_provision_attempts.response_meta_json
  • service_runtime_snapshots.resource_json
  • service_runtime_snapshots.metrics_json
  • service_runtime_snapshots.snapshot_json
  • service_upstream_bindings.runtime_snapshot_json
  • service_upstream_bindings.connection_snapshot_json
  • services.locked_pricing
  • services.provision_data
  • supplier_plugin_bindings.config_json
  • supplier_plugin_bindings.has_secret_json
  • ticket_replies.attachments
  • user_notifications.data

2. 表结构明细

2.1 account_transactions

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:656
  • 数据大小:144 KB
  • 索引大小:304 KB
  • 自增值:1753
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:账户流水表,记录现金账户、授信账户、推荐奖励账户的每一次余额变化

字段

序号字段类型可空默认值额外字符集排序规则注释
1idbigint unsignedPRIauto_increment账户流水自增主键
2user_idbigint unsignedMUL所属用户ID
3account_typevarchar(30)utf8mb4utf8mb4_unicode_ci账户类型:cash/credit/referral 等
4event_typevarchar(30)utf8mb4utf8mb4_unicode_ci流水事件类型:recharge/consume/refund/adjust/reward_frozen/reward_released 等
5change_amountdecimal(12,2)0.00本次变动金额,收入为正、支出为负
6currencyvarchar(3)CNYutf8mb4utf8mb4_unicode_ci
7balance_afterdecimal(12,2)0.00本次变动后的账户余额
8source_typevarchar(30)NULLMULutf8mb4utf8mb4_unicode_ci业务来源类型,如 invoice/payment/referral_withdrawal
9source_idbigint unsignedNULL业务来源ID
10origin_typevarchar(30)NULLMULutf8mb4utf8mb4_unicode_ci原始触发对象类型,用于跨域追踪
11origin_idbigint unsignedNULL原始触发对象ID
12remarkvarchar(255)NULLutf8mb4utf8mb4_unicode_ci流水备注
13operatorvarchar(50)NULLutf8mb4utf8mb4_unicode_ci操作人快照
14trace_idvarchar(64)NULLMULutf8mb4utf8mb4_unicode_ci链路追踪号
15created_attimestampNULLMUL创建时间
16updated_attimestampNULL更新时间

索引

索引名唯一类型字段基数注释
account_transactions_created_at_idxBTREEcreated_at640
account_transactions_origin_idxBTREEorigin_type, origin_id649
account_transactions_source_idxBTREEsource_type, source_id611
account_transactions_trace_id_idxBTREEtrace_id574
account_transactions_user_account_created_idxBTREEuser_id, account_type, created_at, id654
account_transactions_user_event_created_idxBTREEuser_id, event_type, created_at647
PRIMARYBTREEid654

外键约束

约束名字段引用表引用字段更新规则删除规则
fk_stage2_account_transactions_user_iduser_idusersidNO ACTIONRESTRICT

2.2 activity_logs

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:38,843
  • 数据大小:24.56 MB
  • 索引大小:9.06 MB
  • 自增值:1049773
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:—

字段

序号字段类型可空默认值额外字符集排序规则注释
1idbigint unsignedPRIauto_increment
2actor_typevarchar(20)systemutf8mb4utf8mb4_unicode_ci操作者类型: admin, client, system, sub_account
3actor_idbigint unsignedNULLMUL操作者ID
4actor_namevarchar(100)空字符串utf8mb4utf8mb4_unicode_ci操作者名称快照
5modulevarchar(50)MULutf8mb4utf8mb4_unicode_ci模块: invoice, order, service, user, product, ticket, coupon, system
6actionvarchar(100)utf8mb4utf8mb4_unicode_ci动作描述: create, pay, refund, suspend, terminate 等
7descriptiontextutf8mb4utf8mb4_unicode_ci可读描述
8subject_typevarchar(50)NULLMULutf8mb4utf8mb4_unicode_ci关联对象类型: invoice, service, order, user, ticket
9subject_idbigint unsignedNULL关联对象ID
10contextjsonNULL附加结构化上下文
11ip_addressvarchar(45)NULLutf8mb4utf8mb4_unicode_ci
12created_attimestampNULLMUL
13updated_attimestampNULL

索引

索引名唯一类型字段基数注释
activity_logs_actor_id_indexBTREEactor_id57
activity_logs_created_at_indexBTREEcreated_at15,540
activity_logs_module_action_indexBTREEmodule, action929
activity_logs_subject_type_subject_id_indexBTREEsubject_type, subject_id118
PRIMARYBTREEid38,823

外键约束

无数据库级外键约束。

2.3 admin_user_roles

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:2
  • 数据大小:16 KB
  • 索引大小:32 KB
  • 自增值:228
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:—

字段

序号字段类型可空默认值额外字符集排序规则注释
1idbigint unsignedPRIauto_increment
2admin_user_idbigint unsignedMUL
3role_idbigint unsignedMUL

索引

索引名唯一类型字段基数注释
admin_user_roles_admin_role_uniqueBTREEadmin_user_id, role_id2
admin_user_roles_role_id_idxBTREErole_id2
PRIMARYBTREEid2

外键约束

约束名字段引用表引用字段更新规则删除规则
fk_stage2_admin_user_roles_admin_user_idadmin_user_idadmin_usersidNO ACTIONCASCADE
fk_stage2_admin_user_roles_role_idrole_idrolesidNO ACTIONRESTRICT

2.4 admin_users

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:2
  • 数据大小:16 KB
  • 索引大小:48 KB
  • 自增值:314
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:—

字段

序号字段类型可空默认值额外字符集排序规则注释
1idbigint unsignedPRIauto_increment
2usernamevarchar(50)UNIutf8mb4utf8mb4_unicode_ci
3passwordvarchar(255)utf8mb4utf8mb4_unicode_ci
4role_idbigint unsignedMUL
5nicknamevarchar(50)NULLutf8mb4utf8mb4_unicode_ci
6statustinyint10=禁用 1=正常
7last_login_attimestampNULL
8last_login_ipvarchar(45)NULLutf8mb4utf8mb4_unicode_ci
9created_attimestampNULL
10updated_attimestampNULL
11emailvarchar(100)NULLMULutf8mb4utf8mb4_unicode_ci

索引

索引名唯一类型字段基数注释
admin_users_email_indexBTREEemail2
admin_users_role_id_indexBTREErole_id2
admin_users_username_uniqueBTREEusername2
PRIMARYBTREEid2

外键约束

约束名字段引用表引用字段更新规则删除规则
fk_stage2_admin_users_role_idrole_idrolesidNO ACTIONRESTRICT

2.5 agent_applications

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:0
  • 数据大小:16 KB
  • 索引大小:32 KB
  • 自增值:1
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:—

字段

序号字段类型可空默认值额外字符集排序规则注释
1idbigint unsignedPRIauto_increment
2user_idbigint unsignedMUL
3contact_namevarchar(50)空字符串utf8mb4utf8mb4_unicode_ci联系人
4contact_phonevarchar(30)空字符串utf8mb4utf8mb4_unicode_ci联系手机
5contact_qqvarchar(30)空字符串utf8mb4utf8mb4_unicode_ciQQ号
6company_namevarchar(120)空字符串utf8mb4utf8mb4_unicode_ci公司名称
7reasonvarchar(500)空字符串utf8mb4utf8mb4_unicode_ci申请说明
8statusvarchar(20)pendingMULutf8mb4utf8mb4_unicode_ci状态: pending/approved/rejected
9api_keyvarchar(64)NULLutf8mb4utf8mb4_unicode_ciAPI密钥
10admin_notevarchar(500)空字符串utf8mb4utf8mb4_unicode_ci管理员备注
11created_attimestampNULL
12updated_attimestampNULL

索引

索引名唯一类型字段基数注释
agent_applications_status_indexBTREEstatus0
agent_applications_user_id_foreignBTREEuser_id0
PRIMARYBTREEid0

外键约束

约束名字段引用表引用字段更新规则删除规则
agent_applications_user_id_foreignuser_idusersidNO ACTIONCASCADE

2.6 archive_audit_logs

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:0
  • 数据大小:16 KB
  • 索引大小:32 KB
  • 自增值:2
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:—

字段

序号字段类型可空默认值额外字符集排序规则注释
1idbigint unsignedPRIauto_increment
2batch_idvarchar(64)MULutf8mb4utf8mb4_unicode_ci
3table_namevarchar(64)MULutf8mb4utf8mb4_unicode_ci
4modevarchar(30)utf8mb4utf8mb4_unicode_ci
5row_countint unsigned0
6file_pathvarchar(500)NULLutf8mb4utf8mb4_unicode_ci
7file_sizebigint unsignedNULL
8checksum_sha256char(64)NULLutf8mb4utf8mb4_unicode_ci
9statusvarchar(30)utf8mb4utf8mb4_unicode_ci
10error_messagevarchar(500)NULLutf8mb4utf8mb4_unicode_ci
11started_attimestampNULL
12finished_attimestampNULL
13created_attimestampNULL

索引

索引名唯一类型字段基数注释
archive_batch_idxBTREEbatch_id0
archive_table_status_idxBTREEtable_name, status, created_at0
PRIMARYBTREEid0

外键约束

无数据库级外键约束。

2.7 automation_logs

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:737
  • 数据大小:160 KB
  • 索引大小:192 KB
  • 自增值:1408
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:—

字段

序号字段类型可空默认值额外字符集排序规则注释
1idbigint unsignedPRIauto_increment
2task_keyvarchar(80)MULutf8mb4utf8mb4_unicode_ci
3actionvarchar(80)utf8mb4utf8mb4_unicode_ci
4object_typevarchar(40)MULutf8mb4utf8mb4_unicode_ci
5object_idbigint unsigned
6rule_keyvarchar(191)空字符串utf8mb4utf8mb4_unicode_ci
7metajsonNULL
8executed_attimestampNULL
9created_attimestampNULL
10updated_attimestampNULL

索引

索引名唯一类型字段基数注释
automation_logs_object_idxBTREEobject_type, object_id382
automation_logs_task_key_indexBTREEtask_key6
automation_logs_unique_ruleBTREEtask_key, action, object_type, object_id, rule_key737
PRIMARYBTREEid737

外键约束

无数据库级外键约束。

2.8 content_articles

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:14
  • 数据大小:96 KB
  • 索引大小:160 KB
  • 自增值:35
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:—

字段

序号字段类型可空默认值额外字符集排序规则注释
1idbigint unsignedPRIauto_increment
2content_typevarchar(20)MULutf8mb4utf8mb4_unicode_cinotice|help
3category_idbigint unsignedNULLMUL
4titlevarchar(200)utf8mb4utf8mb4_unicode_ci
5slugvarchar(220)UNIutf8mb4utf8mb4_unicode_ci
6summaryvarchar(500)NULLutf8mb4utf8mb4_unicode_ci
7contentlongtextutf8mb4utf8mb4_unicode_ci
8category_namevarchar(60)NULLutf8mb4utf8mb4_unicode_ci
9keywordsvarchar(255)NULLutf8mb4utf8mb4_unicode_ci
10cover_imagevarchar(500)NULLutf8mb4utf8mb4_unicode_ci
11statustinyint00=草稿 1=已发布 2=已下线
12is_pinnedtinyint0
13is_recommendedtinyint0
14sort_orderint0
15view_countint unsigned0
16require_reread_attimestampNULL
17publish_attimestampNULL
18last_published_attimestampNULL
19created_bybigint unsignedNULL
20updated_bybigint unsignedNULL
21operatorvarchar(50)NULLutf8mb4utf8mb4_unicode_ci
22remarkvarchar(255)NULLutf8mb4utf8mb4_unicode_ci
23trace_idvarchar(64)NULLutf8mb4utf8mb4_unicode_ci
24created_attimestampNULL
25updated_attimestampNULL
26deleted_attimestampNULL

索引

索引名唯一类型字段基数注释
content_articles_slug_uniqueBTREEslug14
idx_article_category_publishedBTREEcategory_id, status, publish_at14
idx_content_article_type_categoryBTREEcontent_type, category_id4
idx_content_type_pin_sortBTREEcontent_type, is_pinned, sort_order, id14
idx_content_type_recommendBTREEcontent_type, is_recommended, publish_at14
idx_content_type_status_publishBTREEcontent_type, status, publish_at14
PRIMARYBTREEid14

外键约束

约束名字段引用表引用字段更新规则删除规则
fk_stage2_content_articles_category_idcategory_idcontent_categoriesidNO ACTIONSET NULL

2.9 content_categories

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:4
  • 数据大小:16 KB
  • 索引大小:48 KB
  • 自增值:11
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:—

字段

序号字段类型可空默认值额外字符集排序规则注释
1idbigint unsignedPRIauto_increment
2content_typevarchar(20)MULutf8mb4utf8mb4_unicode_cinotice|help
3namevarchar(80)utf8mb4utf8mb4_unicode_ci
4slugvarchar(120)utf8mb4utf8mb4_unicode_ci
5descriptionvarchar(255)NULLutf8mb4utf8mb4_unicode_ci
6statustinyint10=禁用 1=启用
7sort_orderint0
8created_bybigint unsignedNULL
9updated_bybigint unsignedNULL
10created_attimestampNULL
11updated_attimestampNULL

索引

索引名唯一类型字段基数注释
idx_content_category_type_status_sortBTREEcontent_type, status, sort_order2
PRIMARYBTREEid4
uniq_content_category_type_nameBTREEcontent_type, name4
uniq_content_category_type_slugBTREEcontent_type, slug4

外键约束

无数据库级外键约束。

2.10 coupon_campaigns

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:0
  • 数据大小:16 KB
  • 索引大小:48 KB
  • 自增值:15
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:—

字段

序号字段类型可空默认值额外字符集排序规则注释
1idbigint unsignedPRIauto_increment
2namevarchar(120)utf8mb4utf8mb4_unicode_ci
3descriptionvarchar(255)NULLutf8mb4utf8mb4_unicode_ci
4weekdaysjsonNULL
5trigger_timevarchar(8)MULutf8mb4utf8mb4_unicode_ci
6issue_quantityint unsigned1
7valid_duration_hoursint unsignedNULL
8discount_scopevarchar(20)first_monthutf8mb4utf8mb4_unicode_ci
9discount_typevarchar(20)utf8mb4utf8mb4_unicode_ci
10discount_valuedecimal(12,2)0.00
11min_amountdecimal(12,2)0.00
12max_discount_amountdecimal(12,2)NULL
13billing_cyclesjsonNULL
14product_idsjsonNULL
15first_order_onlytinyint(1)0
16per_user_limitint unsignedNULL
17statustinyint1MUL状态:0=禁用 1=启用
18sort_orderint unsigned0
19last_dispatched_attimestampNULL
20last_coupon_idbigint unsignedNULLMUL
21remarkvarchar(255)NULLutf8mb4utf8mb4_unicode_ci
22operatorvarchar(100)NULLutf8mb4utf8mb4_unicode_ci
23trace_idvarchar(100)NULLutf8mb4utf8mb4_unicode_ci
24created_attimestampNULL
25updated_attimestampNULL

索引

索引名唯一类型字段基数注释
coupon_campaigns_status_sort_idxBTREEstatus, sort_order0
coupon_campaigns_trigger_status_idxBTREEtrigger_time, status0
idx_stage2_coupon_campaigns_last_coupon_idBTREElast_coupon_id0
PRIMARYBTREEid0

外键约束

约束名字段引用表引用字段更新规则删除规则
fk_stage2_coupon_campaigns_last_coupon_idlast_coupon_idcouponsidNO ACTIONSET NULL

2.11 coupons

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:3
  • 数据大小:16 KB
  • 索引大小:48 KB
  • 自增值:92
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:—

字段

序号字段类型可空默认值额外字符集排序规则注释
1idbigint unsignedPRIauto_increment
2coupon_campaign_idbigint unsignedNULLMUL
3namevarchar(120)utf8mb4utf8mb4_unicode_ci
4codevarchar(50)UNIutf8mb4utf8mb4_unicode_ci
5descriptionvarchar(255)NULLutf8mb4utf8mb4_unicode_ci
6distribution_typevarchar(20)publicutf8mb4utf8mb4_unicode_ci
7discount_scopevarchar(20)first_monthutf8mb4utf8mb4_unicode_ci
8discount_typevarchar(20)utf8mb4utf8mb4_unicode_ci
9discount_valuedecimal(12,2)0.00
10min_amountdecimal(12,2)0.00
11max_discount_amountdecimal(12,2)NULL
12billing_cyclesjsonNULL
13product_idsjsonNULL
14first_order_onlytinyint(1)0
15total_usage_limitint unsignedNULL
16per_user_limitint unsignedNULL
17used_countint unsigned0
18statustinyint1MUL状态:0=禁用 1=启用
19sort_orderint unsigned0
20starts_attimestampNULL
21expires_attimestampNULL
22remarkvarchar(255)NULLutf8mb4utf8mb4_unicode_ci
23operatorvarchar(100)NULLutf8mb4utf8mb4_unicode_ci
24trace_idvarchar(100)NULLutf8mb4utf8mb4_unicode_ci
25created_attimestampNULL
26updated_attimestampNULL

索引

索引名唯一类型字段基数注释
coupons_campaign_status_idxBTREEcoupon_campaign_id, status1
coupons_code_uniqueBTREEcode3
coupons_status_sort_idxBTREEstatus, sort_order1
PRIMARYBTREEid3

外键约束

约束名字段引用表引用字段更新规则删除规则
fk_stage2_coupons_coupon_campaign_idcoupon_campaign_idcoupon_campaignsidNO ACTIONSET NULL

2.12 failed_jobs

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:215
  • 数据大小:4.52 MB
  • 索引大小:16 KB
  • 自增值:462
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:—

字段

序号字段类型可空默认值额外字符集排序规则注释
1idbigint unsignedPRIauto_increment
2uuidvarchar(255)UNIutf8mb4utf8mb4_unicode_ci
3connectiontextutf8mb4utf8mb4_unicode_ci
4queuetextutf8mb4utf8mb4_unicode_ci
5payloadlongtextutf8mb4utf8mb4_unicode_ci
6exceptionlongtextutf8mb4utf8mb4_unicode_ci
7failed_attimestampCURRENT_TIMESTAMPDEFAULT_GENERATED

索引

索引名唯一类型字段基数注释
failed_jobs_uuid_uniqueBTREEuuid215
PRIMARYBTREEid215

外键约束

无数据库级外键约束。

2.13 first_product_groups

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:6
  • 数据大小:16 KB
  • 索引大小:32 KB
  • 自增值:58
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:—

字段

序号字段类型可空默认值额外字符集排序规则注释
1idbigint unsignedPRIauto_increment
2codevarchar(50)NULLUNIutf8mb4utf8mb4_unicode_ci
3product_typevarchar(50)NULLutf8mb4utf8mb4_unicode_ci
4namevarchar(100)utf8mb4utf8mb4_unicode_ci
5slugvarchar(100)NULLUNIutf8mb4utf8mb4_unicode_ci
6descriptionvarchar(255)NULLutf8mb4utf8mb4_unicode_ci
7iconvarchar(100)NULLutf8mb4utf8mb4_unicode_ci
8banner_imagevarchar(255)NULLutf8mb4utf8mb4_unicode_ci
9sort_orderint0
10is_visibletinyint unsigned1
11is_systemtinyint unsigned0
12created_attimestampNULL
13updated_attimestampNULL

索引

索引名唯一类型字段基数注释
first_product_groups_code_uniqueBTREEcode6
first_product_groups_slug_uniqueBTREEslug6
PRIMARYBTREEid6

外键约束

无数据库级外键约束。

2.14 gateway_logs

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:88
  • 数据大小:64 KB
  • 索引大小:112 KB
  • 自增值:1000089
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:—

字段

序号字段类型可空默认值额外字符集排序规则注释
1idbigint unsignedPRIauto_increment
2plugin_idbigint unsignedNULLMUL
3gateway_keyvarchar(120)NULLMULutf8mb4utf8mb4_unicode_ci
4gatewayvarchar(50)MULutf8mb4utf8mb4_unicode_ci网关标识: alipay_f2f, wechat_native 等
5actionvarchar(50)utf8mb4utf8mb4_unicode_ci操作: precreate, notify, query, refund
6out_trade_novarchar(128)NULLMULutf8mb4utf8mb4_unicode_ci商户订单号
7trade_novarchar(128)NULLutf8mb4utf8mb4_unicode_ci第三方交易号
8invoice_idbigint unsignedNULLMUL关联账单ID
9trace_idvarchar(64)NULLMULutf8mb4utf8mb4_unicode_ci
10request_datajsonNULL请求数据(脱敏后)
11response_datajsonNULL响应数据
12result_statusvarchar(20)unknownutf8mb4utf8mb4_unicode_ci结果: success, failed, pending, unknown
13error_msgtextNULLutf8mb4utf8mb4_unicode_ci错误信息
14ip_addressvarchar(45)NULLutf8mb4utf8mb4_unicode_ci
15created_attimestampNULLMUL
16updated_attimestampNULL

索引

索引名唯一类型字段基数注释
gateway_logs_created_at_indexBTREEcreated_at88
gateway_logs_gateway_action_indexBTREEgateway, action2
gateway_logs_gateway_key_idxBTREEgateway_key, created_at88
gateway_logs_invoice_id_indexBTREEinvoice_id1
gateway_logs_out_trade_no_indexBTREEout_trade_no84
gateway_logs_plugin_created_idxBTREEplugin_id, created_at88
gateway_logs_trace_idxBTREEtrace_id35
PRIMARYBTREEid88

外键约束

约束名字段引用表引用字段更新规则删除规则
fk_stage2_gateway_logs_invoice_idinvoice_idinvoicesidNO ACTIONSET NULL
gateway_logs_plugin_fkplugin_idintegration_pluginsidNO ACTIONSET NULL

2.15 integration_plugin_bindings

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:10
  • 数据大小:16 KB
  • 索引大小:80 KB
  • 自增值:13
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:—

字段

序号字段类型可空默认值额外字符集排序规则注释
1idbigint unsignedPRIauto_increment
2domainvarchar(32)MULutf8mb4utf8mb4_unicode_ci
3plugin_idbigint unsignedMUL
4binding_typevarchar(50)utf8mb4utf8mb4_unicode_ciglobal/supplier/product/service/payment/notification/custom
5bindable_typevarchar(120)globalMULutf8mb4utf8mb4_unicode_ci
6bindable_idbigint unsigned0
7binding_keyvarchar(120)utf8mb4utf8mb4_unicode_ci同一对象下的绑定名
8provider_keyvarchar(120)NULLutf8mb4utf8mb4_unicode_ci外部协议标识快照
9priorityint0
10statustinyint unsigned1
11config_jsonjsonNULL
12secret_jsonlongtextNULLutf8mb4utf8mb4_unicode_ci
13has_secret_jsonjsonNULL
14runtime_policy_jsonjsonNULL
15created_bybigint unsignedNULL
16updated_bybigint unsignedNULL
17backfill_batch_idvarchar(64)NULLMULutf8mb4utf8mb4_unicode_ci
18created_attimestampNULL
19updated_attimestampNULL

索引

索引名唯一类型字段基数注释
plugin_bindings_backfill_batch_idxBTREEbackfill_batch_id2
plugin_bindings_bindable_idxBTREEbindable_type, bindable_id, domain9
plugin_bindings_domain_provider_status_idxBTREEdomain, provider_key, status7
plugin_bindings_plugin_status_idxBTREEplugin_id, status7
plugin_bindings_uniqueBTREEdomain, binding_type, bindable_type, bindable_id, binding_key10
PRIMARYBTREEid10

外键约束

约束名字段引用表引用字段更新规则删除规则
integration_plugin_bindings_plugin_id_foreignplugin_idintegration_pluginsidNO ACTIONRESTRICT

2.16 integration_plugin_configs

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:8
  • 数据大小:16 KB
  • 索引大小:16 KB
  • 自增值:10
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:—

字段

序号字段类型可空默认值额外字符集排序规则注释
1idbigint unsignedPRIauto_increment
2plugin_idbigint unsignedUNI
3config_jsonjsonNULL
4secret_jsonlongtextNULLutf8mb4utf8mb4_unicode_ci
5has_secret_jsonjsonNULL
6updated_bybigint unsignedNULL
7created_attimestampNULL
8updated_attimestampNULL

索引

索引名唯一类型字段基数注释
integration_plugin_configs_plugin_uniqueBTREEplugin_id8
PRIMARYBTREEid8

外键约束

约束名字段引用表引用字段更新规则删除规则
integration_plugin_configs_plugin_id_foreignplugin_idintegration_pluginsidNO ACTIONCASCADE

2.17 integration_plugin_runtime_logs

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:17,155
  • 数据大小:24.55 MB
  • 索引大小:5.31 MB
  • 自增值:1018561
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:—

字段

序号字段类型可空默认值额外字符集排序规则注释
1idbigint unsignedPRIauto_increment
2trace_idvarchar(64)NULLMULutf8mb4utf8mb4_unicode_ci
3domainvarchar(32)MULutf8mb4utf8mb4_unicode_ci
4plugin_idbigint unsignedNULLMUL
5plugin_keyvarchar(120)utf8mb4utf8mb4_unicode_ci
6slugvarchar(120)utf8mb4utf8mb4_unicode_ci
7actionvarchar(120)utf8mb4utf8mb4_unicode_ci
8binding_idbigint unsignedNULL
9bindable_typevarchar(120)NULLMULutf8mb4utf8mb4_unicode_ci
10bindable_idbigint unsignedNULL
11actor_typevarchar(50)NULLutf8mb4utf8mb4_unicode_ci
12actor_idbigint unsignedNULL
13statusvarchar(30)MULutf8mb4utf8mb4_unicode_ci
14duration_msint unsignedNULL
15error_codevarchar(80)NULLutf8mb4utf8mb4_unicode_ci
16error_messagevarchar(500)NULLutf8mb4utf8mb4_unicode_ci
17request_meta_jsonjsonNULL
18response_meta_jsonjsonNULL
19created_attimestampNULL

索引

索引名唯一类型字段基数注释
plugin_runtime_bindable_idxBTREEbindable_type, bindable_id, created_at10,239
plugin_runtime_domain_action_created_idxBTREEdomain, action, created_at13,940
plugin_runtime_plugin_created_idxBTREEplugin_id, created_at10,531
plugin_runtime_status_created_idxBTREEstatus, created_at10,268
plugin_runtime_trace_idxBTREEtrace_id17,155
PRIMARYBTREEid17,155

外键约束

约束名字段引用表引用字段更新规则删除规则
integration_plugin_runtime_logs_plugin_id_foreignplugin_idintegration_pluginsidNO ACTIONSET NULL

2.18 integration_plugins

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:12
  • 数据大小:64 KB
  • 索引大小:48 KB
  • 自增值:23
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:—

字段

序号字段类型可空默认值额外字符集排序规则注释
1idbigint unsignedPRIauto_increment
2domainvarchar(32)MULutf8mb4utf8mb4_unicode_ci
3slugvarchar(120)utf8mb4utf8mb4_unicode_ci
4plugin_keyvarchar(120)utf8mb4utf8mb4_unicode_ci
5namevarchar(120)utf8mb4utf8mb4_unicode_ci
6versionvarchar(32)1.0.0utf8mb4utf8mb4_unicode_ci
7manifest_hashvarchar(64)NULLutf8mb4utf8mb4_unicode_ci
8provider_classvarchar(255)NULLutf8mb4utf8mb4_unicode_ci
9entry_classvarchar(255)utf8mb4utf8mb4_unicode_ci
10capabilities_jsonjsonNULL
11config_schema_jsonjsonNULL
12statustinyint unsigned0
13installed_attimestampNULL
14enabled_attimestampNULL
15disabled_attimestampNULL
16installed_bybigint unsignedNULL
17enabled_bybigint unsignedNULL
18source_hashvarchar(128)NULLutf8mb4utf8mb4_unicode_ci
19created_attimestampNULL
20updated_attimestampNULL

索引

索引名唯一类型字段基数注释
integration_plugins_domain_key_uniqueBTREEdomain, plugin_key12
integration_plugins_domain_slug_uniqueBTREEdomain, slug12
integration_plugins_domain_status_indexBTREEdomain, status11
PRIMARYBTREEid12

外键约束

无数据库级外键约束。

2.19 invoice_items

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:2,776
  • 数据大小:512 KB
  • 索引大小:96 KB
  • 自增值:2845
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:账单明细表,记录账单内每个收费项目和快照信息

字段

序号字段类型可空默认值额外字符集排序规则注释
1idbigint unsignedPRIauto_increment账单明细自增主键
2invoice_idbigint unsignedMUL所属账单ID
3item_namevarchar(200)utf8mb4utf8mb4_unicode_ci明细名称
4item_typevarchar(30)normalutf8mb4utf8mb4_unicode_ci明细类型:normal/config/addon/discount/refund 等
5quantityint unsigned1明细数量
6unit_pricedecimal(12,2)0.00明细单价
7discount_amountdecimal(12,2)0.00明细优惠金额
8line_amountdecimal(12,2)0.00明细小计金额
9meta_jsonjsonNULL明细扩展快照 JSON
10created_attimestampNULL创建时间
11updated_attimestampNULL更新时间

索引

索引名唯一类型字段基数注释
invoice_items_invoice_id_indexBTREEinvoice_id2,776
PRIMARYBTREEid2,776

外键约束

约束名字段引用表引用字段更新规则删除规则
fk_invoice_items_invoice_idinvoice_idinvoicesidNO ACTIONCASCADE

2.20 invoices

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:2,978
  • 数据大小:1.52 MB
  • 索引大小:1.48 MB
  • 自增值:3064
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:账单主表,所有购买、续费、充值、扣款和退款流程以账单为财务入口

字段

序号字段类型可空默认值额外字符集排序规则注释
1idbigint unsignedPRIauto_increment账单自增主键
2invoice_novarchar(32)UNIutf8mb4utf8mb4_unicode_ci业务账单号,对外展示和支付关联使用
3user_idbigint unsignedMUL所属用户ID
4order_idbigint unsignedNULLMUL内部订单/开通投影ID,仅用于流程追踪
5origin_invoice_idbigint unsignedNULLMUL
6product_idbigint unsignedNULLMUL关联商品ID,手工账单可为空
7product_spec_snapshotvarchar(255)NULLutf8mb4utf8mb4_unicode_ci账单生成时的商品规格展示快照
8product_type_snapshotvarchar(100)NULLutf8mb4utf8mb4_unicode_ci账单生成时的商品类型快照
9service_idbigint unsignedNULLMUL关联服务实例ID
10coupon_idbigint unsignedNULLMUL使用的优惠券模板ID
11user_coupon_idbigint unsignedNULLMUL使用的用户优惠券ID
12coupon_codevarchar(100)NULLutf8mb4utf8mb4_unicode_ci使用的优惠码快照
13typevarchar(20)normalutf8mb4utf8mb4_unicode_ci账单类型:normal/new/renew/recharge/deduction/referral_credit/manual/upgrade
14amountdecimal(12,2)账单应收金额
15currencyvarchar(3)CNYutf8mb4utf8mb4_unicode_ci
16discountdecimal(12,2)0.00账单优惠抵扣金额
17billing_cyclevarchar(30)NULLutf8mb4utf8mb4_unicode_ci计费周期:monthly/quarterly/annually/onetime 等
18quantityint unsigned1购买数量或计费数量
19config_snapshotjsonNULL下单配置快照 JSON
20config_pricing_snapshotjsonNULL配置项计价快照 JSON
21coupon_snapshotjsonNULL优惠券使用快照 JSON
22paid_amountdecimal(12,2)0.00已支付入账金额
23statustinyint0MUL账单状态:0未付 1已付 2已取消 3逾期 5已退款 6部分退款
24due_datedateNULL
25paid_attimestampNULL账单支付完成时间
26deleted_attimestampNULL
27refund_trace_idvarchar(64)NULLutf8mb4utf8mb4_unicode_ci退款链路追踪号
28refund_methodvarchar(32)NULLutf8mb4utf8mb4_unicode_ci退款方式
29refund_amountdecimal(12,2)NULL退款金额
30refunded_attimestampNULL退款完成时间
31created_attimestampNULL创建时间
32updated_attimestampNULL更新时间
33remarkvarchar(255)NULLutf8mb4utf8mb4_unicode_ci账单备注
34operatorvarchar(50)NULLutf8mb4utf8mb4_unicode_ci操作人快照
35trace_idvarchar(64)NULLMULutf8mb4utf8mb4_unicode_ci链路追踪号

索引

索引名唯一类型字段基数注释
fk_invoices_user_coupon_idBTREEuser_coupon_id3
idx_stage2_invoices_coupon_idBTREEcoupon_id3
invoices_invoice_no_uniqueBTREEinvoice_no2,812
invoices_order_id_idxBTREEorder_id296
invoices_origin_invoice_id_foreignBTREEorigin_invoice_id1
invoices_product_id_idxBTREEproduct_id56
invoices_service_id_idxBTREEservice_id137
invoices_status_due_date_indexBTREEstatus, due_date740
invoices_status_paid_at_idxBTREEstatus, paid_at980
invoices_trace_id_idxBTREEtrace_id2,190
invoices_user_status_created_idxBTREEuser_id, status, created_at2,674
invoices_user_status_id_idxBTREEuser_id, status, id2,812
PRIMARYBTREEid2,978

外键约束

约束名字段引用表引用字段更新规则删除规则
fk_invoices_order_idorder_idordersidNO ACTIONSET NULL
fk_invoices_product_idproduct_idproductsidNO ACTIONRESTRICT
fk_invoices_user_coupon_iduser_coupon_iduser_couponsidNO ACTIONSET NULL
fk_invoices_user_iduser_idusersidNO ACTIONRESTRICT
fk_stage2_invoices_coupon_idcoupon_idcouponsidNO ACTIONSET NULL
fk_stage2_invoices_service_idservice_idservicesidNO ACTIONSET NULL
invoices_origin_invoice_id_foreignorigin_invoice_idinvoicesidNO ACTIONSET NULL

2.21 jobs

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:0
  • 数据大小:16 KB
  • 索引大小:16 KB
  • 自增值:4732
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:—

字段

序号字段类型可空默认值额外字符集排序规则注释
1idbigint unsignedPRIauto_increment
2queuevarchar(255)MULutf8mb4utf8mb4_unicode_ci
3payloadlongtextutf8mb4utf8mb4_unicode_ci
4attemptstinyint unsigned
5reserved_atint unsignedNULL
6available_atint unsigned
7created_atint unsigned

索引

索引名唯一类型字段基数注释
jobs_queue_indexBTREEqueue1
PRIMARYBTREEid9

外键约束

无数据库级外键约束。

2.22 media_files

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:12
  • 数据大小:16 KB
  • 索引大小:48 KB
  • 自增值:62
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:—

字段

序号字段类型可空默认值额外字符集排序规则注释
1idbigint unsignedPRIauto_increment
2filenamevarchar(255)utf8mb4utf8mb4_unicode_ci
3pathvarchar(500)utf8mb4utf8mb4_unicode_ci相对路径,如 /uploads/content/20260419/cover_xxx.jpg
4urlvarchar(500)utf8mb4utf8mb4_unicode_ci完整访问 URL
5mime_typevarchar(100)NULLutf8mb4utf8mb4_unicode_ci
6sizebigint unsigned0文件大小(字节)
7widthint unsignedNULL图片宽度
8heightint unsignedNULL图片高度
9groupvarchar(50)contentMULutf8mb4utf8mb4_unicode_ci分组: content, avatar, brand 等
10uploaded_bybigint unsigned0MUL上传管理员ID
11created_attimestampNULLMUL
12updated_attimestampNULL

索引

索引名唯一类型字段基数注释
media_files_created_at_indexBTREEcreated_at1
media_files_group_indexBTREEgroup2
media_files_uploaded_by_indexBTREEuploaded_by1
PRIMARYBTREEid12

外键约束

无数据库级外键约束。

2.23 member_levels

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:3
  • 数据大小:16 KB
  • 索引大小:48 KB
  • 自增值:9
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:—

字段

序号字段类型可空默认值额外字符集排序规则注释
1idbigint unsignedPRIauto_increment
2namevarchar(50)utf8mb4utf8mb4_unicode_ci
3codevarchar(30)UNIutf8mb4utf8mb4_unicode_ci
4sales_amount_mindecimal(12,2)0.00MUL
5sales_amount_maxdecimal(12,2)NULL
6reward_ratedecimal(5,2)0.00
7statustinyint1MUL0=禁用 1=启用
8sort_orderint0
9remarkvarchar(255)NULLutf8mb4utf8mb4_unicode_ci
10created_attimestampNULL
11updated_attimestampNULL

索引

索引名唯一类型字段基数注释
idx_member_level_sales_rangeBTREEsales_amount_min, sales_amount_max3
idx_member_level_status_sortBTREEstatus, sort_order1
member_levels_code_uniqueBTREEcode3
PRIMARYBTREEid3

外键约束

无数据库级外键约束。

2.24 message_logs

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:783
  • 数据大小:12.52 MB
  • 索引大小:1,008 KB
  • 自增值:3057
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:—

字段

序号字段类型可空默认值额外字符集排序规则注释
1idbigint unsignedPRIauto_increment消息日志ID
2plugin_idbigint unsignedNULLMUL插件ID
3driver_keyvarchar(120)NULLMULutf8mb4utf8mb4_unicode_ci驱动标识
4trace_idvarchar(64)NULLMULutf8mb4utf8mb4_unicode_ci链路追踪ID
5channelvarchar(20)MULutf8mb4utf8mb4_unicode_ci消息渠道:email/sms
6recipientvarchar(255)MULutf8mb4utf8mb4_unicode_ci接收人邮箱或手机号
7template_codevarchar(120)NULLutf8mb4utf8mb4_unicode_ci业务模板编码或供应商模板ID
8subjectvarchar(255)NULLutf8mb4utf8mb4_unicode_ci邮件主题
9contentmediumtextutf8mb4utf8mb4_unicode_ci发送内容快照
10params_jsonjsonNULL渲染参数快照
11providervarchar(120)NULLutf8mb4utf8mb4_unicode_ci供应商或驱动
12request_idvarchar(100)NULLMULutf8mb4utf8mb4_unicode_ci供应商请求ID
13statusvarchar(20)pendingutf8mb4utf8mb4_unicode_ci发送状态
14error_msgtextNULLutf8mb4utf8mb4_unicode_ci失败原因
15sent_attimestampNULL发送完成时间
16origin_typevarchar(50)NULLMULutf8mb4utf8mb4_unicode_ci来源类型快照
17origin_idbigint unsignedNULL来源ID快照
18created_attimestampNULL
19updated_attimestampNULL

索引

索引名唯一类型字段基数注释
message_logs_channel_driver_idxBTREEchannel, driver_key, created_at783
message_logs_driver_created_idxBTREEdriver_key, created_at783
message_logs_origin_idxBTREEorigin_type, origin_id268
message_logs_plugin_created_idxBTREEplugin_id, created_at783
message_logs_recipient_created_at_idxBTREErecipient, created_at783
message_logs_request_id_idxBTREErequest_id23
message_logs_trace_idxBTREEtrace_id783
PRIMARYBTREEid783

外键约束

约束名字段引用表引用字段更新规则删除规则
message_logs_plugin_fkplugin_idintegration_pluginsidNO ACTIONSET NULL

2.25 migrations

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:175
  • 数据大小:16 KB
  • 索引大小:0 B
  • 自增值:188
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:—

字段

序号字段类型可空默认值额外字符集排序规则注释
1idint unsignedPRIauto_increment
2migrationvarchar(255)utf8mb4utf8mb4_unicode_ci
3batchint

索引

索引名唯一类型字段基数注释
PRIMARYBTREEid174

外键约束

无数据库级外键约束。

2.26 notice_reads

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:142
  • 数据大小:16 KB
  • 索引大小:48 KB
  • 自增值:185
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:—

字段

序号字段类型可空默认值额外字符集排序规则注释
1idbigint unsignedPRIauto_increment
2user_idbigint unsignedMUL
3article_idbigint unsignedMUL
4read_attimestamp
5created_attimestampCURRENT_TIMESTAMPDEFAULT_GENERATED

索引

索引名唯一类型字段基数注释
notice_reads_article_id_indexBTREEarticle_id10
notice_reads_user_id_article_id_uniqueBTREEuser_id, article_id142
PRIMARYBTREEid142

外键约束

约束名字段引用表引用字段更新规则删除规则
fk_stage2_notice_reads_article_idarticle_idcontent_articlesidNO ACTIONCASCADE
fk_stage2_notice_reads_user_iduser_idusersidNO ACTIONCASCADE

2.27 notification_templates

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:56
  • 数据大小:272 KB
  • 索引大小:32 KB
  • 自增值:981
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:—

字段

序号字段类型可空默认值额外字符集排序规则注释
1idbigint unsignedPRIauto_increment
2channelvarchar(20)MULutf8mb4utf8mb4_unicode_ci
3codevarchar(64)utf8mb4utf8mb4_unicode_ci
4namevarchar(120)utf8mb4utf8mb4_unicode_ci
5descriptionvarchar(500)空字符串utf8mb4utf8mb4_unicode_ci
6audiencevarchar(20)userutf8mb4utf8mb4_unicode_ci
7subjectvarchar(255)NULLutf8mb4utf8mb4_unicode_ci
8contentlongtextutf8mb4utf8mb4_unicode_ci
9variables_jsonjsonNULL
10provider_variables_jsonjsonNULL
11provider_template_idvarchar(120)NULLutf8mb4utf8mb4_unicode_ci
12is_enabledtinyint(1)1
13is_customtinyint(1)0
14sort_orderint unsigned0
15created_attimestampNULL
16updated_attimestampNULL

索引

索引名唯一类型字段基数注释
notification_templates_channel_audience_enabled_indexBTREEchannel, audience, is_enabled3
notification_templates_channel_code_uniqueBTREEchannel, code56
PRIMARYBTREEid56

外键约束

无数据库级外键约束。

2.28 operation_logs

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:181,260
  • 数据大小:78.61 MB
  • 索引大小:37.09 MB
  • 自增值:178740
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:—

字段

序号字段类型可空默认值额外字符集排序规则注释
1idbigint unsignedPRIauto_increment
2user_idbigint unsignedNULLMUL
3user_typevarchar(10)NULLutf8mb4utf8mb4_unicode_ciadmin|client
4actionvarchar(100)utf8mb4utf8mb4_unicode_ci
5modulevarchar(50)NULLMULutf8mb4utf8mb4_unicode_ci
6subject_idbigint unsignedNULL
7contextjsonNULL
8ip_addressvarchar(45)NULLutf8mb4utf8mb4_unicode_ci
9created_attimestampCURRENT_TIMESTAMPMULDEFAULT_GENERATED

索引

索引名唯一类型字段基数注释
operation_logs_created_at_idxBTREEcreated_at4,868
operation_logs_module_created_at_indexBTREEmodule, created_at7,510
operation_logs_module_subject_created_idxBTREEmodule, subject_id, created_at, id174,241
operation_logs_user_created_at_idxBTREEuser_id, created_at7,064
operation_logs_user_type_created_at_idxBTREEuser_id, user_type, created_at6,661
PRIMARYBTREEid181,027

外键约束

无数据库级外键约束。

2.29 orders

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:291
  • 数据大小:352 KB
  • 索引大小:176 KB
  • 自增值:3124
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:—

字段

序号字段类型可空默认值额外字符集排序规则注释
1idbigint unsignedPRIauto_increment
2order_novarchar(32)UNIutf8mb4utf8mb4_unicode_ci
3user_idbigint unsignedMUL
4product_idbigint unsignedNULLMUL
5product_spec_snapshotvarchar(200)NULLutf8mb4utf8mb4_unicode_ci
6product_type_snapshotvarchar(50)NULLutf8mb4utf8mb4_unicode_ci
7service_idbigint unsignedNULLMUL
8typevarchar(20)utf8mb4utf8mb4_unicode_cinew|renew|upgrade|downgrade
9coupon_idbigint unsignedNULLMUL
10user_coupon_idbigint unsignedNULLMUL
11coupon_codevarchar(50)NULLutf8mb4utf8mb4_unicode_ci
12amountdecimal(12,2)
13currencyvarchar(3)CNYutf8mb4utf8mb4_unicode_ci
14discountdecimal(12,2)0.00
15paid_amountdecimal(12,2)0.00
16billing_cyclevarchar(20)NULLutf8mb4utf8mb4_unicode_ci
17quantityint unsigned1
18config_snapshotjsonNULL
19config_pricing_snapshotjsonNULL
20coupon_snapshotjsonNULL
21service_snapshotjsonNULL服务实例快照:
22statustinyint0MUL0=待付款 1=已付款 2=开通中 3=已完成 4=已取消 5=已退款
23paid_attimestampNULL
24deleted_attimestampNULL
25created_attimestampNULLMUL
26updated_attimestampNULL
27remarkvarchar(255)NULLutf8mb4utf8mb4_unicode_ci备注
28operatorvarchar(50)NULLutf8mb4utf8mb4_unicode_ci操作人
29trace_idvarchar(64)NULLMULutf8mb4utf8mb4_unicode_ci链路追踪号
30projection_typevarchar(32)provisioningMULutf8mb4utf8mb4_unicode_ci内部投影类型:provisioning=开通投影

索引

索引名唯一类型字段基数注释
orders_coupon_id_idxBTREEcoupon_id3
orders_created_at_idxBTREEcreated_at291
orders_order_no_uniqueBTREEorder_no291
orders_product_id_idxBTREEproduct_id54
orders_projection_type_idxBTREEprojection_type1
orders_service_status_id_idxBTREEservice_id, status, id291
orders_status_type_created_at_idxBTREEstatus, type, created_at, id291
orders_trace_id_idxBTREEtrace_id121
orders_user_coupon_id_idxBTREEuser_coupon_id3
orders_user_id_indexBTREEuser_id105
orders_user_status_id_idxBTREEuser_id, status, id291
PRIMARYBTREEid291

外键约束

约束名字段引用表引用字段更新规则删除规则
fk_stage2_orders_coupon_idcoupon_idcouponsidNO ACTIONSET NULL
fk_stage2_orders_product_idproduct_idproductsidNO ACTIONRESTRICT
fk_stage2_orders_service_idservice_idservicesidNO ACTIONSET NULL
fk_stage2_orders_user_coupon_iduser_coupon_iduser_couponsidNO ACTIONSET NULL
fk_stage2_orders_user_iduser_idusersidNO ACTIONRESTRICT

2.30 password_reset_tokens

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:0
  • 数据大小:16 KB
  • 索引大小:0 B
  • 自增值:—
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:—

字段

序号字段类型可空默认值额外字符集排序规则注释
1emailvarchar(255)PRIutf8mb4utf8mb4_unicode_ci
2tokenvarchar(255)utf8mb4utf8mb4_unicode_ci
3created_attimestampNULL

索引

索引名唯一类型字段基数注释
PRIMARYBTREEemail0

外键约束

无数据库级外键约束。

2.31 payment_callbacks

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:328
  • 数据大小:320 KB
  • 索引大小:96 KB
  • 自增值:500
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:支付回调审计表,保存第三方通知、查询、退款等回调验签结果

字段

序号字段类型可空默认值额外字符集排序规则注释
1idbigint unsignedPRIauto_increment支付回调自增主键
2payment_idbigint unsignedMUL关联支付记录ID
3plugin_idbigint unsignedNULLMUL
4gateway_keyvarchar(120)NULLMULutf8mb4utf8mb4_unicode_ci
5callback_typevarchar(20)utf8mb4utf8mb4_unicode_ci回调类型:notify/query/refund 等
6gateway_trade_novarchar(100)NULLMULutf8mb4utf8mb4_unicode_ci第三方交易号
7payload_jsonjsonNULL回调载荷 JSON
8is_verifiedtinyint0MUL验签结果:0未通过/未验签 1已通过
9received_attimestampNULL收到回调时间
10remarkvarchar(255)NULLutf8mb4utf8mb4_unicode_ci回调备注或处理说明
11operatorvarchar(50)NULLutf8mb4utf8mb4_unicode_ci操作人快照
12trace_idvarchar(64)NULLMULutf8mb4utf8mb4_unicode_ci链路追踪号
13created_attimestampNULL创建时间
14updated_attimestampNULL更新时间

索引

索引名唯一类型字段基数注释
payment_callbacks_gateway_key_idxBTREEgateway_key, received_at318
payment_callbacks_gateway_trade_no_idxBTREEgateway_trade_no217
payment_callbacks_payment_type_uniqueBTREEpayment_id, callback_type328
payment_callbacks_plugin_received_idxBTREEplugin_id, received_at318
payment_callbacks_trace_id_idxBTREEtrace_id126
payment_callbacks_verified_received_idxBTREEis_verified, received_at327
PRIMARYBTREEid328

外键约束

约束名字段引用表引用字段更新规则删除规则
fk_payment_callbacks_payment_idpayment_idpaymentsidNO ACTIONCASCADE
payment_callbacks_plugin_fkplugin_idintegration_pluginsidNO ACTIONSET NULL

2.32 payments

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:319
  • 数据大小:320 KB
  • 索引大小:160 KB
  • 自增值:375
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:第三方支付记录表,仅记录真实外部资金流入和退款状态,不记录余额/免费/手工开服

字段

序号字段类型可空默认值额外字符集排序规则注释
1idbigint unsignedPRIauto_increment支付记录自增主键
2payment_novarchar(32)UNIutf8mb4utf8mb4_unicode_ci内部支付单号
3user_idbigint unsignedMUL支付用户ID
4order_idbigint unsignedNULLMUL内部订单/开通投影ID,仅用于流程追踪
5invoice_idbigint unsignedNULLMUL关联账单ID
6plugin_idbigint unsignedNULLMUL
7gateway_keyvarchar(120)NULLutf8mb4utf8mb4_unicode_ci
8trade_novarchar(100)NULLMULutf8mb4utf8mb4_unicode_ci第三方交易号
9amountdecimal(12,2)第三方支付金额
10currencyvarchar(3)CNYutf8mb4utf8mb4_unicode_ci
11statustinyint0MUL支付状态:0待支付 1成功 2失败 3已退款 4已取消
12callback_rawjsonNULL最近一次回调原始载荷 JSON
13paid_attimestampNULL第三方确认支付时间
14deleted_attimestampNULL
15created_attimestampNULL创建时间
16updated_attimestampNULL更新时间
17remarkvarchar(255)NULLutf8mb4utf8mb4_unicode_ci支付备注
18operatorvarchar(50)NULLutf8mb4utf8mb4_unicode_ci操作人快照
19trace_idvarchar(64)NULLMULutf8mb4utf8mb4_unicode_ci链路追踪号

索引

索引名唯一类型字段基数注释
payments_invoice_gateway_status_id_idxBTREEinvoice_id, status, id319
payments_invoice_status_created_at_idxBTREEinvoice_id, status, created_at, id319
payments_order_status_idxBTREEorder_id, status174
payments_payment_no_uniqueBTREEpayment_no319
payments_plugin_status_paid_idxBTREEplugin_id, status, paid_at268
payments_plugin_trade_uniqueBTREEplugin_id, gateway_key, trade_no218
payments_status_paid_at_idxBTREEstatus, paid_at266
payments_trace_id_idxBTREEtrace_id129
payments_trade_no_indexBTREEtrade_no217
payments_user_status_created_idxBTREEuser_id, status, created_at319
PRIMARYBTREEid319

外键约束

约束名字段引用表引用字段更新规则删除规则
fk_payments_invoice_idinvoice_idinvoicesidNO ACTIONRESTRICT
fk_payments_user_iduser_idusersidNO ACTIONRESTRICT
fk_stage2_payments_order_idorder_idordersidNO ACTIONSET NULL
payments_plugin_fkplugin_idintegration_pluginsidNO ACTIONSET NULL

2.33 personal_access_tokens

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:370
  • 数据大小:96 KB
  • 索引大小:80 KB
  • 自增值:408
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:—

字段

序号字段类型可空默认值额外字符集排序规则注释
1idbigint unsignedPRIauto_increment
2tokenable_typevarchar(255)MULutf8mb4utf8mb4_unicode_ci
3tokenable_idbigint unsigned
4nametextutf8mb4utf8mb4_unicode_ci
5tokenvarchar(64)UNIutf8mb4utf8mb4_unicode_ci
6abilitiestextNULLutf8mb4utf8mb4_unicode_ci
7last_used_attimestampNULL
8expires_attimestampNULLMUL
9created_attimestampNULL
10updated_attimestampNULL

索引

索引名唯一类型字段基数注释
personal_access_tokens_expires_at_indexBTREEexpires_at8
personal_access_tokens_token_uniqueBTREEtoken370
personal_access_tokens_tokenable_type_tokenable_id_indexBTREEtokenable_type, tokenable_id55
PRIMARYBTREEid370

外键约束

无数据库级外键约束。

2.34 product_upstream_bindings

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:139
  • 数据大小:8.52 MB
  • 索引大小:96 KB
  • 自增值:270
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:—

字段

序号字段类型可空默认值额外字符集排序规则注释
1idbigint unsignedPRIauto_increment
2product_idbigint unsignedMUL
3supplier_plugin_binding_idbigint unsignedMUL
4plugin_idbigint unsignedMUL
5provider_keyvarchar(120)MULutf8mb4utf8mb4_unicode_ci
6upstream_product_idvarchar(120)utf8mb4utf8mb4_unicode_ci
7upstream_product_snapshot_jsonjsonNULL
8option_schema_jsonjsonNULL
9provision_policy_jsonjsonNULL
10auto_setuptinyint(1)0
11statustinyint unsigned1
12last_synced_attimestampNULL
13last_sync_errorvarchar(500)NULLutf8mb4utf8mb4_unicode_ci
14backfill_batch_idvarchar(64)NULLMULutf8mb4utf8mb4_unicode_ci
15created_attimestampNULL
16updated_attimestampNULL

索引

索引名唯一类型字段基数注释
PRIMARYBTREEid139
product_upstream_backfill_batch_idxBTREEbackfill_batch_id1
product_upstream_bindings_supplier_plugin_binding_id_foreignBTREEsupplier_plugin_binding_id2
product_upstream_plugin_status_idxBTREEplugin_id, status2
product_upstream_product_status_idxBTREEproduct_id, status139
product_upstream_provider_status_idxBTREEprovider_key, status2
product_upstream_uniqueBTREEproduct_id, supplier_plugin_binding_id, upstream_product_id139

外键约束

约束名字段引用表引用字段更新规则删除规则
product_upstream_bindings_plugin_id_foreignplugin_idintegration_pluginsidNO ACTIONRESTRICT
product_upstream_bindings_product_id_foreignproduct_idproductsidNO ACTIONRESTRICT
product_upstream_bindings_supplier_plugin_binding_id_foreignsupplier_plugin_binding_idsupplier_plugin_bindingsidNO ACTIONRESTRICT

2.35 products

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:127
  • 数据大小:9.52 MB
  • 索引大小:48 KB
  • 自增值:379
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:商品表,记录可售卖产品的分类、定价、库存、上游绑定和开通策略

字段

序号字段类型可空默认值额外字符集排序规则注释
1idbigint unsignedPRIauto_increment商品自增主键
2product_group_idbigint unsignedNULLMUL当前所属商品分组ID
3service_type_codevarchar(50)NULLutf8mb4utf8mb4_unicode_ci服务类型代码,用于前后端能力分流
4product_typevarchar(30)MULutf8mb4utf8mb4_unicode_ci商品类型:vps/dedicated/hosting/domain/other
5console_templatevarchar(32)computeutf8mb4utf8mb4_unicode_ci用户控制台模板:compute 或 port_mapping
6custom_display_namevarchar(190)NULLutf8mb4utf8mb4_unicode_ci自定义展示名称
7remarkvarchar(255)NULLutf8mb4utf8mb4_unicode_ci商品备注
8pricingjson周期价格 JSON,如 monthly/quarterly/annually
9setup_feedecimal(12,2)0.00初装费
10config_optionsjsonNULL可选配置项 JSON
11purchase_requiresjsonNULL购买限制 JSON,如实名认证、手机号要求
12stockint-1库存数量,-1 表示不限
13statustinyint1商品状态:0下架 1上架
14sort_orderint0排序值,越小越靠前
15auto_setuptinyint0是否自动开通:0手动 1自动
16created_attimestampNULL创建时间
17updated_attimestampNULL更新时间
18deleted_attimestampNULL软删除时间

索引

索引名唯一类型字段基数注释
PRIMARYBTREEid127
products_group_status_sort_id_idxBTREEproduct_group_id, status, sort_order, id127
products_type_status_indexBTREEproduct_type, status9

外键约束

约束名字段引用表引用字段更新规则删除规则
products_product_group_fkproduct_group_idthird_product_groupsidNO ACTIONRESTRICT

2.36 recharge_records

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:24
  • 数据大小:16 KB
  • 索引大小:144 KB
  • 自增值:25
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:—

字段

序号字段类型可空默认值额外字符集排序规则注释
1idbigint unsignedPRIauto_increment
2record_novarchar(32)UNIutf8mb4utf8mb4_unicode_ci
3user_idbigint unsignedMUL
4order_idbigint unsignedNULLMUL
5invoice_idbigint unsignedNULLMUL
6payment_idbigint unsignedNULLUNI
7account_transaction_idbigint unsignedNULLUNI
8refund_idbigint unsignedNULLMUL
9origin_recharge_record_idbigint unsignedNULLMUL
10scenevarchar(30)utf8mb4utf8mb4_unicode_ci业务场景:recharge=支付充值 admin_recharge=管理员充值 refund=退款 等
11directionvarchar(8)utf8mb4utf8mb4_unicode_ci资金方向:in=入账 out=出账
12amountdecimal(12,2)
13currencyvarchar(3)CNYutf8mb4utf8mb4_unicode_ci
14entry_typevarchar(30)utf8mb4utf8mb4_unicode_ci入账类型:third_party_payment/manual_recharge/account_recharge/refund_offset
15remarkvarchar(255)NULLutf8mb4utf8mb4_unicode_ci
16operator_typevarchar(30)NULLutf8mb4utf8mb4_unicode_ci
17operator_idbigint unsignedNULL
18operator_namevarchar(50)NULLutf8mb4utf8mb4_unicode_ci
19trace_idvarchar(64)NULLMULutf8mb4utf8mb4_unicode_ci
20created_attimestampNULL
21updated_attimestampNULL

索引

索引名唯一类型字段基数注释
PRIMARYBTREEid12
recharge_records_account_transaction_id_uniqueBTREEaccount_transaction_id3
recharge_records_invoice_id_id_indexBTREEinvoice_id, id12
recharge_records_order_id_id_indexBTREEorder_id, id12
recharge_records_origin_recharge_record_id_id_indexBTREEorigin_recharge_record_id, id12
recharge_records_payment_id_uniqueBTREEpayment_id11
recharge_records_record_no_uniqueBTREErecord_no12
recharge_records_refund_id_foreignBTREErefund_id1
recharge_records_trace_id_indexBTREEtrace_id12
recharge_records_user_id_created_at_indexBTREEuser_id, created_at12

外键约束

约束名字段引用表引用字段更新规则删除规则
recharge_records_account_transaction_id_foreignaccount_transaction_idaccount_transactionsidNO ACTIONSET NULL
recharge_records_invoice_id_foreigninvoice_idinvoicesidNO ACTIONSET NULL
recharge_records_order_id_foreignorder_idordersidNO ACTIONSET NULL
recharge_records_origin_recharge_record_id_foreignorigin_recharge_record_idrecharge_recordsidNO ACTIONSET NULL
recharge_records_payment_id_foreignpayment_idpaymentsidNO ACTIONSET NULL
recharge_records_refund_id_foreignrefund_idrefundsidNO ACTIONSET NULL
recharge_records_user_id_foreignuser_idusersidNO ACTIONRESTRICT

2.37 referral_account_logs

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:6
  • 数据大小:16 KB
  • 索引大小:64 KB
  • 自增值:7
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:—

字段

序号字段类型可空默认值额外字符集排序规则注释
1idbigint unsignedPRIauto_increment
2user_idbigint unsignedMUL
3event_typevarchar(30)utf8mb4utf8mb4_unicode_cireward_frozen|reward_released|withdraw_apply|withdraw_approved|withdraw_rejected
4change_amountdecimal(12,2)正=增加 负=减少
5frozen_balancedecimal(12,2)0.00
6available_balancedecimal(12,2)0.00
7pending_withdrawal_balancedecimal(12,2)0.00
8withdrawn_balancedecimal(12,2)0.00
9remarkvarchar(255)空字符串utf8mb4utf8mb4_unicode_ci
10reference_idbigint unsignedNULL
11reference_typevarchar(30)NULLMULutf8mb4utf8mb4_unicode_ci
12operatorvarchar(50)NULLutf8mb4utf8mb4_unicode_ci
13trace_idvarchar(64)NULLutf8mb4utf8mb4_unicode_ci
14created_attimestampCURRENT_TIMESTAMPMULDEFAULT_GENERATED

索引

索引名唯一类型字段基数注释
idx_referral_account_relatedBTREEreference_type, reference_id6
idx_referral_account_user_created_idxBTREEuser_id, created_at, id6
idx_referral_account_user_typeBTREEuser_id, event_type2
PRIMARYBTREEid6
referral_account_logs_created_at_indexBTREEcreated_at1

外键约束

约束名字段引用表引用字段更新规则删除规则
fk_stage2_referral_account_logs_user_iduser_idusersidNO ACTIONRESTRICT

2.38 referral_rewards

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:5
  • 数据大小:16 KB
  • 索引大小:96 KB
  • 自增值:11
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:—

字段

序号字段类型可空默认值额外字符集排序规则注释
1idbigint unsignedPRIauto_increment
2referrer_user_idbigint unsignedMUL
3referred_user_idbigint unsignedMUL
4order_idbigint unsignedUNI
5invoice_idbigint unsignedNULLMUL
6product_idbigint unsignedNULLMUL
7order_amountdecimal(12,2)0.00
8reward_ratedecimal(5,2)0.00
9reward_amountdecimal(12,2)0.00
10available_attimestampNULL
11released_attimestampNULL
12statustinyint00=冻结中 1=已发放 2=已回退
13operatorvarchar(50)NULLutf8mb4utf8mb4_unicode_ci
14remarkvarchar(255)NULLutf8mb4utf8mb4_unicode_ci
15trace_idvarchar(64)NULLutf8mb4utf8mb4_unicode_ci
16rewarded_attimestampNULLMUL
17created_attimestampNULL
18updated_attimestampNULL

索引

索引名唯一类型字段基数注释
idx_referral_reward_referred_statusBTREEreferred_user_id, status2
idx_referral_reward_referrer_statusBTREEreferrer_user_id, status1
PRIMARYBTREEid5
referral_rewards_invoice_id_idxBTREEinvoice_id4
referral_rewards_order_id_uniqueBTREEorder_id5
referral_rewards_product_id_indexBTREEproduct_id4
referral_rewards_rewarded_at_indexBTREErewarded_at5

外键约束

约束名字段引用表引用字段更新规则删除规则
fk_stage2_referral_rewards_invoice_idinvoice_idinvoicesidNO ACTIONSET NULL
fk_stage2_referral_rewards_order_idorder_idordersidNO ACTIONRESTRICT
fk_stage2_referral_rewards_product_idproduct_idproductsidNO ACTIONSET NULL
fk_stage2_referral_rewards_referred_user_idreferred_user_idusersidNO ACTIONRESTRICT
fk_stage2_referral_rewards_referrer_user_idreferrer_user_idusersidNO ACTIONRESTRICT

2.39 referral_withdrawals

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:0
  • 数据大小:16 KB
  • 索引大小:48 KB
  • 自增值:4
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:—

字段

序号字段类型可空默认值额外字符集排序规则注释
1idbigint unsignedPRIauto_increment
2user_idbigint unsignedMUL
3amountdecimal(12,2)0.00
4methodvarchar(20)alipayutf8mb4utf8mb4_unicode_cibalance|alipay
5account_namevarchar(80)空字符串utf8mb4utf8mb4_unicode_ci
6account_novarchar(120)空字符串utf8mb4utf8mb4_unicode_ci
7statustinyint0MUL0=待处理 1=已通过 2=已拒绝
8payment_novarchar(120)NULLutf8mb4utf8mb4_unicode_ci
9remarkvarchar(255)NULLutf8mb4utf8mb4_unicode_ci
10operatorvarchar(50)NULLutf8mb4utf8mb4_unicode_ci
11paid_attimestampNULL
12trace_idvarchar(64)UNIutf8mb4utf8mb4_unicode_ci
13processed_attimestampNULL
14created_attimestampNULL
15updated_attimestampNULL

索引

索引名唯一类型字段基数注释
idx_referral_withdraw_status_createdBTREEstatus, created_at0
idx_referral_withdraw_user_statusBTREEuser_id, status0
PRIMARYBTREEid0
referral_withdrawals_trace_id_uniqueBTREEtrace_id0

外键约束

约束名字段引用表引用字段更新规则删除规则
fk_stage2_referral_withdrawals_user_iduser_idusersidNO ACTIONRESTRICT

2.40 refunds

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:2
  • 数据大小:16 KB
  • 索引大小:96 KB
  • 自增值:4
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:—

字段

序号字段类型可空默认值额外字符集排序规则注释
1idbigint unsignedPRIauto_increment
2refund_novarchar(32)UNIutf8mb4utf8mb4_unicode_ci
3user_idbigint unsignedMUL
4invoice_idbigint unsignedMUL
5refund_invoice_idbigint unsignedNULLMUL
6payment_idbigint unsignedNULLMUL
7amountdecimal(12,2)
8statustinyint unsigned1退款状态:1=已完成
9refund_methodvarchar(32)balanceutf8mb4utf8mb4_unicode_ci
10currencyvarchar(3)CNYutf8mb4utf8mb4_unicode_ci
11reasonvarchar(255)NULLutf8mb4utf8mb4_unicode_ci
12gateway_refund_novarchar(100)NULLutf8mb4utf8mb4_unicode_ci
13operator_typevarchar(30)NULLutf8mb4utf8mb4_unicode_ci
14operator_idbigint unsignedNULL
15operator_namevarchar(50)NULLutf8mb4utf8mb4_unicode_ci
16trace_idvarchar(64)NULLMULutf8mb4utf8mb4_unicode_ci
17refunded_attimestampNULL
18created_attimestampNULL
19updated_attimestampNULL

索引

索引名唯一类型字段基数注释
PRIMARYBTREEid0
refunds_invoice_id_status_id_indexBTREEinvoice_id, status, id0
refunds_payment_id_foreignBTREEpayment_id0
refunds_refund_invoice_id_foreignBTREErefund_invoice_id0
refunds_refund_no_uniqueBTREErefund_no0
refunds_trace_id_indexBTREEtrace_id0
refunds_user_id_created_at_indexBTREEuser_id, created_at0

外键约束

约束名字段引用表引用字段更新规则删除规则
refunds_invoice_id_foreigninvoice_idinvoicesidNO ACTIONRESTRICT
refunds_payment_id_foreignpayment_idpaymentsidNO ACTIONSET NULL
refunds_refund_invoice_id_foreignrefund_invoice_idinvoicesidNO ACTIONSET NULL
refunds_user_id_foreignuser_idusersidNO ACTIONRESTRICT

2.41 roles

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:2
  • 数据大小:16 KB
  • 索引大小:16 KB
  • 自增值:398
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:—

字段

序号字段类型可空默认值额外字符集排序规则注释
1idbigint unsignedPRIauto_increment
2namevarchar(50)UNIutf8mb4utf8mb4_unicode_ci
3labelvarchar(100)NULLutf8mb4utf8mb4_unicode_ci
4permissionsjson权限标识数组
5created_attimestampNULL
6updated_attimestampNULL

索引

索引名唯一类型字段基数注释
PRIMARYBTREEid2
roles_name_uniqueBTREEname2

外键约束

无数据库级外键约束。

2.42 schedule_run_logs

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:149,720
  • 数据大小:31.56 MB
  • 索引大小:21.09 MB
  • 自增值:152327
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:—

字段

序号字段类型可空默认值额外字符集排序规则注释
1idbigint unsignedPRIauto_increment
2task_namevarchar(100)MULutf8mb4utf8mb4_unicode_ci任务名称
3statusvarchar(20)successMULutf8mb4utf8mb4_unicode_ci执行状态: success, failed, skipped
4duration_msint unsigned0执行耗时(毫秒)
5summaryjsonNULL执行摘要数据
6error_msgtextNULLutf8mb4utf8mb4_unicode_ci错误信息
7started_attimestampNULL开始时间
8finished_attimestampNULL结束时间
9created_attimestampNULLMUL
10updated_attimestampNULL

索引

索引名唯一类型字段基数注释
PRIMARYBTREEid149,720
schedule_run_logs_created_at_indexBTREEcreated_at78,500
schedule_run_logs_status_created_at_indexBTREEstatus, created_at79,620
schedule_run_logs_task_name_created_at_indexBTREEtask_name, created_at149,720

外键约束

无数据库级外键约束。

2.43 schedule_task_runs

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:3,408
  • 数据大小:1.52 MB
  • 索引大小:1.23 MB
  • 自增值:3568
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:—

字段

序号字段类型可空默认值额外字符集排序规则注释
1idbigint unsignedPRIauto_increment
2parent_run_idbigint unsignedNULLMUL
3schedule_tick_idbigint unsignedNULLMUL
4task_keyvarchar(120)MULutf8mb4utf8mb4_unicode_ci
5task_namevarchar(160)utf8mb4utf8mb4_unicode_ci
6rule_descriptionvarchar(160)NULLutf8mb4utf8mb4_unicode_ci
7sourcevarchar(40)heartbeatMULutf8mb4utf8mb4_unicode_ci
8queuevarchar(80)NULLutf8mb4utf8mb4_unicode_ci
9statusvarchar(30)queuedMULutf8mb4utf8mb4_unicode_ci
10attemptsmallint unsigned1
11duration_msint unsignedNULL
12summaryjsonNULL
13error_msgtextNULLutf8mb4utf8mb4_unicode_ci
14queued_attimestampNULL
15started_attimestampNULL
16finished_attimestampNULL
17manual_retry_attimestampNULL
18manual_retry_bybigint unsignedNULL
19created_attimestampNULL
20updated_attimestampNULL

索引

索引名唯一类型字段基数注释
PRIMARYBTREEid3,408
schedule_task_runs_active_lookup_indexBTREEtask_key, status, queued_at3,408
schedule_task_runs_parent_created_at_indexBTREEparent_run_id, created_at329
schedule_task_runs_source_created_at_indexBTREEsource, created_at329
schedule_task_runs_status_created_at_indexBTREEstatus, created_at420
schedule_task_runs_task_key_created_at_indexBTREEtask_key, created_at3,408
schedule_task_runs_tick_task_source_uniqueBTREEschedule_tick_id, task_key, source3,408

外键约束

约束名字段引用表引用字段更新规则删除规则
schedule_task_runs_schedule_tick_id_foreignschedule_tick_idschedule_ticksidNO ACTIONSET NULL

2.44 schedule_ticks

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:279
  • 数据大小:16 KB
  • 索引大小:48 KB
  • 自增值:315
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:—

字段

序号字段类型可空默认值额外字符集排序规则注释
1idbigint unsignedPRIauto_increment
2slot_started_attimestampUNI
3global_numberbigint unsignedUNI
4daily_indextinyint unsignedMUL
5triggered_attimestampNULLMUL
6created_attimestampNULL
7updated_attimestampNULL

索引

索引名唯一类型字段基数注释
PRIMARYBTREEid279
schedule_ticks_daily_index_indexBTREEdaily_index96
schedule_ticks_global_number_uniqueBTREEglobal_number279
schedule_ticks_slot_started_at_uniqueBTREEslot_started_at279
schedule_ticks_triggered_at_indexBTREEtriggered_at279

外键约束

无数据库级外键约束。

2.45 second_product_groups

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:15
  • 数据大小:16 KB
  • 索引大小:32 KB
  • 自增值:45
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:—

字段

序号字段类型可空默认值额外字符集排序规则注释
1idbigint unsignedPRIauto_increment
2first_product_group_idbigint unsignedMUL
3namevarchar(100)utf8mb4utf8mb4_unicode_ci
4slugvarchar(100)NULLutf8mb4utf8mb4_unicode_ci
5descriptionvarchar(255)NULLutf8mb4utf8mb4_unicode_ci
6banner_imagevarchar(255)NULLutf8mb4utf8mb4_unicode_ci
7sort_orderint0
8is_visibletinyint unsigned1
9created_attimestampNULL
10updated_attimestampNULL

索引

索引名唯一类型字段基数注释
idx_second_first_visible_sortBTREEfirst_product_group_id, is_visible, sort_order14
PRIMARYBTREEid15
uq_second_first_slugBTREEfirst_product_group_id, slug15

外键约束

约束名字段引用表引用字段更新规则删除规则
fk_second_first_groupfirst_product_group_idfirst_product_groupsidNO ACTIONRESTRICT

2.46 service_connection_snapshots

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:183
  • 数据大小:304 KB
  • 索引大小:80 KB
  • 自增值:214
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:—

字段

序号字段类型可空默认值额外字符集排序规则注释
1idbigint unsignedPRIauto_increment
2service_idbigint unsignedMUL
3service_upstream_binding_idbigint unsignedNULLMUL
4plugin_idbigint unsignedNULLMUL
5provider_keyvarchar(120)NULLMULutf8mb4utf8mb4_unicode_ci
6connection_typevarchar(60)defaultutf8mb4utf8mb4_unicode_ci
7hostnamevarchar(255)NULLutf8mb4utf8mb4_unicode_ci
8ip_addressvarchar(120)NULLutf8mb4utf8mb4_unicode_ci
9portint unsignedNULL
10connection_jsonjsonNULL
11secret_jsonlongtextNULLutf8mb4utf8mb4_unicode_ci
12has_secret_jsonjsonNULL
13checked_attimestampNULL
14backfill_batch_idvarchar(64)NULLMULutf8mb4utf8mb4_unicode_ci
15created_attimestampNULL
16updated_attimestampNULL

索引

索引名唯一类型字段基数注释
PRIMARYBTREEid183
service_connection_backfill_batch_idxBTREEbackfill_batch_id2
service_connection_plugin_checked_idxBTREEplugin_id, checked_at104
service_connection_provider_type_idxBTREEprovider_key, connection_type1
service_connection_service_type_uniqueBTREEservice_id, connection_type183
service_connection_snapshots_service_upstream_binding_id_foreignBTREEservice_upstream_binding_id179

外键约束

约束名字段引用表引用字段更新规则删除规则
service_connection_snapshots_plugin_id_foreignplugin_idintegration_pluginsidNO ACTIONSET NULL
service_connection_snapshots_service_id_foreignservice_idservicesidNO ACTIONCASCADE
service_connection_snapshots_service_upstream_binding_id_foreignservice_upstream_binding_idservice_upstream_bindingsidNO ACTIONSET NULL

2.47 service_provision_attempts

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:233
  • 数据大小:112 KB
  • 索引大小:80 KB
  • 自增值:444
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:—

字段

序号字段类型可空默认值额外字符集排序规则注释
1idbigint unsignedPRIauto_increment
2service_idbigint unsignedNULLMUL
3service_upstream_binding_idbigint unsignedNULLMUL
4plugin_idbigint unsignedNULLMUL
5provider_keyvarchar(120)NULLutf8mb4utf8mb4_unicode_ci
6actionvarchar(80)utf8mb4utf8mb4_unicode_ci
7attempt_statusvarchar(30)utf8mb4utf8mb4_unicode_ci
8trace_idvarchar(64)NULLMULutf8mb4utf8mb4_unicode_ci
9request_meta_jsonjsonNULL
10response_meta_jsonjsonNULL
11error_codevarchar(80)NULLutf8mb4utf8mb4_unicode_ci
12error_messagevarchar(500)NULLutf8mb4utf8mb4_unicode_ci
13attempted_attimestampNULL
14backfill_batch_idvarchar(64)NULLMULutf8mb4utf8mb4_unicode_ci
15created_attimestampNULL
16updated_attimestampNULL

索引

索引名唯一类型字段基数注释
PRIMARYBTREEid233
service_attempt_backfill_batch_idxBTREEbackfill_batch_id2
service_attempt_plugin_status_idxBTREEplugin_id, attempt_status, attempted_at187
service_attempt_service_action_idxBTREEservice_id, action, attempted_at233
service_attempt_trace_idxBTREEtrace_id95
service_provision_attempts_service_upstream_binding_id_foreignBTREEservice_upstream_binding_id158

外键约束

约束名字段引用表引用字段更新规则删除规则
service_provision_attempts_plugin_id_foreignplugin_idintegration_pluginsidNO ACTIONSET NULL
service_provision_attempts_service_id_foreignservice_idservicesidNO ACTIONSET NULL
service_provision_attempts_service_upstream_binding_id_foreignservice_upstream_binding_idservice_upstream_bindingsidNO ACTIONSET NULL

2.48 service_runtime_snapshots

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:183
  • 数据大小:272 KB
  • 索引大小:80 KB
  • 自增值:214
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:—

字段

序号字段类型可空默认值额外字符集排序规则注释
1idbigint unsignedPRIauto_increment
2service_idbigint unsignedUNI
3service_upstream_binding_idbigint unsignedNULLMUL
4plugin_idbigint unsignedNULLMUL
5provider_keyvarchar(120)NULLMULutf8mb4utf8mb4_unicode_ci
6status_keyvarchar(60)NULLutf8mb4utf8mb4_unicode_ci
7status_textvarchar(120)NULLutf8mb4utf8mb4_unicode_ci
8resource_jsonjsonNULL
9metrics_jsonjsonNULL
10snapshot_jsonjsonNULL
11synced_attimestampNULL
12backfill_batch_idvarchar(64)NULLMULutf8mb4utf8mb4_unicode_ci
13created_attimestampNULL
14updated_attimestampNULL

索引

索引名唯一类型字段基数注释
PRIMARYBTREEid183
service_runtime_backfill_batch_idxBTREEbackfill_batch_id2
service_runtime_plugin_synced_idxBTREEplugin_id, synced_at100
service_runtime_provider_status_idxBTREEprovider_key, status_key3
service_runtime_service_uniqueBTREEservice_id183
service_runtime_snapshots_service_upstream_binding_id_foreignBTREEservice_upstream_binding_id179

外键约束

约束名字段引用表引用字段更新规则删除规则
service_runtime_snapshots_plugin_id_foreignplugin_idintegration_pluginsidNO ACTIONSET NULL
service_runtime_snapshots_service_id_foreignservice_idservicesidNO ACTIONCASCADE
service_runtime_snapshots_service_upstream_binding_id_foreignservice_upstream_binding_idservice_upstream_bindingsidNO ACTIONSET NULL

2.49 service_upstream_bindings

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:178
  • 数据大小:144 KB
  • 索引大小:112 KB
  • 自增值:300
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:—

字段

序号字段类型可空默认值额外字符集排序规则注释
1idbigint unsignedPRIauto_increment
2service_idbigint unsignedMUL
3product_upstream_binding_idbigint unsignedNULLMUL
4supplier_plugin_binding_idbigint unsignedNULLMUL
5plugin_idbigint unsignedMUL
6provider_keyvarchar(120)MULutf8mb4utf8mb4_unicode_ci
7upstream_service_idvarchar(120)utf8mb4utf8mb4_unicode_ci
8upstream_account_idvarchar(120)NULLutf8mb4utf8mb4_unicode_ci
9runtime_snapshot_jsonjsonNULL
10connection_snapshot_jsonjsonNULL
11status_snapshotvarchar(60)NULLutf8mb4utf8mb4_unicode_ci
12last_synced_attimestampNULL
13last_sync_errorvarchar(500)NULLutf8mb4utf8mb4_unicode_ci
14backfill_batch_idvarchar(64)NULLMULutf8mb4utf8mb4_unicode_ci
15created_attimestampNULL
16updated_attimestampNULL

索引

索引名唯一类型字段基数注释
PRIMARYBTREEid178
service_upstream_backfill_batch_idxBTREEbackfill_batch_id2
service_upstream_bindings_product_upstream_binding_id_foreignBTREEproduct_upstream_binding_id49
service_upstream_bindings_supplier_plugin_binding_id_foreignBTREEsupplier_plugin_binding_id2
service_upstream_plugin_sync_idxBTREEplugin_id, last_synced_at99
service_upstream_provider_status_idxBTREEprovider_key, status_snapshot4
service_upstream_service_idxBTREEservice_id178
service_upstream_uniqueBTREEservice_id, plugin_id, upstream_service_id178

外键约束

约束名字段引用表引用字段更新规则删除规则
service_upstream_bindings_plugin_id_foreignplugin_idintegration_pluginsidNO ACTIONRESTRICT
service_upstream_bindings_product_upstream_binding_id_foreignproduct_upstream_binding_idproduct_upstream_bindingsidNO ACTIONSET NULL
service_upstream_bindings_service_id_foreignservice_idservicesidNO ACTIONRESTRICT
service_upstream_bindings_supplier_plugin_binding_id_foreignsupplier_plugin_binding_idsupplier_plugin_bindingsidNO ACTIONSET NULL

2.50 services

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:138
  • 数据大小:1.52 MB
  • 索引大小:128 KB
  • 自增值:314
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:服务实例表,记录用户已购买产品的生命周期、计费、上游和续费状态

字段

序号字段类型可空默认值额外字符集排序规则注释
1idbigint unsignedPRIauto_increment服务实例自增主键
2user_idbigint unsignedMUL所属用户ID
3product_idbigint unsignedMUL关联商品ID
4order_idbigint unsignedNULLMUL内部订单/开通投影ID,仅用于流程追踪
5invoice_idbigint unsignedNULLMUL最近一次关联账单ID
6namevarchar(200)空字符串utf8mb4utf8mb4_unicode_ci服务自定义名称
7domainvarchar(200)空字符串utf8mb4utf8mb4_unicode_ci服务域名或主机名
8billing_cyclevarchar(20)utf8mb4utf8mb4_unicode_ci计费周期
9amountdecimal(12,2)服务续费/购买金额
10locked_pricingjsonNULL锁定续费定价 JSON,null 表示跟随商品定价
11statustinyint0MUL服务状态:0待开通 1运行中 2已暂停 3已到期 4已取消
12provision_datajsonNULL开通和上游实例数据 JSON
13expires_attimestampNULLMUL服务到期时间
14auto_renewtinyint0是否自动续费:0关闭 1开启
15suspended_reasonvarchar(200)NULLutf8mb4utf8mb4_unicode_ci暂停原因
16created_attimestampNULL创建时间
17updated_attimestampNULL更新时间
18deleted_attimestampNULL
19remarkvarchar(255)NULLutf8mb4utf8mb4_unicode_ci服务备注
20operatorvarchar(50)NULLutf8mb4utf8mb4_unicode_ci操作人快照
21trace_idvarchar(64)NULLMULutf8mb4utf8mb4_unicode_ci链路追踪号

索引

索引名唯一类型字段基数注释
PRIMARYBTREEid138
services_expires_at_indexBTREEexpires_at138
services_invoice_id_idxBTREEinvoice_id48
services_order_id_idxBTREEorder_id138
services_product_id_idxBTREEproduct_id49
services_status_expires_at_id_idxBTREEstatus, expires_at, id138
services_trace_id_idxBTREEtrace_id78
services_user_id_indexBTREEuser_id97
services_user_status_id_idxBTREEuser_id, status, id138

外键约束

约束名字段引用表引用字段更新规则删除规则
fk_services_invoice_idinvoice_idinvoicesidNO ACTIONSET NULL
fk_services_product_idproduct_idproductsidNO ACTIONRESTRICT
fk_services_user_iduser_idusersidNO ACTIONRESTRICT
fk_stage2_services_order_idorder_idordersidNO ACTIONSET NULL

2.51 sessions

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:0
  • 数据大小:16 KB
  • 索引大小:32 KB
  • 自增值:—
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:—

字段

序号字段类型可空默认值额外字符集排序规则注释
1idvarchar(255)PRIutf8mb4utf8mb4_unicode_ci
2user_idbigint unsignedNULLMUL
3ip_addressvarchar(45)NULLutf8mb4utf8mb4_unicode_ci
4user_agenttextNULLutf8mb4utf8mb4_unicode_ci
5payloadlongtextutf8mb4utf8mb4_unicode_ci
6last_activityintMUL

索引

索引名唯一类型字段基数注释
PRIMARYBTREEid0
sessions_last_activity_indexBTREElast_activity0
sessions_user_id_indexBTREEuser_id0

外键约束

约束名字段引用表引用字段更新规则删除规则
fk_stage2_sessions_user_iduser_idusersidNO ACTIONCASCADE

2.52 settings

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:113
  • 数据大小:96 KB
  • 索引大小:16 KB
  • 自增值:343
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:—

字段

序号字段类型可空默认值额外字符集排序规则注释
1idbigint unsignedPRIauto_increment
2group_keyvarchar(50)MULutf8mb4utf8mb4_unicode_ci
3item_keyvarchar(100)utf8mb4utf8mb4_unicode_ci
4item_valuetextNULLutf8mb4utf8mb4_unicode_ci

索引

索引名唯一类型字段基数注释
PRIMARYBTREEid113
settings_group_key_uniqueBTREEgroup_key, item_key113

外键约束

无数据库级外键约束。

2.53 supplier_plugin_bindings

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:2
  • 数据大小:16 KB
  • 索引大小:64 KB
  • 自增值:105
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:—

字段

序号字段类型可空默认值额外字符集排序规则注释
1idbigint unsignedPRIauto_increment
2supplier_idbigint unsignedMUL
3plugin_idbigint unsignedMUL
4provider_keyvarchar(120)MULutf8mb4utf8mb4_unicode_ci
5environmentvarchar(30)productionutf8mb4utf8mb4_unicode_ci
6statustinyint unsigned1
7priorityint0
8base_urlvarchar(255)NULLutf8mb4utf8mb4_unicode_ci
9account_namevarchar(120)NULLutf8mb4utf8mb4_unicode_ci
10config_jsonjsonNULL
11secret_jsonlongtextNULLutf8mb4utf8mb4_unicode_ci
12has_secret_jsonjsonNULL
13last_checked_attimestampNULL
14last_check_statusvarchar(30)NULLutf8mb4utf8mb4_unicode_ci
15last_check_errorvarchar(500)NULLutf8mb4utf8mb4_unicode_ci
16created_bybigint unsignedNULL
17updated_bybigint unsignedNULL
18backfill_batch_idvarchar(64)NULLMULutf8mb4utf8mb4_unicode_ci
19created_attimestampNULL
20updated_attimestampNULL

索引

索引名唯一类型字段基数注释
PRIMARYBTREEid2
supplier_plugin_backfill_batch_idxBTREEbackfill_batch_id1
supplier_plugin_plugin_status_idxBTREEplugin_id, status1
supplier_plugin_provider_status_idxBTREEprovider_key, status1
supplier_plugin_uniqueBTREEsupplier_id, plugin_id, environment2

外键约束

约束名字段引用表引用字段更新规则删除规则
supplier_plugin_bindings_plugin_id_foreignplugin_idintegration_pluginsidNO ACTIONRESTRICT
supplier_plugin_bindings_supplier_id_foreignsupplier_idsuppliersidNO ACTIONRESTRICT

2.54 suppliers

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:2
  • 数据大小:16 KB
  • 索引大小:32 KB
  • 自增值:93
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:—

字段

序号字段类型可空默认值额外字符集排序规则注释
1idbigint unsignedPRIauto_increment
2namevarchar(120)utf8mb4utf8mb4_unicode_ci
3codevarchar(50)UNIutf8mb4utf8mb4_unicode_ci
4contact_namevarchar(60)NULLutf8mb4utf8mb4_unicode_ci
5contact_phonevarchar(30)NULLutf8mb4utf8mb4_unicode_ci
6contact_emailvarchar(100)NULLutf8mb4utf8mb4_unicode_ci
7websitevarchar(255)NULLutf8mb4utf8mb4_unicode_ci
8statustinyint1MUL0=停用 1=启用
9sort_orderint0
10notestextNULLutf8mb4utf8mb4_unicode_ci
11created_attimestampNULL
12updated_attimestampNULL

索引

索引名唯一类型字段基数注释
PRIMARYBTREEid2
suppliers_code_uniqueBTREEcode2
suppliers_status_sort_order_indexBTREEstatus, sort_order1

外键约束

无数据库级外键约束。

2.55 third_product_groups

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:26
  • 数据大小:16 KB
  • 索引大小:32 KB
  • 自增值:49
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:—

字段

序号字段类型可空默认值额外字符集排序规则注释
1idbigint unsignedPRIauto_increment
2second_product_group_idbigint unsignedMUL
3namevarchar(100)utf8mb4utf8mb4_unicode_ci
4slugvarchar(100)NULLutf8mb4utf8mb4_unicode_ci
5descriptionvarchar(255)NULLutf8mb4utf8mb4_unicode_ci
6sort_orderint0
7is_visibletinyint unsigned1
8created_attimestampNULL
9updated_attimestampNULL

索引

索引名唯一类型字段基数注释
idx_third_second_visible_sortBTREEsecond_product_group_id, is_visible, sort_order19
PRIMARYBTREEid26
uq_third_second_slugBTREEsecond_product_group_id, slug26

外键约束

约束名字段引用表引用字段更新规则删除规则
fk_third_second_groupsecond_product_group_idsecond_product_groupsidNO ACTIONRESTRICT

2.56 ticket_replies

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:177
  • 数据大小:48 KB
  • 索引大小:32 KB
  • 自增值:178
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:—

字段

序号字段类型可空默认值额外字符集排序规则注释
1idbigint unsignedPRIauto_increment
2ticket_idbigint unsignedMUL
3user_idbigint unsigned
4contenttextutf8mb4utf8mb4_unicode_ci
5is_stafftinyint0
6attachmentsjsonNULL
7quote_reply_idbigint unsignedNULLMUL
8recalled_attimestampNULL
9created_attimestampCURRENT_TIMESTAMPDEFAULT_GENERATED

索引

索引名唯一类型字段基数注释
idx_stage2_ticket_replies_quote_reply_idBTREEquote_reply_id2
PRIMARYBTREEid177
ticket_replies_ticket_created_id_idxBTREEticket_id, created_at, id177

外键约束

约束名字段引用表引用字段更新规则删除规则
fk_stage2_ticket_replies_quote_reply_idquote_reply_idticket_repliesidNO ACTIONSET NULL
fk_ticket_replies_ticket_idticket_idticketsidNO ACTIONCASCADE

2.57 tickets

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:69
  • 数据大小:16 KB
  • 索引大小:96 KB
  • 自增值:76
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:—

字段

序号字段类型可空默认值额外字符集排序规则注释
1idbigint unsignedPRIauto_increment
2user_idbigint unsignedMUL
3departmentvarchar(30)supportutf8mb4utf8mb4_unicode_ci
4subjectvarchar(200)utf8mb4utf8mb4_unicode_ci
5prioritytinyint11=低 2=中 3=高 4=紧急
6statustinyint0MUL0=开启 1=客户回复 2=员工回复 3=已关闭
7service_idbigint unsignedNULLMUL
8assignee_idbigint unsignedNULLMUL
9created_attimestampNULL
10updated_attimestampNULL
11close_reasonvarchar(20)NULLutf8mb4utf8mb4_unicode_ciadmin, client, auto

索引

索引名唯一类型字段基数注释
idx_stage2_tickets_assignee_idBTREEassignee_id2
PRIMARYBTREEid69
tickets_service_id_idxBTREEservice_id32
tickets_status_updated_at_idxBTREEstatus, updated_at67
tickets_user_status_updated_at_idxBTREEuser_id, status, updated_at69
tickets_user_updated_at_idxBTREEuser_id, updated_at, id69

外键约束

约束名字段引用表引用字段更新规则删除规则
fk_stage2_tickets_assignee_idassignee_idadmin_usersidNO ACTIONSET NULL
fk_stage2_tickets_service_idservice_idservicesidNO ACTIONSET NULL
fk_tickets_user_iduser_idusersidNO ACTIONRESTRICT

2.58 user_accounts

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:411
  • 数据大小:64 KB
  • 索引大小:0 B
  • 自增值:—
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:用户账户余额源表,集中承载现金余额、授信和推荐奖励余额

字段

序号字段类型可空默认值额外字符集排序规则注释
1user_idbigint unsignedPRI用户ID,同时作为账户主键
2cash_balancedecimal(12,2)0.00现金余额
3credit_limitdecimal(12,2)0.00授信额度
4referral_frozen_balancedecimal(12,2)0.00冻结中的推荐奖励余额
5referral_available_balancedecimal(12,2)0.00可用推荐奖励余额
6referral_pending_withdrawal_balancedecimal(12,2)0.00提现审核中的推荐奖励余额
7referral_withdrawn_balancedecimal(12,2)0.00已提现推荐奖励累计金额
8versionint unsigned0乐观锁版本号
9created_attimestampNULL创建时间
10updated_attimestampNULL更新时间

索引

索引名唯一类型字段基数注释
PRIMARYBTREEuser_id411

外键约束

约束名字段引用表引用字段更新规则删除规则
fk_user_accounts_user_iduser_idusersidNO ACTIONRESTRICT

2.59 user_coupons

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:25
  • 数据大小:16 KB
  • 索引大小:64 KB
  • 自增值:90
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:—

字段

序号字段类型可空默认值额外字符集排序规则注释
1idbigint unsignedPRIauto_increment
2uidvarchar(32)NULLUNIutf8mb4utf8mb4_unicode_ci
3coupon_idbigint unsignedMUL
4user_idbigint unsignedMUL
5receive_typevarchar(20)claimutf8mb4utf8mb4_unicode_ci
6statustinyint1优惠券状态:1=持有 2=已使用 3=已回收
7claimed_attimestampNULL
8used_attimestampNULL
9revoked_attimestampNULL
10reserved_untiltimestampNULL
11granted_attimestampNULL
12last_used_attimestampNULL
13remarkvarchar(255)NULLutf8mb4utf8mb4_unicode_ci
14operatorvarchar(100)NULLutf8mb4utf8mb4_unicode_ci
15trace_idvarchar(100)NULLutf8mb4utf8mb4_unicode_ci
16created_attimestampNULL
17updated_attimestampNULL

索引

索引名唯一类型字段基数注释
PRIMARYBTREEid25
user_coupons_coupon_status_idxBTREEcoupon_id, status4
user_coupons_coupon_user_uniqueBTREEcoupon_id, user_id25
user_coupons_uid_uniqueBTREEuid25
user_coupons_user_status_idxBTREEuser_id, status23

外键约束

约束名字段引用表引用字段更新规则删除规则
fk_stage2_user_coupons_user_iduser_idusersidNO ACTIONRESTRICT
fk_user_coupons_coupon_idcoupon_idcouponsidNO ACTIONRESTRICT

2.60 user_notifications

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:108
  • 数据大小:64 KB
  • 索引大小:48 KB
  • 自增值:158
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:—

字段

序号字段类型可空默认值额外字符集排序规则注释
1idbigint unsignedPRIauto_increment
2user_idbigint unsignedMUL
3typevarchar(50)MULutf8mb4utf8mb4_unicode_ci消息类型:order_paid/service_renew_reminder/service_expire_reminder 等
4titlevarchar(191)utf8mb4utf8mb4_unicode_ci
5contenttextNULLutf8mb4utf8mb4_unicode_ci
6linkvarchar(255)NULLutf8mb4utf8mb4_unicode_ci点击跳转的前端路由
7datajsonNULL附加业务数据
8read_attimestampNULL
9created_attimestampNULL
10updated_attimestampNULL

索引

索引名唯一类型字段基数注释
PRIMARYBTREEid108
user_notifications_type_indexBTREEtype6
user_notifications_user_id_created_at_indexBTREEuser_id, created_at107
user_notifications_user_id_read_at_indexBTREEuser_id, read_at58

外键约束

约束名字段引用表引用字段更新规则删除规则
fk_stage2_user_notifications_user_iduser_idusersidNO ACTIONCASCADE

2.61 users

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:482
  • 数据大小:128 KB
  • 索引大小:176 KB
  • 自增值:484
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:—

字段

序号字段类型可空默认值额外字符集排序规则注释
1idbigint unsignedPRIauto_increment
2emailvarchar(100)NULLUNIutf8mb4utf8mb4_unicode_ci
3passwordvarchar(255)utf8mb4utf8mb4_unicode_ci
4nicknamevarchar(50)空字符串utf8mb4utf8mb4_unicode_ci
5phonevarchar(20)NULLUNIutf8mb4utf8mb4_unicode_ci
6companyvarchar(100)空字符串utf8mb4utf8mb4_unicode_ci
7qqvarchar(30)空字符串utf8mb4utf8mb4_unicode_ci
8alipay_real_namevarchar(80)空字符串utf8mb4utf8mb4_unicode_ci
9alipay_accountvarchar(20)空字符串utf8mb4utf8mb4_unicode_ci
10referral_codevarchar(24)NULLUNIutf8mb4utf8mb4_unicode_ci
11referrer_user_idbigint unsignedNULLMUL
12member_level_idbigint unsignedNULLMUL
13total_sales_amountdecimal(12,2)0.00
14referred_attimestampNULL
15statustinyint1MUL0=禁用 1=正常
16login_email_alerttinyint1登录邮件提醒 0关闭 1开启
17login_notifytinyint(1)1账号登录提醒 0关闭 1开启
18login_location_alerttinyint(1)1异地登录提醒 0关闭 1开启
19password_change_alerttinyint(1)1密码变更提醒 0关闭 1开启
20phone_change_alerttinyint(1)1手机号变更提醒 0关闭 1开启
21email_change_alerttinyint(1)1邮箱变更提醒 0关闭 1开启
22marketing_alerttinyint(1)0营销提醒接收 0关闭 1开启
23is_verifiedtinyint0MUL0=未认证 1=已认证
24real_namevarchar(50)空字符串utf8mb4utf8mb4_unicode_ci真实姓名
25id_cardvarchar(512)空字符串utf8mb4utf8mb4_unicode_ci
26verification_statustinyint0MUL0=未认证 1=认证中 2=已认证 3=认证失败
27verification_messagevarchar(255)空字符串utf8mb4utf8mb4_unicode_ci实名认证状态描述
28verification_certify_idvarchar(100)NULLMULutf8mb4utf8mb4_unicode_ci实名认证平台 certify_id
29verified_attimestampNULL实名认证通过时间
30last_login_ipvarchar(45)NULLutf8mb4utf8mb4_unicode_ci
31last_login_attimestampNULL
32admin_notetextNULLutf8mb4utf8mb4_unicode_ci
33created_attimestampNULLMUL
34updated_attimestampNULL
35deleted_attimestampNULL

索引

索引名唯一类型字段基数注释
PRIMARYBTREEid482
users_created_at_idxBTREEcreated_at482
users_email_uniqueBTREEemail329
users_member_level_id_indexBTREEmember_level_id2
users_phone_uniqueBTREEphone180
users_referral_code_uniqueBTREEreferral_code151
users_referrer_user_id_indexBTREEreferrer_user_id5
users_status_id_idxBTREEstatus, id482
users_verification_certify_id_idxBTREEverification_certify_id113
users_verification_mix_idxBTREEis_verified, verification_status, id482
users_verification_status_id_idxBTREEverification_status, id482

外键约束

约束名字段引用表引用字段更新规则删除规则
fk_stage2_users_member_level_idmember_level_idmember_levelsidNO ACTIONSET NULL
fk_stage2_users_referrer_user_idreferrer_user_idusersidNO ACTIONSET NULL

2.62 verification_histories

  • 类型:BASE TABLE
  • 引擎:InnoDB
  • 估算行数:97
  • 数据大小:64 KB
  • 索引大小:48 KB
  • 自增值:103
  • 排序规则:utf8mb4_unicode_ci
  • 表注释:—

字段

序号字段类型可空默认值额外字符集排序规则注释
1idbigint unsignedPRIauto_increment
2user_idbigint unsignedMUL
3real_namevarchar(50)空字符串utf8mb4utf8mb4_unicode_ci
4id_cardvarchar(512)空字符串utf8mb4utf8mb4_unicode_ci
5verification_statustinyint11=认证中 2=已认证 3=认证失败
6verification_messagevarchar(255)空字符串utf8mb4utf8mb4_unicode_ci
7verification_certify_idvarchar(100)NULLMULutf8mb4utf8mb4_unicode_ci
8verification_biz_codevarchar(30)FACEutf8mb4utf8mb4_unicode_ci
9verification_typevarchar(20)personalutf8mb4utf8mb4_unicode_ci
10submitted_attimestampCURRENT_TIMESTAMPDEFAULT_GENERATED
11completed_attimestampNULL
12created_attimestampNULL
13updated_attimestampNULL

索引

索引名唯一类型字段基数注释
PRIMARYBTREEid97
verification_histories_user_id_id_idxBTREEuser_id, id97
verification_histories_user_id_submitted_at_indexBTREEuser_id, submitted_at64
verification_histories_verification_certify_id_indexBTREEverification_certify_id93

外键约束

约束名字段引用表引用字段更新规则删除规则
fk_stage2_verification_histories_user_iduser_idusersidNO ACTIONRESTRICT

基于 AGPL-3.0-or-later 发布