2.3 KiB
Why
Product detail still renders display-only comment fixtures and deliberately offers no reviews tab because no review model exists. Reviews are mall trust infrastructure: shoppers decide from real buyer feedback on real purchases and merchants answer it publicly, so the placeholder must be replaced by reviews backed by completed order lines instead of invented reviewers.
What Changes
- Add buyer reviews for product lines of completed (received) orders: a 1-5 star rating, text, and optional image URLs, at most one review per order line enforced by a unique index plus creation preconditions.
- Let the owning merchant reply to a review exactly once and let platform admins hide (soft delete) or delete reviews as moderation.
- Add product review listing with pagination over visible reviews only and a SQL-aggregated rating summary (average, count, and star distribution).
- Replace the mall product-detail display-only comment placeholder with the real review area and add a buyer-center "pending review" entry with a review submission form.
- Add a shop-admin review list/reply page and an admin review moderation list over the shared contract.
- Keep equivalent fixed-adapter review behavior as the rollback implementation.
Capabilities
New Capabilities
reviews: One review per completed order line, a single merchant reply per review, platform hide/delete moderation, visible-only public listing, and SQL rating aggregation.
Modified Capabilities
frontend-mall: Product detail renders the real review area with summary and paginated visible reviews, and the buyer center gains pending-review discovery and review submission.frontend-shop-admin: Merchants list their own shop's reviews and reply once per review.frontend-admin: Platform admins moderate reviews with hide and delete actions.
Non-goals
Follow-up reviews (追评), review ranking or sorting algorithms, photo-reward points (left to P7), anonymous reviews, video reviews, review editing or withdrawal, and merchant review analytics are excluded.
Impact
Adds one Postgres migration (product_reviews), a Rust review module with customer, own_shop-scoped merchant, and admin routes, shared types and API methods, a Mall reviews domain pick with fixed-adapter parity, and Mall product-detail plus buyer-center updates alongside new shop-admin and admin console pages.