Initial commit - production deployment
This commit is contained in:
181
shared/demo/schemas/inventory/ingredient.schema.json
Normal file
181
shared/demo/schemas/inventory/ingredient.schema.json
Normal file
@@ -0,0 +1,181 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"$id": "https://schemas.bakery-ia.com/demo/inventory/ingredient/v1",
|
||||
"type": "object",
|
||||
"title": "Ingredient",
|
||||
"description": "Ingredient or finished product for demo cloning",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"format": "uuid",
|
||||
"description": "Unique ingredient identifier"
|
||||
},
|
||||
"tenant_id": {
|
||||
"type": "string",
|
||||
"format": "uuid",
|
||||
"description": "Tenant owner (replaced during cloning)"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"maxLength": 255
|
||||
},
|
||||
"sku": {
|
||||
"type": ["string", "null"],
|
||||
"maxLength": 100
|
||||
},
|
||||
"barcode": {
|
||||
"type": ["string", "null"],
|
||||
"maxLength": 50
|
||||
},
|
||||
"product_type": {
|
||||
"type": "string",
|
||||
"enum": ["ingredient", "finished_product"],
|
||||
"description": "Type of product in inventory"
|
||||
},
|
||||
"ingredient_category": {
|
||||
"type": ["string", "null"],
|
||||
"enum": ["flour", "yeast", "dairy", "eggs", "sugar", "fats", "salt", "spices", "additives", "packaging", "cleaning", "other"]
|
||||
},
|
||||
"product_category": {
|
||||
"type": ["string", "null"],
|
||||
"enum": ["bread", "croissants", "pastries", "cakes", "cookies", "muffins", "sandwiches", "seasonal", "beverages", "other_products"]
|
||||
},
|
||||
"subcategory": {
|
||||
"type": ["string", "null"],
|
||||
"maxLength": 100
|
||||
},
|
||||
"description": {
|
||||
"type": ["string", "null"]
|
||||
},
|
||||
"brand": {
|
||||
"type": ["string", "null"],
|
||||
"maxLength": 100
|
||||
},
|
||||
"unit_of_measure": {
|
||||
"type": "string",
|
||||
"enum": ["kg", "g", "l", "ml", "units", "pcs", "pkg", "bags", "boxes"]
|
||||
},
|
||||
"package_size": {
|
||||
"type": ["number", "null"],
|
||||
"minimum": 0
|
||||
},
|
||||
"average_cost": {
|
||||
"type": ["number", "null"],
|
||||
"minimum": 0
|
||||
},
|
||||
"last_purchase_price": {
|
||||
"type": ["number", "null"],
|
||||
"minimum": 0
|
||||
},
|
||||
"standard_cost": {
|
||||
"type": ["number", "null"],
|
||||
"minimum": 0
|
||||
},
|
||||
"low_stock_threshold": {
|
||||
"type": ["number", "null"],
|
||||
"minimum": 0
|
||||
},
|
||||
"reorder_point": {
|
||||
"type": ["number", "null"],
|
||||
"minimum": 0
|
||||
},
|
||||
"reorder_quantity": {
|
||||
"type": ["number", "null"],
|
||||
"minimum": 0
|
||||
},
|
||||
"max_stock_level": {
|
||||
"type": ["number", "null"],
|
||||
"minimum": 0
|
||||
},
|
||||
"shelf_life_days": {
|
||||
"type": ["integer", "null"],
|
||||
"minimum": 1
|
||||
},
|
||||
"display_life_hours": {
|
||||
"type": ["integer", "null"],
|
||||
"minimum": 1
|
||||
},
|
||||
"best_before_hours": {
|
||||
"type": ["integer", "null"],
|
||||
"minimum": 1
|
||||
},
|
||||
"storage_instructions": {
|
||||
"type": ["string", "null"]
|
||||
},
|
||||
"central_baker_product_code": {
|
||||
"type": ["string", "null"],
|
||||
"maxLength": 100
|
||||
},
|
||||
"delivery_days": {
|
||||
"type": ["string", "null"],
|
||||
"maxLength": 20
|
||||
},
|
||||
"minimum_order_quantity": {
|
||||
"type": ["number", "null"],
|
||||
"minimum": 0
|
||||
},
|
||||
"pack_size": {
|
||||
"type": ["integer", "null"],
|
||||
"minimum": 1
|
||||
},
|
||||
"is_active": {
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"is_perishable": {
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"allergen_info": {
|
||||
"type": ["array", "null"],
|
||||
"items": {"type": "string"}
|
||||
},
|
||||
"nutritional_info": {
|
||||
"type": ["object", "null"]
|
||||
},
|
||||
"produced_locally": {
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"recipe_id": {
|
||||
"type": ["string", "null"],
|
||||
"format": "uuid",
|
||||
"description": "Cross-service ref to recipes.Recipe for local production"
|
||||
},
|
||||
"created_at": {
|
||||
"type": ["string", "null"],
|
||||
"format": "date-time"
|
||||
},
|
||||
"updated_at": {
|
||||
"type": ["string", "null"],
|
||||
"format": "date-time"
|
||||
},
|
||||
"created_by": {
|
||||
"type": ["string", "null"],
|
||||
"format": "uuid"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id", "tenant_id", "name", "product_type", "unit_of_measure", "is_active", "is_perishable", "produced_locally"
|
||||
],
|
||||
"additionalProperties": false,
|
||||
"allOf": [
|
||||
{
|
||||
"if": {
|
||||
"properties": {"product_type": {"const": "finished_product"}}
|
||||
},
|
||||
"then": {
|
||||
"required": ["product_category"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"properties": {"product_type": {"const": "ingredient"}}
|
||||
},
|
||||
"then": {
|
||||
"required": ["ingredient_category"]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
159
shared/demo/schemas/inventory/stock.schema.json
Normal file
159
shared/demo/schemas/inventory/stock.schema.json
Normal file
@@ -0,0 +1,159 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"$id": "https://schemas.bakery-ia.com/demo/inventory/stock/v1",
|
||||
"type": "object",
|
||||
"title": "Stock",
|
||||
"description": "Stock levels and batch tracking for demo cloning",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"format": "uuid",
|
||||
"description": "Unique stock identifier"
|
||||
},
|
||||
"tenant_id": {
|
||||
"type": "string",
|
||||
"format": "uuid",
|
||||
"description": "Tenant owner (replaced during cloning)"
|
||||
},
|
||||
"ingredient_id": {
|
||||
"type": "string",
|
||||
"format": "uuid",
|
||||
"description": "Reference to inventory.Ingredient"
|
||||
},
|
||||
"supplier_id": {
|
||||
"type": ["string", "null"],
|
||||
"format": "uuid",
|
||||
"description": "Cross-service ref to suppliers.Supplier"
|
||||
},
|
||||
"batch_number": {
|
||||
"type": ["string", "null"],
|
||||
"maxLength": 100
|
||||
},
|
||||
"lot_number": {
|
||||
"type": ["string", "null"],
|
||||
"maxLength": 100
|
||||
},
|
||||
"supplier_batch_ref": {
|
||||
"type": ["string", "null"],
|
||||
"maxLength": 100
|
||||
},
|
||||
"production_stage": {
|
||||
"type": "string",
|
||||
"enum": ["raw_ingredient", "par_baked", "fully_baked", "prepared_dough", "frozen_product"],
|
||||
"default": "raw_ingredient"
|
||||
},
|
||||
"transformation_reference": {
|
||||
"type": ["string", "null"],
|
||||
"maxLength": 100
|
||||
},
|
||||
"current_quantity": {
|
||||
"type": "number",
|
||||
"minimum": 0,
|
||||
"default": 0
|
||||
},
|
||||
"reserved_quantity": {
|
||||
"type": "number",
|
||||
"minimum": 0,
|
||||
"default": 0
|
||||
},
|
||||
"available_quantity": {
|
||||
"type": "number",
|
||||
"minimum": 0,
|
||||
"default": 0
|
||||
},
|
||||
"received_date": {
|
||||
"type": ["string", "null"],
|
||||
"format": "date-time"
|
||||
},
|
||||
"expiration_date": {
|
||||
"type": ["string", "null"],
|
||||
"format": "date-time"
|
||||
},
|
||||
"best_before_date": {
|
||||
"type": ["string", "null"],
|
||||
"format": "date-time"
|
||||
},
|
||||
"original_expiration_date": {
|
||||
"type": ["string", "null"],
|
||||
"format": "date-time"
|
||||
},
|
||||
"transformation_date": {
|
||||
"type": ["string", "null"],
|
||||
"format": "date-time"
|
||||
},
|
||||
"final_expiration_date": {
|
||||
"type": ["string", "null"],
|
||||
"format": "date-time"
|
||||
},
|
||||
"unit_cost": {
|
||||
"type": ["number", "null"],
|
||||
"minimum": 0
|
||||
},
|
||||
"total_cost": {
|
||||
"type": ["number", "null"],
|
||||
"minimum": 0
|
||||
},
|
||||
"storage_location": {
|
||||
"type": ["string", "null"],
|
||||
"maxLength": 100
|
||||
},
|
||||
"warehouse_zone": {
|
||||
"type": ["string", "null"],
|
||||
"maxLength": 50
|
||||
},
|
||||
"shelf_position": {
|
||||
"type": ["string", "null"],
|
||||
"maxLength": 50
|
||||
},
|
||||
"requires_refrigeration": {
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"requires_freezing": {
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"storage_temperature_min": {
|
||||
"type": ["number", "null"]
|
||||
},
|
||||
"storage_temperature_max": {
|
||||
"type": ["number", "null"]
|
||||
},
|
||||
"storage_humidity_max": {
|
||||
"type": ["number", "null"]
|
||||
},
|
||||
"shelf_life_days": {
|
||||
"type": ["integer", "null"],
|
||||
"minimum": 1
|
||||
},
|
||||
"storage_instructions": {
|
||||
"type": ["string", "null"]
|
||||
},
|
||||
"is_available": {
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"is_expired": {
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"quality_status": {
|
||||
"type": "string",
|
||||
"enum": ["good", "damaged", "expired", "quarantined"],
|
||||
"default": "good"
|
||||
},
|
||||
"created_at": {
|
||||
"type": ["string", "null"],
|
||||
"format": "date-time"
|
||||
},
|
||||
"updated_at": {
|
||||
"type": ["string", "null"],
|
||||
"format": "date-time"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id", "tenant_id", "ingredient_id", "current_quantity", "reserved_quantity", "available_quantity",
|
||||
"is_available", "is_expired", "quality_status"
|
||||
],
|
||||
"additionalProperties": false
|
||||
}
|
||||
Reference in New Issue
Block a user