Skip to content

feat(basket): add basket items entity and repository#64

Merged
rogargon merged 3 commits into
mainfrom
basket
Jan 18, 2026
Merged

feat(basket): add basket items entity and repository#64
rogargon merged 3 commits into
mainfrom
basket

Conversation

@ainhprzz

Copy link
Copy Markdown
Contributor

What

Adds support for storing products inside a basket by introducing BasketItem.

Changes

  • Added BasketItem entity (basket, product, quantity)
  • Added BasketItemRepository (findByBasket, findByBasketAndProduct)
  • Updated Basket entity with OneToMany(items)
  • (Optional) Event handler to update basket timestamps when items change

API / Data

  • New resource: /basketItems (Spring Data REST)
  • Basket now exposes items relation (HAL links)

Testing

  1. Run backend
  2. POST /basketItems with body:
    { "basket": "/baskets/{id}", "product": "/products/{id}", "quantity": 1 }
  3. GET /baskets/{id} and verify items/links

Notes

Frontend PR depends on this PR.

@ainhprzz ainhprzz added the enhancement New feature or request label Jan 17, 2026
@github-project-automation github-project-automation Bot moved this to 📋 Backlog in MyCoffee Jan 17, 2026
@ainhprzz ainhprzz added this to the 3rd Sprint milestone Jan 17, 2026
@ainhprzz ainhprzz marked this pull request as ready for review January 17, 2026 22:36
@rogargon rogargon merged commit 4e5de58 into main Jan 18, 2026
1 check passed
@github-project-automation github-project-automation Bot moved this from 📋 Backlog to ✅ Done in MyCoffee Jan 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

4 participants