laravel-shop/database/migrations
Fabian @ Blax Software b154d8fea2 feat(seats): assignable license seats — buy N, assign/reassign/reclaim per user
A seat-based product (meta.seat_based) sold at quantity N provisions N
assignable LicenseSeat rows instead of granting the buyer. Assigning a seat
runs the product's existing ProductAction grants against the seat holder via
an explicit `grantee` (resolution: grantee ?? purchaser ?? subscription->user),
so a seat confers exactly the product's access with zero duplicated grant logic.

- LicenseSeat model: assign / reassign / reclaim / retire / refreshGrant
- SeatService: idempotent provisioning for one-time purchases and subscriptions
  (sizes the pool to quantity; renewal extends expiry + re-grants held seats)
- SeatAssigned / SeatReassigned / SeatRevoked events
- Product::isSeatBased(); ProductPurchase + Subscription provision on
  completion / lifecycle hooks
- license_seats migration + factory; config `shop.seats` block
- 15 new tests (purchase, subscription, renewal, retire, delegation, gating)

Backward compatible: with no `grantee` the buyer grant is unchanged, and seat
behavior is gated behind the per-product meta flag + config `shop.seats.enabled`.
Full package suite green: 1425 tests / 3812 assertions / 0 failures.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-29 10:07:58 +02:00
..
2025_01_01_000001_create_blax_shop_tables.php fix: product_action_runs.action_id must be uuidMorphs (ProductAction is HasUuids) 2026-06-10 11:33:09 +02:00
2025_01_01_000002_create_product_price_tiers_table.php I loanable product type, tiered pricing, lifecycle events, host helpers 2026-05-15 10:27:59 +02:00
2025_01_01_000003_add_stripe_to_users_table.php I loanable product type, tiered pricing, lifecycle events, host helpers 2026-05-15 10:27:59 +02:00
2025_01_01_000004_create_blax_shop_subscriptions.php feat(subscriptions): Cashier-backed subscription lifecycle with product link + events 2026-06-02 11:40:15 +02:00
2026_01_01_000000_drop_stock_quantity_from_products.php BF edgecases, R structure, A tests 2026-05-18 13:05:38 +02:00
2026_01_01_000001_drop_in_stock_and_stock_status_from_products.php BF edgecases, R structure, A tests 2026-05-18 13:05:38 +02:00
2026_01_01_000002_add_max_per_cart_and_max_per_user_to_products.php IAM "max usage" feature 2026-05-19 14:01:52 +02:00
2026_01_01_000003_create_license_seats_table.php feat(seats): assignable license seats — buy N, assign/reassign/reclaim per user 2026-07-29 10:07:58 +02:00