Scope vendors to a market; derive market products; archive markets

Featurekamo-shared-library
Shipped
July 1, 2026 at 6:24 PM UTC
Author
Kamo
Commit
314c8dc

- LeadVendor gains a required MARKET_ID (columnDefinition pinned to plain UUID so the FK column does not inherit the referenced PK's gen_random_uuid() default) - Remove LeadMarket.vendorProducts M2M; a market's products are now derived from its vendors (LeadVendorProduct where vendor.market = market) - Vendor create takes a marketId and validates the market (org-owned + active); vendor title uniqueness is per-market - Markets are never deleted: replace soft-delete with setMarketActive (archive/ reactivate); add archived-markets query - DTOs: LeadVendorDTO.marketId; drop vendorProductIds from market request DTOs

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing