Files
xk-docs/docs/database/z-xk.md
2026-07-08 15:04:42 +08:00

7.3 KiB

z_xk 新库

z_xk 是 XK 系统的新数据库,包含 67 张表,全部在当前系统中活跃使用。

管理后台 (14张表)

表名 说明 关键字段
xk_admin 管理员用户 login_account, password, role_id, store_id, supplier_id
xk_admin_notice 管理员消息 title, content, type, status
xk_admin_notice_relations 用户通知关联 notice_id, user_id, status
xk_admin_salesperson 管理员-推广员关联 admin_id, salesperson_id, store_id
xk_card 用户银行卡 bank_user_name, bank_card, bank_name
xk_menu 菜单定义 title, icon, path, pid, sort
xk_notice 公告 title, content, status
xk_platform 平台信息 name, logo, introduce
xk_queue_job 业务队列任务 title, job_name, status
xk_role 角色定义 user_type, name, value, pid
xk_role_menu_relations 角色-菜单绑定 role_id, menu_id
xk_role_quick_nav 角色快捷导航 role_id, menu_id, title, url
xk_supplier 供应商 name, logo, business_license
xk_platform_qualifications 平台资质 各类许可证图片, store_id

财务 (3张表)

表名 说明 关键字段
xk_account_balance 账户余额 user_id, type, total, balance, frozen, withdrawn
xk_account_balance_change_record 余额变更记录 user_id, order_id, amount
xk_account_able_change_log 可提现金额变更日志 user_id, user_type, before_amount, after_amount, source_type

销售 (11张表)

表名 说明 关键字段
xk_clinic_salesperson 门店推广员 phone, nick_name, split, split_type
xk_salesperson_commission_record 佣金记录 salesperson_id, drug_id, commission_amount, split_type
xk_salesperson_commission_template 佣金模板 store_id, name
xk_salesperson_commission_template_item 佣金模板明细 template_id, drug_id, commission
xk_salesperson_drug_commission 药品佣金配置 salesperson_id, drug_id, commission
xk_salesperson_qr_code 推广员二维码 salesperson_id, qr_code, status
xk_salesperson_settlement 推广员结算单 settlement_no, amount, period_start, period_end
xk_salesperson_settlement_record 结算-佣金关联 settlement_id, commission_record_id
xk_salesperson_store_config 推广员门店配置 store_id, see_price
xk_user_salesperson 用户-推广员绑定 user_id, salesperson_id, type, status
xk_admin_salesperson 管理员-推广员关联 admin_id, salesperson_id

特色处方 (7张表)

表名 说明 关键字段
xk_special_prescription 特色处方主表 name, category_id, price_per_dose, status, store_id
xk_special_prescription_category 处方分类 name, sort, status
xk_special_prescription_sku SKU 剂量规格 sku_name, dose_count, buy_price, sale_price
xk_special_prescription_drug_price 药品分摊价格 drug_id, buy_price, sell_price
xk_special_prescription_order 处方订单快照 product_order_id, dose_count, sku_sale_price
xk_special_prescription_patient_record 患者处方记录 user_id, dose_count, status
xk_special_prescription_introduction_images 介绍图片 image_url, sort

系统 (9张表)

表名 说明 关键字段
xk_store_input 门店预填表单 name, type, province_id, city_id, status
xk_store_input_contract 门店合同文件 file_url, file_name
xk_store_input_nav 门店轮播图 pic, sort
xk_doctor_input 医生预填表单 name, mobile, title_id, type, status
xk_doctor_input_store 医生-门店绑定 doctor_input_id, store_id
xk_store_bank_card_report 门店银行卡上报 bank_card, report_status, epl_state
xk_spreadsheet_table_config 画布表格配置 table_name, sheet_key, config
xk_spreadsheet_edit_history 画布编辑历史 table_name, action, before_snapshot, after_snapshot
xk_spreadsheet_formula 画布公式库 code, name, expression_template

监管日志 (8张表)

表名 说明 关键字段
xk_hy_transit_batch 监管同步批次 anchor_date, step, pull_status, total_count
xk_hy_transit_record 监管拉取/回调记录 biz_key, payload_json, pull_status, push_status, callback_status
xk_api_op_log 新 API 操作日志 url, method, param, result, platform_type
xk_error_log 错误日志 type, content
xk_product_order_price_adjust_log 订单改价日志 old_price, new_price, adjust_amount
xk_store_drug_update_log 药品价格变更日志 old_buy, new_buy, old_price, new_price
xk_sync_china_order_log ERP 同步日志 order_id, content, is_success
xk_spreadsheet_edit_history 画布编辑历史 action, before_snapshot, after_snapshot

其他 (15张表)

表名 说明 关键字段
xk_chat_messages 聊天消息 room_id, sender_user_id, message_type, message_content
xk_chat_room 聊天房间 sender_user_id, receiver_user_id
xk_system_config 系统配置 config_key, config_value, value_type
xk_file 文件管理 url, original_name, file_size, type
xk_file_group 文件分组 name, sort
xk_file_group_rel 文件-分组关联 file_id, group_id
xk_file_type 文件类型 name, value, suffix
xk_home_zones 首页分区 title, type, store_id
xk_transfer_assistant_config 转诊助手配置 name, avatar
xk_transfer_question 转诊问题模板 question, answers, type
xk_transfer_prescription_question 转诊处方问答 transfer_prescription_id, question_id, answer
xk_register_info 挂号就诊信息 register_id, user_id, drug_id, type
xk_register_info_drug 挂号关联药品 register_info_id, drug_id, quantity
xk_user_patient_guardian 患者监护人 guardian_name, guardian_id_card, guardian_mobile
xk_subjects 医学学科 name, code, pid
xk_doctor_order 医嘱 name
xk_doctor_quick_reply 医生快捷回复 doctor_id, content, sort_order
xk_doctor_wx_phone_openid 医生手机-微信绑定 phone, openid
xk_drug_introduction_images 药品介绍图片 drug_id, image_url
xk_store_subscribe 门店价格订阅 store_id, status
xk_traditional_chinese_medicine_diseases 中医疾病库 code, name
xk_traditional_chinese_medicine_method 中医治法库 code, name
xk_traditional_chinese_medicine_syndrome 中医证候库 code, name
xk_prescription_disease 处方-疾病关联 prescription_id, disease_id
xk_prescription_method 处方-治法关联 prescription_id, method_id
xk_prescription_syndrome 处方-证候关联 prescription_id, syndrome_id
xk_monthly_payment 月结账单 store_id, amount, status
xk_monthly_payment_settlement 月结结算记录 store_id, amount
xk_product_order_export_scheme 订单导出方案 admin_id, config
xk_monthly_payment 月结账单 store_id, order_id, amount, status
xk_monthly_payment_settlement 月结结算记录 url, store_id, amount