demo seed change
This commit is contained in:
191
shared/demo/schemas/recipes/recipe.schema.json
Normal file
191
shared/demo/schemas/recipes/recipe.schema.json
Normal file
@@ -0,0 +1,191 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"$id": "https://schemas.bakery-ia.com/demo/recipes/recipe/v1",
|
||||
"type": "object",
|
||||
"title": "Recipe",
|
||||
"description": "Recipe for demo cloning",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"format": "uuid",
|
||||
"description": "Unique recipe identifier"
|
||||
},
|
||||
"tenant_id": {
|
||||
"type": "string",
|
||||
"format": "uuid",
|
||||
"description": "Tenant owner (replaced during cloning)"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"maxLength": 255
|
||||
},
|
||||
"recipe_code": {
|
||||
"type": ["string", "null"],
|
||||
"maxLength": 100
|
||||
},
|
||||
"version": {
|
||||
"type": "string",
|
||||
"default": "1.0"
|
||||
},
|
||||
"finished_product_id": {
|
||||
"type": "string",
|
||||
"format": "uuid",
|
||||
"description": "Cross-service ref to inventory.Ingredient (product_type=finished_product)"
|
||||
},
|
||||
"description": {
|
||||
"type": ["string", "null"]
|
||||
},
|
||||
"category": {
|
||||
"type": ["string", "null"],
|
||||
"maxLength": 100
|
||||
},
|
||||
"cuisine_type": {
|
||||
"type": ["string", "null"],
|
||||
"maxLength": 100
|
||||
},
|
||||
"difficulty_level": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 5,
|
||||
"default": 1
|
||||
},
|
||||
"yield_quantity": {
|
||||
"type": "number",
|
||||
"minimum": 0.1
|
||||
},
|
||||
"yield_unit": {
|
||||
"type": "string",
|
||||
"enum": ["g", "kg", "ml", "l", "cups", "tbsp", "tsp", "units", "pieces", "%"]
|
||||
},
|
||||
"prep_time_minutes": {
|
||||
"type": ["integer", "null"],
|
||||
"minimum": 0
|
||||
},
|
||||
"cook_time_minutes": {
|
||||
"type": ["integer", "null"],
|
||||
"minimum": 0
|
||||
},
|
||||
"total_time_minutes": {
|
||||
"type": ["integer", "null"],
|
||||
"minimum": 0
|
||||
},
|
||||
"rest_time_minutes": {
|
||||
"type": ["integer", "null"],
|
||||
"minimum": 0
|
||||
},
|
||||
"estimated_cost_per_unit": {
|
||||
"type": ["number", "null"],
|
||||
"minimum": 0
|
||||
},
|
||||
"last_calculated_cost": {
|
||||
"type": ["number", "null"],
|
||||
"minimum": 0
|
||||
},
|
||||
"cost_calculation_date": {
|
||||
"type": ["string", "null"],
|
||||
"format": "date-time"
|
||||
},
|
||||
"target_margin_percentage": {
|
||||
"type": ["number", "null"],
|
||||
"minimum": 0,
|
||||
"maximum": 100
|
||||
},
|
||||
"suggested_selling_price": {
|
||||
"type": ["number", "null"],
|
||||
"minimum": 0
|
||||
},
|
||||
"instructions": {
|
||||
"type": ["object", "null"]
|
||||
},
|
||||
"preparation_notes": {
|
||||
"type": ["string", "null"]
|
||||
},
|
||||
"storage_instructions": {
|
||||
"type": ["string", "null"]
|
||||
},
|
||||
"serves_count": {
|
||||
"type": ["integer", "null"],
|
||||
"minimum": 1
|
||||
},
|
||||
"nutritional_info": {
|
||||
"type": ["object", "null"]
|
||||
},
|
||||
"allergen_info": {
|
||||
"type": ["array", "null"],
|
||||
"items": {"type": "string"}
|
||||
},
|
||||
"dietary_tags": {
|
||||
"type": ["array", "null"],
|
||||
"items": {"type": "string"}
|
||||
},
|
||||
"batch_size_multiplier": {
|
||||
"type": "number",
|
||||
"minimum": 0.1,
|
||||
"default": 1.0
|
||||
},
|
||||
"minimum_batch_size": {
|
||||
"type": ["number", "null"],
|
||||
"minimum": 0.1
|
||||
},
|
||||
"maximum_batch_size": {
|
||||
"type": ["number", "null"],
|
||||
"minimum": 0.1
|
||||
},
|
||||
"optimal_production_temperature": {
|
||||
"type": ["number", "null"]
|
||||
},
|
||||
"optimal_humidity": {
|
||||
"type": ["number", "null"],
|
||||
"minimum": 0,
|
||||
"maximum": 100
|
||||
},
|
||||
"quality_check_configuration": {
|
||||
"type": ["object", "null"]
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"enum": ["DRAFT", "ACTIVE", "TESTING", "ARCHIVED", "DISCONTINUED"],
|
||||
"default": "DRAFT"
|
||||
},
|
||||
"is_seasonal": {
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"season_start_month": {
|
||||
"type": ["integer", "null"],
|
||||
"minimum": 1,
|
||||
"maximum": 12
|
||||
},
|
||||
"season_end_month": {
|
||||
"type": ["integer", "null"],
|
||||
"minimum": 1,
|
||||
"maximum": 12
|
||||
},
|
||||
"is_signature_item": {
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"created_at": {
|
||||
"type": ["string", "null"],
|
||||
"format": "date-time"
|
||||
},
|
||||
"updated_at": {
|
||||
"type": ["string", "null"],
|
||||
"format": "date-time"
|
||||
},
|
||||
"created_by": {
|
||||
"type": ["string", "null"],
|
||||
"format": "uuid"
|
||||
},
|
||||
"updated_by": {
|
||||
"type": ["string", "null"],
|
||||
"format": "uuid"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id", "tenant_id", "name", "finished_product_id", "yield_quantity", "yield_unit",
|
||||
"status", "is_seasonal", "is_signature_item", "batch_size_multiplier"
|
||||
],
|
||||
"additionalProperties": false
|
||||
}
|
||||
100
shared/demo/schemas/recipes/recipe_ingredient.schema.json
Normal file
100
shared/demo/schemas/recipes/recipe_ingredient.schema.json
Normal file
@@ -0,0 +1,100 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"$id": "https://schemas.bakery-ia.com/demo/recipes/recipe_ingredient/v1",
|
||||
"type": "object",
|
||||
"title": "RecipeIngredient",
|
||||
"description": "Ingredient required for a recipe",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"format": "uuid",
|
||||
"description": "Unique recipe ingredient identifier"
|
||||
},
|
||||
"tenant_id": {
|
||||
"type": "string",
|
||||
"format": "uuid",
|
||||
"description": "Tenant owner (replaced during cloning)"
|
||||
},
|
||||
"recipe_id": {
|
||||
"type": "string",
|
||||
"format": "uuid",
|
||||
"description": "Reference to recipes.Recipe"
|
||||
},
|
||||
"ingredient_id": {
|
||||
"type": "string",
|
||||
"format": "uuid",
|
||||
"description": "Cross-service ref to inventory.Ingredient"
|
||||
},
|
||||
"quantity": {
|
||||
"type": "number",
|
||||
"minimum": 0.001
|
||||
},
|
||||
"unit": {
|
||||
"type": "string",
|
||||
"enum": ["g", "kg", "ml", "l", "cups", "tbsp", "tsp", "units", "pieces", "%"]
|
||||
},
|
||||
"quantity_in_base_unit": {
|
||||
"type": ["number", "null"],
|
||||
"minimum": 0
|
||||
},
|
||||
"alternative_quantity": {
|
||||
"type": ["number", "null"],
|
||||
"minimum": 0
|
||||
},
|
||||
"alternative_unit": {
|
||||
"type": ["string", "null"],
|
||||
"enum": ["g", "kg", "ml", "l", "cups", "tbsp", "tsp", "units", "pieces", "%"]
|
||||
},
|
||||
"preparation_method": {
|
||||
"type": ["string", "null"],
|
||||
"maxLength": 255
|
||||
},
|
||||
"ingredient_notes": {
|
||||
"type": ["string", "null"]
|
||||
},
|
||||
"is_optional": {
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"ingredient_order": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"default": 1
|
||||
},
|
||||
"ingredient_group": {
|
||||
"type": ["string", "null"],
|
||||
"maxLength": 100
|
||||
},
|
||||
"substitution_options": {
|
||||
"type": ["array", "null"],
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ingredient_id": {"type": "string", "format": "uuid"},
|
||||
"name": {"type": "string"},
|
||||
"ratio": {"type": "number"}
|
||||
}
|
||||
}
|
||||
},
|
||||
"substitution_ratio": {
|
||||
"type": ["number", "null"],
|
||||
"minimum": 0.1
|
||||
},
|
||||
"unit_cost": {
|
||||
"type": ["number", "null"],
|
||||
"minimum": 0
|
||||
},
|
||||
"total_cost": {
|
||||
"type": ["number", "null"],
|
||||
"minimum": 0
|
||||
},
|
||||
"cost_updated_at": {
|
||||
"type": ["string", "null"],
|
||||
"format": "date-time"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id", "tenant_id", "recipe_id", "ingredient_id", "quantity", "unit", "ingredient_order"
|
||||
],
|
||||
"additionalProperties": false
|
||||
}
|
||||
Reference in New Issue
Block a user