chore: initial snapshot of 2meet-data-optimizer-latepoint-addon v0.1.0
Baseline before backporting wp-data-optimizer v3.0.1-v3.4.6. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TbG1keQQ7XBa7qMQY16KCY
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
# 2meet Data Optimizer — LatePoint AddOn
|
||||
|
||||
> 為 **LatePoint** 預約系統提供 booking 索引同步(最小 AddOn,~151 行)。
|
||||
|
||||
---
|
||||
|
||||
## What it does
|
||||
|
||||
監聽 4 個 LatePoint hook,將 booking 摘要寫入 `wp_hpct_latepoint_idx` 自訂索引表,加速跨站查詢與報表:
|
||||
|
||||
| LP Hook | 動作 |
|
||||
|---|---|
|
||||
| `latepoint_booking_created` | INSERT 索引 |
|
||||
| `latepoint_booking_updated` | UPDATE 索引 |
|
||||
| `latepoint_after_booking_save` | UPSERT 索引 |
|
||||
| `latepoint_booking_deleted` | DELETE 索引 |
|
||||
|
||||
索引欄位:`booking_id`, `agent_id`, `service_id`, `customer_id`, `status`, `start_date`, `end_date`, `start_time`, `end_time`, `price`, `created_at`
|
||||
|
||||
---
|
||||
|
||||
## Requirements
|
||||
|
||||
- WordPress ≥ 6.0
|
||||
- PHP ≥ 8.1
|
||||
- 2meet-data-optimizer ≥ 0.1.0
|
||||
- LatePoint ≥ 3.0(建議現代版本)
|
||||
|
||||
---
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
wp plugin install /path/to/2meet-data-optimizer-latepoint-addon-v0.1.0.zip --activate
|
||||
|
||||
# 驗證
|
||||
wp tmdo doctor --table=hpct_latepoint_idx
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 為什麼是「索引」而非反 EAV
|
||||
|
||||
LatePoint 自身已用 custom table(`wp_latepoint_bookings`)儲存 booking,無 EAV 問題。本 AddOn 不修改 LP 本體 schema,僅維護一份**輕量索引**供:
|
||||
|
||||
- 跨站台 booking 統計(infocards, 2meet-bookings 等共用聚合)
|
||||
- 高效能 vendor agent 篩選
|
||||
- 過去 / 未來預約快查
|
||||
|
||||
---
|
||||
|
||||
## Phase
|
||||
|
||||
Phase 3 — 與 [HivePress AddOn](../2meet-data-optimizer-hivepress-addon/) 與 [WooCommerce AddOn](../2meet-data-optimizer-woocommerce-addon/) 同期 ship。
|
||||
|
||||
---
|
||||
|
||||
## License
|
||||
|
||||
GPL-2.0-or-later
|
||||
Reference in New Issue
Block a user