Skip to main content

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​

AttributeTypeRequiredDefaultDescription
idstring——Unique identifier for the category
namestringYes—Category name (e.g., Electronics, Clothing)
descriptionstringNo—Category description
displayOrdernumberNo—Display order in catalog
createdAtnumber——Unix timestamp when created
updatedAtnumber——Unix timestamp when last updated

BusinessProduct​

Individual product definition with inventory and shipping attributes.

Schema: BusinessProductSchema

Attributes​

AttributeTypeRequiredDefaultDescription
idstring——Unique identifier for the product
namestringYes—Display name of the product
descriptionstringNo—Detailed product description
pricenumberYes—Base price in account currency
skustringNo—Stock Keeping Unit identifier
barcodestringNo—Product barcode (UPC, EAN, ISBN)
categoryIdstringYes—References ProductCategory
categoryProductCategoryNo—Populated category object
brandstringNo—Product brand or manufacturer
trackInventorybooleanNofalseWhether inventory tracking is enabled
stockQuantitynumberNo—Current available stock
lowStockThresholdnumberNo—Low stock alert threshold
weightnumberNo—Product weight for shipping
dimensionsobjectNo—Product dimensions
isActivebooleanNotrueWhether product is available for sale
createdAtnumber——Unix timestamp when created
updatedAtnumber——Unix timestamp when last updated

Dimensions Object​

AttributeTypeDefaultDescription
lengthnumber—Product length
widthnumber—Product width
heightnumber—Product height
unitenuminchesMeasurement 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​

SchemaDescriptionOmits
CreateProductCategorySchemaFor creating categoriesid, createdAt, updatedAt
UpdateProductCategorySchemaFor updating categoriesAll fields optional except id
CreateBusinessProductSchemaFor creating productsid, createdAt, updatedAt, category
UpdateBusinessProductSchemaFor updating productsAll fields optional except id