Product Configuration
Product configuration schemas for retail and e-commerce management. Includes product categories and product definitions with inventory tracking.
Source: src/core/business-mgt/product-config.schema.ts
ProductCategory​
Categories for organizing products in the catalog.
Schema: ProductCategorySchema
Attributes​
| Attribute | Type | Required | Default | Description |
|---|---|---|---|---|
id | string | — | — | Unique identifier for the category |
name | string | Yes | — | Category name (e.g., Electronics, Clothing) |
description | string | No | — | Category description |
displayOrder | number | No | — | Display order in catalog |
createdAt | number | — | — | Unix timestamp when created |
updatedAt | number | — | — | Unix timestamp when last updated |
BusinessProduct​
Individual product definition with inventory and shipping attributes.
Schema: BusinessProductSchema
Attributes​
| Attribute | Type | Required | Default | Description |
|---|---|---|---|---|
id | string | — | — | Unique identifier for the product |
name | string | Yes | — | Display name of the product |
description | string | No | — | Detailed product description |
price | number | Yes | — | Base price in account currency |
sku | string | No | — | Stock Keeping Unit identifier |
barcode | string | No | — | Product barcode (UPC, EAN, ISBN) |
categoryId | string | Yes | — | References ProductCategory |
category | ProductCategory | No | — | Populated category object |
brand | string | No | — | Product brand or manufacturer |
trackInventory | boolean | No | false | Whether inventory tracking is enabled |
stockQuantity | number | No | — | Current available stock |
lowStockThreshold | number | No | — | Low stock alert threshold |
weight | number | No | — | Product weight for shipping |
dimensions | object | No | — | Product dimensions |
isActive | boolean | No | true | Whether product is available for sale |
createdAt | number | — | — | Unix timestamp when created |
updatedAt | number | — | — | Unix timestamp when last updated |
Dimensions Object​
| Attribute | Type | Default | Description |
|---|---|---|---|
length | number | — | Product length |
width | number | — | Product width |
height | number | — | Product height |
unit | enum | inches | Measurement unit (inches or cm) |
Example​
{
"id": "prod_abc123",
"name": "Wireless Bluetooth Headphones",
"description": "Premium noise-canceling wireless headphones with 30-hour battery life",
"price": 149.99,
"sku": "WBH-001-BLK",
"barcode": "012345678901",
"categoryId": "cat_electronics",
"brand": "AudioTech",
"trackInventory": true,
"stockQuantity": 150,
"lowStockThreshold": 20,
"weight": 0.5,
"dimensions": {
"length": 8,
"width": 7,
"height": 4,
"unit": "inches"
},
"isActive": true,
"createdAt": 1709856000000,
"updatedAt": 1709856000000
}
Create / Update Schemas​
| Schema | Description | Omits |
|---|---|---|
CreateProductCategorySchema | For creating categories | id, createdAt, updatedAt |
UpdateProductCategorySchema | For updating categories | All fields optional except id |
CreateBusinessProductSchema | For creating products | id, createdAt, updatedAt, category |
UpdateBusinessProductSchema | For updating products | All fields optional except id |