Skip to content

Data Model And API Map ​

Page Guide ​

Use CasesFor quickly finding relationships between business tables, APIs, and pages during secondary development, troubleshooting, SQL upgrades, and API integration.
Source LocationSQL is located at `springboot/sql`; the current major-version initialization script is `fastbee-v2.9.0.sql`.
Database ScopeIncludes the MySQL main database, multi-database adaptation scripts, TDengine/IoTDB time-series data, and AI initialization scripts.
How To UseFind the table name prefix by business module, then trace back to the API, frontend page, and secondary-development notes.

1. Table Name Prefixes ​

PrefixBusiness ScopeExamples
iot_IoT core businessProducts, devices, thing models, rules, alerts, work orders, firmware
scene_Scene modelsScenes, variables, devices, tags
sip_GB28181 videoSIP configuration, devices, channels
common_Common media channelsURL stream pulling, channel binding
media_Streaming media serviceMedia server configuration
notify_Notification serviceChannels, templates, logs
ai_AI capabilitiesModels, knowledge base, conversations, protocol adaptation
report_Report centerReports, rules, records
sys_System administrationUsers, roles, menus, dictionaries, configuration
oauth_OAuth/SSOClients, tokens, authorization codes
oss_File storageOSS configuration, file details
qrtz_Scheduled tasksQuartz task tables

2. Core IoT Tables ​

BusinessMain TablesAPI PrefixFrontend Entry
Productiot_product, iot_category, iot_product_authorize, iot_product_ext_param/iot/productvue3/src/views/iot/product
Thing Modeliot_things_model, iot_things_model_tag, iot_things_model_template/iot/model, /iot/templateProduct detail, thing model pages
Deviceiot_device, iot_device_user, iot_device_share, iot_device_group/iot/device, /iot/deviceUservue3/src/views/iot/device
Logsiot_device_log, iot_event_log, iot_function_log/iot/record, /iot/messageDevice detail log tab
OTAiot_firmware, iot_firmware_task, iot_firmware_task_detail/iot/firmwarevue3/src/views/iot/firmware
Ruleiot_rule_el, iot_rule_trigger, iot_rule_log/iot/ruletrigger, /rule/chainvue3/src/views/ruleengine
Bridgingiot_bridge, iot_script_bridge/iot/bridgeRule and bridging pages
Alertiot_alert, iot_alert_log, iot_alert_scene, iot_alert_notify_template/iot/alertvue3/src/views/iot/alert
Work Orders And Maintenanceiot_work_order, iot_device_maintenance/iot/workOrder, /iot/maintenanceWork order and maintenance pages
IoT Cardiot_card, iot_card_platformCard management APIsvue3/src/views/iot/card

3. Device Access And Protocol Tables ​

BusinessMain TablesNotes
Protocol managementiot_protocolPlatform protocol configuration and protocol scripts
Modbus configurationiot_modbus_config, iot_modbus_params, iot_modbus_jobDevice-level registers, parameters, and polling jobs
Product Modbusiot_product_modbus_job, iot_product_sub_gatewayProduct-level gateways, sub-products, and polling configuration
Gateway sub-devicesiot_sub_gatewayGateway and sub-device relationships
Variable templatesiot_var_temp, iot_var_temp_salveVariable templates and slave configuration
Simulation logsiot_simulate_logSimulated device or debugging records

4. Video And Visualization Tables ​

BusinessMain TablesAPI Prefix
SIP configurationsip_config/sip/sipconfig
SIP devicessip_device/sip/device
SIP channelssip_device_channel, iot_sip_relation/iot/channel
URL channelscommon_channel/iot/channel
Media serversmedia_server/mediaserver
Visualization projectsiot_goview_project, iot_goview_project_data/goview/project, /goview/projectData

5. Scene, Report, And Notification Tables ​

BusinessMain TablesAPI Prefix
Scene modelsscene_model, scene_model_data, scene_model_device, scene_model_tag/scene/model, /scene/modelData
Scene tag pointsscene_tag_pointsScene tags and points
Reportsreport, report_records, report_rule, report_rule_dataReport-related APIs
Notificationsnotify_channel, notify_template, notify_log/notify/channel, /notify/template, /notify/log

6. AI Tables ​

BusinessMain TablesAPI Prefix
Model providersai_provider/ai/provider
Model configurationai_model/ai/model
Conversationsai_chat_session, ai_chat_message/ai/chat, /ai/chatRecord
Knowledge baseai_knowledge_base, ai_knowledge_document, ai_knowledge_version/ai/knowledge
Invocation logsai_invoke_log, ai_tool_call_logAI invocation auditing
File assetsai_file_assetKnowledge base file assets
Protocol adaptationai_protocol_adaptation_task, ai_protocol_adaptation_artifact, ai_protocol_generation_record/ai/protocol/adaptation

7. System And Plug-in Tables ​

BusinessMain TablesAPI Prefix
Users and rolessys_user, sys_role, sys_menu, sys_dept/system/user, /system/role, /system/menu
Dictionary configurationsys_dict_type, sys_dict_data, translation tables/system/dict/*
Login and operation logssys_logininfor, sys_oper_log/monitor/*
Scheduled taskssys_job, sys_job_log, qrtz_*/monitor/job
OAuth/SSOoauth_client_details, oauth_access_token, oauth_refresh_token/oauth2/*, /iot/clientDetails
OSSoss_config, oss_detail/oss/config, /oss/detail
Code generatorgen_table, gen_table_column/tool/gen

8. Upgrade Script Strategy ​

ScenarioRecommendation
New deploymentUse the current major-version initialization SQL
Version upgradeExecute the upgrade scripts in version order
Multiple databasesUse the Dameng, KingbaseES, Oracle, Postgres, or SQL Server scripts in the corresponding directory
AI initializationConfirm whether the AI tables and initialization data have been merged into the main script; run the AI initialization script if necessary
Time-series databaseTDengine/IoTDB use independent initialization scripts and runtime configuration
Before go-liveBack up the database, record the current version, and rehearse the upgrade in a test environment first

9. Secondary-Development Notes ​

  • When adding a business field, update the Domain, Mapper, VO/DTO, Controller, frontend form, and SQL together.
  • When multi-database support is involved, do not change only the MySQL script.
  • Do not write all high-frequency device data directly into MySQL; prefer the time-series data link.
  • When tenant isolation is involved, confirm the create_by, organization, and role data scope and query conditions.
  • When modifying core tables such as thing model, device, and rule, consider cache refresh.
  • Before deleting data, confirm whether there are related devices, rules, scenes, schematics, alerts, work orders, and historical data.

FastBee | fastbee.cn