Files
yidaima/RuoYi-Vue/docs/superpowers/plans/2026-07-10-relational-page-block-plugins.md

29 lines
1.6 KiB
Markdown
Raw Permalink Normal View History

# Relational PageBlock Plugins Plan
**Goal:** Migrate Cart, Order, and MasterDetail into trusted PageBlock plugins while extracting reusable table-primary-key and optional-field generation contributions.
## Task 1: Composable Generation Primitives
- [x] Add a chainable table primary-key contribution to `PageBlockGenerationContext`.
- [x] Add a chainable configured-field flag contribution with the same empty-value semantics as legacy rendering.
- [x] Remove the obsolete shared primary-key resolver after all consumers move into plugins.
## Task 2: Relational Plugin Migration
- [x] Publish `page-block.cart@1.0.0` with cart-table identity and product image/stock contributions.
- [x] Publish `page-block.order@1.0.0` with order, item, and product table identities plus optional display contributions.
- [x] Publish `page-block.master_detail@1.0.0` with master/detail identities and optional detail display contributions.
- [x] Preserve existing definitions, seven templates per block, output paths, API routes, and generated source behavior.
## Task 3: Version Selection And Enforcement
- [x] Auto-select exact relational PageBlock releases during legacy ProjectSpec assembly.
- [x] Reject ProjectSpecs that use a migrated relational block without selecting its plugin release.
- [x] Keep plugin ordering deterministic regardless of Spring bean or layout order.
## Task 4: Verification
- [x] Cover three-table primary-key composition and optional-field flags.
- [x] Run Registry, page design, project generation, template rendering, ProjectSpec, and resolver compatibility tests.
- [x] Confirm the full generator failure baseline does not expand.