.agents/rules/modules/catalog.md
Product catalog — products, categories (tree), brands — with soft-delete/restore/trash and search. Module Order = 600. This is the reference module for the soft-delete + image patterns; copy from here.
Entities / DbContext: Product (aggregate, soft-deletable) + ProductImage, Brand, Category (self-referencing tree), Money (owned value object). CatalogDbContext. Domain events (ProductCreated/PriceChanged/StockAdjusted) are internal, not integration events.
Areas: Products (+ price/stock/images), Categories (+ tree), Brands — each with Create/Update/Delete/Search/ListTrashed/Restore. Full list: Features/v1/ or /scalar.
"IsDeleted" = FALSE so SKU/Slug stay unique-per-tenant among live rows only (a deleted SKU can be reused). Replicate this on any soft-deletable unique field.ProductImageConfiguration sets Id.ValueGeneratedNever() (same nav-child footgun as Chat — see database.md).ProductFileAccessPolicy (OwnerType "Product") for product images via the Files module./trash, /tree, /restore) are registered before /{id:guid} catch-alls.