143 lines
7.9 KiB
Markdown
143 lines
7.9 KiB
Markdown
# xk-api 模型分析
|
||
|
||
模型分为两大类:**旧模型**(`Models/old/`,对应 `z_o_xk` 库的 `yii_*` 表)和**新模型**(`Models/new/`,对应 `z_xk` 库的 `xk_*` 表)。
|
||
|
||
## 新模型 (z_xk 库)
|
||
|
||
### 管理后台 (admin/)
|
||
|
||
| 模型 | 表名 | 说明 |
|
||
|------|------|------|
|
||
| `AdminModel` | `xk_admin` | 管理员用户 |
|
||
| `AdminNoticeModel` | `xk_admin_notice` | 管理员消息通知 |
|
||
| `AdminNoticeRelationsModel` | `xk_admin_notice_relations` | 用户通知关联 |
|
||
| `AdminSalespersonModel` | `xk_admin_salesperson` | 管理员-推广员关联 |
|
||
| `AccountModel` | `xk_account_balance` | 账户余额 |
|
||
| `AccountBalanceChangeRecordModel` | `xk_account_balance_change_record` | 余额变更记录 |
|
||
| `CardModel` | `xk_card` | 用户银行卡 |
|
||
| `MenuModel` | `xk_menu` | 菜单定义 |
|
||
| `NoticeModel` | `xk_notice` | 公告 |
|
||
| `PlatformModel` | `xk_platform` | 平台信息 |
|
||
| `QueueJobModel` | `xk_queue_job` | 业务队列任务 |
|
||
| `RoleModel` | `xk_role` | 角色定义 |
|
||
| `RoleMenuRelationsModel` | `xk_role_menu_relations` | 角色-菜单绑定 |
|
||
| `RoleQuickNavModel` | `xk_role_quick_nav` | 角色快捷导航 |
|
||
| `SupplierModel` | `xk_supplier` | 供应商 |
|
||
|
||
### 财务 (finance/)
|
||
|
||
| 模型 | 表名 | 说明 |
|
||
|------|------|------|
|
||
| `AccountAbleChangeLogModel` | `xk_account_able_change_log` | 可提现金额变更日志 |
|
||
| `MonthlyPaymentModel` | `xk_monthly_payment` | 月结账单 |
|
||
| `MonthlyPaymentSettlementModel` | `xk_monthly_payment_settlement` | 月结结算记录 |
|
||
|
||
### 销售 (salesperson/)
|
||
|
||
| 模型 | 表名 | 说明 |
|
||
|------|------|------|
|
||
| `ClinicSalespersonModel` | `xk_clinic_salesperson` | 门店推广员 |
|
||
| `SalespersonCommissionRecordModel` | `xk_salesperson_commission_record` | 佣金记录 |
|
||
| `SalespersonCommissionTemplateModel` | `xk_salesperson_commission_template` | 佣金模板 |
|
||
| `SalespersonCommissionTemplateItemModel` | `xk_salesperson_commission_template_item` | 佣金模板明细 |
|
||
| `SalespersonDrugCommissionModel` | `xk_salesperson_drug_commission` | 药品佣金配置 |
|
||
| `SalespersonQrCodeModel` | `xk_salesperson_qr_code` | 推广员二维码 |
|
||
| `SalespersonSettlementModel` | `xk_salesperson_settlement` | 推广员结算单 |
|
||
| `SalespersonSettlementRecordModel` | `xk_salesperson_settlement_record` | 结算-佣金关联 |
|
||
| `SalespersonStoreConfigModel` | `xk_salesperson_store_config` | 推广员门店配置 |
|
||
| `UserSalespersonModel` | `xk_user_salesperson` | 用户-推广员绑定 |
|
||
|
||
### 特色处方 (special_prescription/)
|
||
|
||
| 模型 | 表名 | 说明 |
|
||
|------|------|------|
|
||
| `SpecialPrescriptionModel` | `xk_special_prescription` | 特色处方主表 |
|
||
| `SpecialPrescriptionCategoryModel` | `xk_special_prescription_category` | 处方分类 |
|
||
| `SpecialPrescriptionSkuModel` | `xk_special_prescription_sku` | SKU 剂量规格 |
|
||
| `SpecialPrescriptionDrugPriceModel` | `xk_special_prescription_drug_price` | 药品分摊价格 |
|
||
| `SpecialPrescriptionOrderModel` | `xk_special_prescription_order` | 处方订单快照 |
|
||
| `SpecialPrescriptionPatientRecordModel` | `xk_special_prescription_patient_record` | 患者处方记录 |
|
||
| `SpecialPrescriptionIntroductionImageModel` | `xk_special_prescription_introduction_images` | 介绍图片 |
|
||
|
||
### 系统 (system/)
|
||
|
||
| 模型 | 表名 | 说明 |
|
||
|------|------|------|
|
||
| `StoreInputModel` | `xk_store_input` | 门店预填表单 |
|
||
| `StoreInputContractModel` | `xk_store_input_contract` | 门店合同文件 |
|
||
| `StoreInputNavModel` | `xk_store_input_nav` | 门店轮播图 |
|
||
| `DoctorInputModel` | `xk_doctor_input` | 医生预填表单 |
|
||
| `DoctorInputStoreModel` | `xk_doctor_input_store` | 医生-门店绑定 |
|
||
| `StoreBankCardReportModel` | `xk_store_bank_card_report` | 门店银行卡上报 |
|
||
| `SpreadsheetTableConfigModel` | `xk_spreadsheet_table_config` | 画布表格配置 |
|
||
| `SpreadsheetEditHistoryModel` | `xk_spreadsheet_edit_history` | 画布编辑历史 |
|
||
| `SpreadsheetFormulaModel` | `xk_spreadsheet_formula` | 画布公式库 |
|
||
|
||
### 监管日志 (log/)
|
||
|
||
| 模型 | 表名 | 说明 |
|
||
|------|------|------|
|
||
| `HyTransitBatchModel` | `xk_hy_transit_batch` | 监管同步批次 |
|
||
| `HyTransitRecordModel` | `xk_hy_transit_record` | 监管拉取/回调记录 |
|
||
| `ApiOpLogModel` | `xk_api_op_log` | 新 API 操作日志 |
|
||
| `ErrorLogModel` | `xk_error_log` | 错误日志 |
|
||
| `ProductOrderPriceAdjustLogModel` | `xk_product_order_price_adjust_log` | 订单改价日志 |
|
||
| `StoreDrugUpdateLogModel` | `xk_store_drug_update_log` | 药品价格变更日志 |
|
||
| `SyncChinaOrderLogModel` | `xk_sync_china_order_log` | ERP 同步日志 |
|
||
|
||
### 其他
|
||
|
||
| 模型 | 表名 | 说明 |
|
||
|------|------|------|
|
||
| `ChatMessageModel` | `xk_chat_messages` | 聊天消息 |
|
||
| `ChatRoomModel` | `xk_chat_room` | 聊天房间 |
|
||
| `SystemConfigModel` | `xk_system_config` | 系统配置 |
|
||
| `FileModel` | `xk_file` | 文件管理 |
|
||
| `FileGroupModel` | `xk_file_group` | 文件分组 |
|
||
| `FileGroupRelModel` | `xk_file_group_rel` | 文件-分组关联 |
|
||
| `FileTypeModel` | `xk_file_type` | 文件类型 |
|
||
| `HomeZoneModel` | `xk_home_zones` | 首页分区 |
|
||
| `PlatformQualificationsModel` | `xk_platform_qualifications` | 平台资质 |
|
||
| `TransferAssistantConfigModel` | `xk_transfer_assistant_config` | 转诊助手配置 |
|
||
| `TransferQuestionModel` | `xk_transfer_question` | 转诊问题模板 |
|
||
| `TransferPrescriptionQuestionModel` | `xk_transfer_prescription_question` | 转诊处方问答 |
|
||
| `RegisterInfoModel` | `xk_register_info` | 挂号就诊信息 |
|
||
| `RegisterInfoDrugModel` | `xk_register_info_drug` | 挂号关联药品 |
|
||
| `UserPatientGuardianModel` | `xk_user_patient_guardian` | 患者监护人信息 |
|
||
| `SubjectsModel` | `xk_subjects` | 医学学科 |
|
||
| `DoctorOrderModel` | `xk_doctor_order` | 医嘱 |
|
||
| `DoctorQuickReplyModel` | `xk_doctor_quick_reply` | 医生快捷回复 |
|
||
| `DoctorWxPhoneOpenidModel` | `xk_doctor_wx_phone_openid` | 医生手机-微信绑定 |
|
||
| `DrugIntroductionImageModel` | `xk_drug_introduction_images` | 药品介绍图片 |
|
||
| `StoreSubscribeModel` | `xk_store_subscribe` | 门店价格订阅 |
|
||
| `TraditionalChineseMedicineDiseasesModel` | `xk_traditional_chinese_medicine_diseases` | 中医疾病库 |
|
||
| `TraditionalChineseMedicineMethodModel` | `xk_traditional_chinese_medicine_method` | 中医治法库 |
|
||
| `TraditionalChineseMedicineSyndromeModel` | `xk_traditional_chinese_medicine_syndrome` | 中医证候库 |
|
||
| `PrescriptionDiseaseModel` | `xk_prescription_disease` | 处方-疾病关联 |
|
||
| `PrescriptionMethodModel` | `xk_prescription_method` | 处方-治法关联 |
|
||
| `PrescriptionSyndromeModel` | `xk_prescription_syndrome` | 处方-证候关联 |
|
||
| `ProductOrderExportSchemeModel` | `xk_product_order_export_scheme` | 订单导出方案 |
|
||
|
||
## 旧模型 (z_o_xk 库)
|
||
|
||
旧模型按业务域组织在 `Models/old/` 下:
|
||
|
||
| 目录 | 模型数 | 主要表 |
|
||
|------|--------|--------|
|
||
| `drug/` | 17 | `yii_drug`, `yii_drug_store_relations`, `yii_drug_categories` 等 |
|
||
| `order/` | 15 | `yii_product_order`, `yii_product_order_items`, `yii_register` 等 |
|
||
| `prescription/` | 8 | `yii_prescription`, `yii_prescription_chinese/west/granular` 等 |
|
||
| `doctor/` | 21 | `yii_doctor_info`, `yii_doctor_service`, `yii_store_doctor` 等 |
|
||
| `user/` | 9 | `yii_user`, `yii_user_patient`, `yii_service_user` 等 |
|
||
| `finacne/` | 7 | `yii_ledger`, `yii_cash_account`, `yii_fund_water` 等 |
|
||
| `config/` | 24 | `yii_admin`, `yii_role`, `yii_config`, `yii_menu` 等 |
|
||
| `store/` | 3 | `yii_store`, `yii_store_doctor`, `yii_store_user` |
|
||
| `recipe/` | 6 | `yii_chinese_recipe`, `yii_west_recipe`, `yii_granular_recipe` 等 |
|
||
| `hospital/` | 5 | `yii_hospital`, `yii_hospital_yard`, `yii_department` 等 |
|
||
| `im/` | 4 | `yii_im_message`, `yii_im_message_session` 等 |
|
||
| `log/` | 8 | `yii_op_log`, `yii_order_log`, `yii_prescription_log` 等 |
|
||
| `patient/` | 5 | `yii_user_patient_case`, `yii_patient_visit_record` 等 |
|
||
| `physical/` | 3 | `yii_physical_package`, `yii_physical_reserve` 等 |
|
||
| `queue/` | 3 | `yii_queue`, `yii_queue4`, `yii_failed_jobs` |
|
||
| `other/` | 12 | `yii_disease`, `yii_department`, `yii_region` 等 |
|