demo seed change

This commit is contained in:
Urtzi Alfaro
2025-12-13 23:57:54 +01:00
parent f3688dfb04
commit ff830a3415
299 changed files with 20328 additions and 19485 deletions

View File

@@ -0,0 +1,254 @@
{
"location": {
"id": "B0000000-0000-4000-a000-000000000001",
"parent_tenant_id": "80000000-0000-4000-a000-000000000001",
"name": "Barcelona Gràcia",
"location_code": "ENT-BCN-001",
"city": "Barcelona",
"zone": "Gràcia",
"address": "Carrer de Verdi, 28",
"postal_code": "08012",
"country": "España",
"latitude": 41.4036,
"longitude": 2.1561,
"status": "ACTIVE",
"opening_hours": "07:30-21:30",
"daily_capacity": 1800,
"storage_capacity_kg": 6000,
"created_at": "2025-01-15T06:00:00Z",
"enterprise_location": true,
"location_type": "retail_and_wholesale",
"manager_id": "50000000-0000-0000-0000-000000000012",
"staff_count": 15,
"equipment": [
"30000000-0000-0000-0000-000000000002"
],
"shared_ingredients": [
"10000000-0000-0000-0000-000000000001",
"10000000-0000-0000-0000-000000000002",
"10000000-0000-0000-0000-000000000003",
"20000000-0000-0000-0000-000000000001",
"20000000-0000-0000-0000-000000000002"
],
"shared_recipes": [
"30000000-0000-0000-0000-000000000001",
"30000000-0000-0000-0000-000000000002"
]
},
"local_inventory": [
{
"id": "10000000-0000-0000-0000-000000002001",
"tenant_id": "B0000000-0000-4000-a000-000000000001",
"ingredient_id": "10000000-0000-0000-0000-000000000001",
"quantity": 180.0,
"location": "Barcelona Gràcia - Storage",
"production_stage": "RAW_MATERIAL",
"quality_status": "APPROVED",
"expiration_date": "2025-02-20T00:00:00Z",
"supplier_id": "40000000-0000-0000-0000-000000000001",
"batch_number": "BCN-HAR-20250115-001",
"created_at": "2025-01-15T06:00:00Z",
"enterprise_shared": true,
"source_location": "Central Warehouse - Barcelona"
},
{
"id": "10000000-0000-0000-0000-000000002002",
"tenant_id": "B0000000-0000-4000-a000-000000000001",
"ingredient_id": "10000000-0000-0000-0000-000000000002",
"quantity": 45.0,
"location": "Barcelona Gràcia - Cold Storage",
"production_stage": "RAW_MATERIAL",
"quality_status": "APPROVED",
"expiration_date": "2025-01-25T00:00:00Z",
"supplier_id": "40000000-0000-0000-0000-000000000002",
"batch_number": "BCN-MAN-20250115-001",
"created_at": "2025-01-15T06:00:00Z",
"enterprise_shared": true,
"source_location": "Central Warehouse - Barcelona"
},
{
"id": "20000000-0000-0000-0000-000000002001",
"tenant_id": "B0000000-0000-4000-a000-000000000001",
"ingredient_id": "20000000-0000-0000-0000-000000000001",
"quantity": 65.0,
"location": "Barcelona Gràcia - Display",
"production_stage": "FINISHED_PRODUCT",
"quality_status": "APPROVED",
"expiration_date": "2025-01-16T06:00:00Z",
"supplier_id": null,
"batch_number": "BCN-BAG-20250115-001",
"created_at": "2025-01-15T06:00:00Z",
"enterprise_shared": true,
"source_location": "Central Production Facility - Barcelona"
},
{
"id": "20000000-0000-0000-0000-000000002002",
"tenant_id": "B0000000-0000-4000-a000-000000000001",
"ingredient_id": "20000000-0000-0000-0000-000000000002",
"quantity": 30.0,
"location": "Barcelona Gràcia - Display",
"production_stage": "FINISHED_PRODUCT",
"quality_status": "APPROVED",
"expiration_date": "2025-01-16T08:00:00Z",
"supplier_id": null,
"batch_number": "BCN-CRO-20250115-001",
"created_at": "2025-01-15T06:00:00Z",
"enterprise_shared": true,
"source_location": "Central Production Facility - Barcelona"
}
],
"local_sales": [
{
"id": "70000000-0000-0000-0000-000000004001",
"tenant_id": "B0000000-0000-4000-a000-000000000001",
"sale_date": "2025-01-15T08:30:00Z",
"product_id": "20000000-0000-0000-0000-000000000001",
"quantity_sold": 35.0,
"unit_price": 2.85,
"total_revenue": 99.75,
"sales_channel": "RETAIL",
"created_at": "2025-01-15T06:00:00Z",
"notes": "Venda local a Barcelona Gràcia - matí",
"enterprise_location_sale": true,
"parent_order_id": "60000000-0000-0000-0000-000000003001"
},
{
"id": "70000000-0000-0000-0000-000000004002",
"tenant_id": "B0000000-0000-4000-a000-000000000001",
"sale_date": "2025-01-15T09:15:00Z",
"product_id": "20000000-0000-0000-0000-000000000002",
"quantity_sold": 18.0,
"unit_price": 3.95,
"total_revenue": 71.10,
"sales_channel": "RETAIL",
"created_at": "2025-01-15T06:00:00Z",
"notes": "Venda de croissants a Barcelona Gràcia",
"enterprise_location_sale": true,
"parent_order_id": "60000000-0000-0000-0000-000000003002"
},
{
"id": "70000000-0000-0000-0000-000000004003",
"tenant_id": "B0000000-0000-4000-a000-000000000001",
"sale_date": "2025-01-14T17:00:00Z",
"product_id": "20000000-0000-0000-0000-000000000001",
"quantity_sold": 28.0,
"unit_price": 2.85,
"total_revenue": 79.80,
"sales_channel": "RETAIL",
"created_at": "2025-01-15T06:00:00Z",
"notes": "Venda de tarda a Barcelona Gràcia",
"enterprise_location_sale": true,
"parent_order_id": "60000000-0000-0000-0000-000000003003"
}
],
"local_orders": [
{
"id": "60000000-0000-0000-0000-000000003001",
"tenant_id": "B0000000-0000-4000-a000-000000000001",
"order_number": "ORD-BCN-GRA-20250115-001",
"customer_name": "Restaurant El Vaixell",
"customer_email": "comandes@elvaixell.cat",
"order_date": "2025-01-15T07:00:00Z",
"delivery_date": "2025-01-15T08:30:00Z",
"status": "DELIVERED",
"total_amount": 99.75,
"created_at": "2025-01-15T06:00:00Z",
"notes": "Comanda matinal per restaurant local",
"enterprise_location_order": true
},
{
"id": "60000000-0000-0000-0000-000000003002",
"tenant_id": "B0000000-0000-4000-a000-000000000001",
"order_number": "ORD-BCN-GRA-20250115-002",
"customer_name": "Cafeteria La Perla",
"customer_email": "info@laperla.cat",
"order_date": "2025-01-15T06:30:00Z",
"delivery_date": "2025-01-15T09:00:00Z",
"status": "DELIVERED",
"total_amount": 71.10,
"created_at": "2025-01-15T06:00:00Z",
"notes": "Croissants per cafeteria",
"enterprise_location_order": true
},
{
"id": "60000000-0000-0000-0000-000000003003",
"tenant_id": "B0000000-0000-4000-a000-000000000001",
"order_number": "ORD-BCN-GRA-20250114-003",
"customer_name": "Hotel Casa Fuster",
"customer_email": "compras@casafuster.com",
"order_date": "2025-01-14T14:00:00Z",
"delivery_date": "2025-01-14T17:00:00Z",
"status": "DELIVERED",
"total_amount": 79.80,
"created_at": "2025-01-15T06:00:00Z",
"notes": "Comanda de tarda per hotel",
"enterprise_location_order": true
}
],
"local_production_batches": [
{
"id": "40000000-0000-0000-0000-000000002001",
"tenant_id": "B0000000-0000-4000-a000-000000000001",
"batch_number": "BCN-BATCH-20250115-001",
"recipe_id": "30000000-0000-0000-0000-000000000001",
"product_id": "20000000-0000-0000-0000-000000000001",
"planned_quantity": 100.0,
"actual_quantity": 98.0,
"status": "COMPLETED",
"planned_start_time": "2025-01-15T04:00:00Z",
"actual_start_time": "2025-01-15T04:05:00Z",
"planned_end_time": "2025-01-15T06:00:00Z",
"actual_end_time": "2025-01-15T06:10:00Z",
"equipment_id": "30000000-0000-0000-0000-000000000002",
"operator_id": "50000000-0000-0000-0000-000000000012",
"created_at": "2025-01-15T06:00:00Z",
"notes": "Producció matinal de baguettes a Barcelona",
"enterprise_location_production": true
},
{
"id": "40000000-0000-0000-0000-000000002002",
"tenant_id": "B0000000-0000-4000-a000-000000000001",
"batch_number": "BCN-BATCH-20250115-002",
"recipe_id": "30000000-0000-0000-0000-000000000002",
"product_id": "20000000-0000-0000-0000-000000000002",
"planned_quantity": 50.0,
"actual_quantity": null,
"status": "IN_PROGRESS",
"planned_start_time": "2025-01-15T05:00:00Z",
"actual_start_time": "2025-01-15T05:00:00Z",
"planned_end_time": "2025-01-15T07:30:00Z",
"actual_end_time": null,
"equipment_id": "30000000-0000-0000-0000-000000000002",
"operator_id": "50000000-0000-0000-0000-000000000013",
"created_at": "2025-01-15T06:00:00Z",
"notes": "Producció de croissants en curs a Barcelona",
"enterprise_location_production": true
}
],
"local_forecasts": [
{
"id": "80000000-0000-0000-0000-000000002001",
"tenant_id": "B0000000-0000-4000-a000-000000000001",
"product_id": "20000000-0000-0000-0000-000000000001",
"forecast_date": "2025-01-16T00:00:00Z",
"predicted_quantity": 85.0,
"confidence_score": 0.91,
"forecast_horizon_days": 1,
"created_at": "2025-01-15T06:00:00Z",
"notes": "Previsió de demanda diària per Barcelona Gràcia",
"enterprise_location_forecast": true
},
{
"id": "80000000-0000-0000-0000-000000002002",
"tenant_id": "B0000000-0000-4000-a000-000000000001",
"product_id": "20000000-0000-0000-0000-000000000002",
"forecast_date": "2025-01-16T00:00:00Z",
"predicted_quantity": 45.0,
"confidence_score": 0.89,
"forecast_horizon_days": 1,
"created_at": "2025-01-15T06:00:00Z",
"notes": "Previsió de croissants per demà a Barcelona",
"enterprise_location_forecast": true
}
]
}

View File

@@ -0,0 +1,83 @@
{
"location": {
"id": "A0000000-0000-4000-a000-000000000001",
"parent_tenant_id": "80000000-0000-4000-a000-000000000001",
"name": "Madrid Centro",
"location_code": "ENT-MAD-001",
"city": "Madrid",
"zone": "Centro",
"address": "Calle Mayor, 15",
"postal_code": "28013",
"country": "España",
"latitude": 40.4168,
"longitude": -3.7038,
"status": "ACTIVE",
"opening_hours": "07:00-21:00",
"daily_capacity": 1500,
"storage_capacity_kg": 5000,
"created_at": "2025-01-15T06:00:00Z",
"enterprise_location": true,
"location_type": "retail_and_wholesale",
"manager_id": "50000000-0000-0000-0000-000000000011",
"staff_count": 12,
"equipment": [
"30000000-0000-0000-0000-000000000001"
],
"shared_ingredients": [
"10000000-0000-0000-0000-000000000001",
"10000000-0000-0000-0000-000000000002",
"20000000-0000-0000-0000-000000000001"
],
"shared_recipes": [
"30000000-0000-0000-0000-000000000001"
]
},
"local_inventory": [
{
"id": "10000000-0000-0000-0000-000000001501",
"tenant_id": "A0000000-0000-4000-a000-000000000001",
"ingredient_id": "10000000-0000-0000-0000-000000000001",
"quantity": 150.0,
"location": "Madrid Centro - Storage",
"production_stage": "RAW_MATERIAL",
"quality_status": "APPROVED",
"expiration_date": "2025-02-15T00:00:00Z",
"supplier_id": "40000000-0000-0000-0000-000000000001",
"batch_number": "MAD-HAR-20250115-001",
"created_at": "2025-01-15T06:00:00Z",
"enterprise_shared": true,
"source_location": "Central Warehouse - Madrid"
},
{
"id": "20000000-0000-0000-0000-000000001501",
"tenant_id": "A0000000-0000-4000-a000-000000000001",
"ingredient_id": "20000000-0000-0000-0000-000000000001",
"quantity": 50.0,
"location": "Madrid Centro - Display",
"production_stage": "FINISHED_PRODUCT",
"quality_status": "APPROVED",
"expiration_date": "2025-01-16T06:00:00Z",
"supplier_id": null,
"batch_number": "MAD-BAG-20250115-001",
"created_at": "2025-01-15T06:00:00Z",
"enterprise_shared": true,
"source_location": "Central Production Facility - Madrid"
}
],
"local_sales": [
{
"id": "70000000-0000-0000-0000-000000003001",
"tenant_id": "A0000000-0000-4000-a000-000000000001",
"sale_date": "2025-01-15T08:00:00Z",
"product_id": "20000000-0000-0000-0000-000000000001",
"quantity_sold": 25.0,
"unit_price": 2.75,
"total_revenue": 68.75,
"sales_channel": "RETAIL",
"created_at": "2025-01-15T06:00:00Z",
"notes": "Venta local en Madrid Centro",
"enterprise_location_sale": true,
"parent_order_id": "60000000-0000-0000-0000-000000002001"
}
]
}

View File

@@ -0,0 +1,314 @@
{
"location": {
"id": "V0000000-0000-4000-a000-000000000001",
"parent_tenant_id": "80000000-0000-4000-a000-000000000001",
"name": "Valencia Ruzafa",
"location_code": "ENT-VLC-001",
"city": "Valencia",
"zone": "Ruzafa",
"address": "Calle Sueca, 42",
"postal_code": "46006",
"country": "España",
"latitude": 39.4623,
"longitude": -0.3645,
"status": "ACTIVE",
"opening_hours": "07:00-21:00",
"daily_capacity": 1600,
"storage_capacity_kg": 5500,
"created_at": "2025-01-15T06:00:00Z",
"enterprise_location": true,
"location_type": "retail_and_wholesale",
"manager_id": "50000000-0000-0000-0000-000000000013",
"staff_count": 13,
"equipment": [
"30000000-0000-0000-0000-000000000003"
],
"shared_ingredients": [
"10000000-0000-0000-0000-000000000001",
"10000000-0000-0000-0000-000000000002",
"10000000-0000-0000-0000-000000000004",
"20000000-0000-0000-0000-000000000001",
"20000000-0000-0000-0000-000000000003"
],
"shared_recipes": [
"30000000-0000-0000-0000-000000000001",
"30000000-0000-0000-0000-000000000003"
]
},
"local_inventory": [
{
"id": "10000000-0000-0000-0000-000000003001",
"tenant_id": "V0000000-0000-4000-a000-000000000001",
"ingredient_id": "10000000-0000-0000-0000-000000000001",
"quantity": 165.0,
"location": "Valencia Ruzafa - Storage",
"production_stage": "RAW_MATERIAL",
"quality_status": "APPROVED",
"expiration_date": "2025-02-18T00:00:00Z",
"supplier_id": "40000000-0000-0000-0000-000000000001",
"batch_number": "VLC-HAR-20250115-001",
"created_at": "2025-01-15T06:00:00Z",
"enterprise_shared": true,
"source_location": "Central Warehouse - Valencia"
},
{
"id": "10000000-0000-0000-0000-000000003002",
"tenant_id": "V0000000-0000-4000-a000-000000000001",
"ingredient_id": "10000000-0000-0000-0000-000000000002",
"quantity": 38.0,
"location": "Valencia Ruzafa - Cold Storage",
"production_stage": "RAW_MATERIAL",
"quality_status": "APPROVED",
"expiration_date": "2025-01-23T00:00:00Z",
"supplier_id": "40000000-0000-0000-0000-000000000002",
"batch_number": "VLC-MAN-20250115-001",
"created_at": "2025-01-15T06:00:00Z",
"enterprise_shared": true,
"source_location": "Central Warehouse - Valencia"
},
{
"id": "10000000-0000-0000-0000-000000003003",
"tenant_id": "V0000000-0000-4000-a000-000000000001",
"ingredient_id": "10000000-0000-0000-0000-000000000004",
"quantity": 12.0,
"location": "Valencia Ruzafa - Dry Storage",
"production_stage": "RAW_MATERIAL",
"quality_status": "APPROVED",
"expiration_date": "2026-01-15T00:00:00Z",
"supplier_id": "40000000-0000-0000-0000-000000000003",
"batch_number": "VLC-SAL-20250115-001",
"created_at": "2025-01-15T06:00:00Z",
"enterprise_shared": true,
"source_location": "Central Warehouse - Valencia"
},
{
"id": "20000000-0000-0000-0000-000000003001",
"tenant_id": "V0000000-0000-4000-a000-000000000001",
"ingredient_id": "20000000-0000-0000-0000-000000000001",
"quantity": 58.0,
"location": "Valencia Ruzafa - Display",
"production_stage": "FINISHED_PRODUCT",
"quality_status": "APPROVED",
"expiration_date": "2025-01-16T06:00:00Z",
"supplier_id": null,
"batch_number": "VLC-BAG-20250115-001",
"created_at": "2025-01-15T06:00:00Z",
"enterprise_shared": true,
"source_location": "Central Production Facility - Valencia"
},
{
"id": "20000000-0000-0000-0000-000000003002",
"tenant_id": "V0000000-0000-4000-a000-000000000001",
"ingredient_id": "20000000-0000-0000-0000-000000000003",
"quantity": 22.0,
"location": "Valencia Ruzafa - Display",
"production_stage": "FINISHED_PRODUCT",
"quality_status": "APPROVED",
"expiration_date": "2025-01-17T06:00:00Z",
"supplier_id": null,
"batch_number": "VLC-PAN-20250115-001",
"created_at": "2025-01-15T06:00:00Z",
"enterprise_shared": true,
"source_location": "Central Production Facility - Valencia"
}
],
"local_sales": [
{
"id": "70000000-0000-0000-0000-000000005001",
"tenant_id": "V0000000-0000-4000-a000-000000000001",
"sale_date": "2025-01-15T08:00:00Z",
"product_id": "20000000-0000-0000-0000-000000000001",
"quantity_sold": 32.0,
"unit_price": 2.70,
"total_revenue": 86.40,
"sales_channel": "RETAIL",
"created_at": "2025-01-15T06:00:00Z",
"notes": "Venta local en Valencia Ruzafa - mañana",
"enterprise_location_sale": true,
"parent_order_id": "60000000-0000-0000-0000-000000004001"
},
{
"id": "70000000-0000-0000-0000-000000005002",
"tenant_id": "V0000000-0000-4000-a000-000000000001",
"sale_date": "2025-01-15T10:00:00Z",
"product_id": "20000000-0000-0000-0000-000000000003",
"quantity_sold": 15.0,
"unit_price": 2.40,
"total_revenue": 36.00,
"sales_channel": "RETAIL",
"created_at": "2025-01-15T06:00:00Z",
"notes": "Venta de pan de campo en Valencia",
"enterprise_location_sale": true,
"parent_order_id": "60000000-0000-0000-0000-000000004002"
},
{
"id": "70000000-0000-0000-0000-000000005003",
"tenant_id": "V0000000-0000-4000-a000-000000000001",
"sale_date": "2025-01-14T18:30:00Z",
"product_id": "20000000-0000-0000-0000-000000000001",
"quantity_sold": 24.0,
"unit_price": 2.70,
"total_revenue": 64.80,
"sales_channel": "RETAIL",
"created_at": "2025-01-15T06:00:00Z",
"notes": "Venta de tarde en Valencia Ruzafa",
"enterprise_location_sale": true,
"parent_order_id": "60000000-0000-0000-0000-000000004003"
}
],
"local_orders": [
{
"id": "60000000-0000-0000-0000-000000004001",
"tenant_id": "V0000000-0000-4000-a000-000000000001",
"order_number": "ORD-VLC-RUZ-20250115-001",
"customer_name": "Mercado de Ruzafa - Puesto 12",
"customer_email": "puesto12@mercadoruzafa.es",
"order_date": "2025-01-15T06:30:00Z",
"delivery_date": "2025-01-15T08:00:00Z",
"status": "DELIVERED",
"total_amount": 86.40,
"created_at": "2025-01-15T06:00:00Z",
"notes": "Pedido matinal para puesto de mercado",
"enterprise_location_order": true
},
{
"id": "60000000-0000-0000-0000-000000004002",
"tenant_id": "V0000000-0000-4000-a000-000000000001",
"order_number": "ORD-VLC-RUZ-20250115-002",
"customer_name": "Bar La Pilareta",
"customer_email": "pedidos@lapilareta.es",
"order_date": "2025-01-15T07:00:00Z",
"delivery_date": "2025-01-15T10:00:00Z",
"status": "DELIVERED",
"total_amount": 36.00,
"created_at": "2025-01-15T06:00:00Z",
"notes": "Pan de campo para bar tradicional",
"enterprise_location_order": true
},
{
"id": "60000000-0000-0000-0000-000000004003",
"tenant_id": "V0000000-0000-4000-a000-000000000001",
"order_number": "ORD-VLC-RUZ-20250114-003",
"customer_name": "Restaurante La Riuà",
"customer_email": "compras@lariua.com",
"order_date": "2025-01-14T16:00:00Z",
"delivery_date": "2025-01-14T18:30:00Z",
"status": "DELIVERED",
"total_amount": 64.80,
"created_at": "2025-01-15T06:00:00Z",
"notes": "Pedido de tarde para restaurante",
"enterprise_location_order": true
},
{
"id": "60000000-0000-0000-0000-000000004004",
"tenant_id": "V0000000-0000-4000-a000-000000000001",
"order_number": "ORD-VLC-RUZ-20250116-004",
"customer_name": "Hotel Sorolla Palace",
"customer_email": "aprovisionamiento@sorollapalace.com",
"order_date": "2025-01-15T11:00:00Z",
"delivery_date": "2025-01-16T07:00:00Z",
"status": "CONFIRMED",
"total_amount": 125.50,
"created_at": "2025-01-15T06:00:00Z",
"notes": "Pedido para desayuno buffet del hotel - entrega mañana",
"enterprise_location_order": true
}
],
"local_production_batches": [
{
"id": "40000000-0000-0000-0000-000000003001",
"tenant_id": "V0000000-0000-4000-a000-000000000001",
"batch_number": "VLC-BATCH-20250115-001",
"recipe_id": "30000000-0000-0000-0000-000000000001",
"product_id": "20000000-0000-0000-0000-000000000001",
"planned_quantity": 90.0,
"actual_quantity": 88.0,
"status": "COMPLETED",
"planned_start_time": "2025-01-15T03:30:00Z",
"actual_start_time": "2025-01-15T03:35:00Z",
"planned_end_time": "2025-01-15T05:30:00Z",
"actual_end_time": "2025-01-15T05:40:00Z",
"equipment_id": "30000000-0000-0000-0000-000000000003",
"operator_id": "50000000-0000-0000-0000-000000000013",
"created_at": "2025-01-15T06:00:00Z",
"notes": "Producción matinal de baguettes en Valencia",
"enterprise_location_production": true
},
{
"id": "40000000-0000-0000-0000-000000003002",
"tenant_id": "V0000000-0000-4000-a000-000000000001",
"batch_number": "VLC-BATCH-20250115-002",
"recipe_id": "30000000-0000-0000-0000-000000000003",
"product_id": "20000000-0000-0000-0000-000000000003",
"planned_quantity": 40.0,
"actual_quantity": 40.0,
"status": "COMPLETED",
"planned_start_time": "2025-01-15T04:00:00Z",
"actual_start_time": "2025-01-15T04:00:00Z",
"planned_end_time": "2025-01-15T06:30:00Z",
"actual_end_time": "2025-01-15T06:25:00Z",
"equipment_id": "30000000-0000-0000-0000-000000000003",
"operator_id": "50000000-0000-0000-0000-000000000014",
"created_at": "2025-01-15T06:00:00Z",
"notes": "Producción de pan de campo completada",
"enterprise_location_production": true
},
{
"id": "40000000-0000-0000-0000-000000003003",
"tenant_id": "V0000000-0000-4000-a000-000000000001",
"batch_number": "VLC-BATCH-20250116-003",
"recipe_id": "30000000-0000-0000-0000-000000000001",
"product_id": "20000000-0000-0000-0000-000000000001",
"planned_quantity": 120.0,
"actual_quantity": null,
"status": "SCHEDULED",
"planned_start_time": "2025-01-16T03:30:00Z",
"actual_start_time": null,
"planned_end_time": "2025-01-16T05:30:00Z",
"actual_end_time": null,
"equipment_id": "30000000-0000-0000-0000-000000000003",
"operator_id": "50000000-0000-0000-0000-000000000013",
"created_at": "2025-01-15T06:00:00Z",
"notes": "Lote programado para mañana - pedido de hotel",
"enterprise_location_production": true
}
],
"local_forecasts": [
{
"id": "80000000-0000-0000-0000-000000003001",
"tenant_id": "V0000000-0000-4000-a000-000000000001",
"product_id": "20000000-0000-0000-0000-000000000001",
"forecast_date": "2025-01-16T00:00:00Z",
"predicted_quantity": 78.0,
"confidence_score": 0.90,
"forecast_horizon_days": 1,
"created_at": "2025-01-15T06:00:00Z",
"notes": "Previsión de demanda diaria para Valencia Ruzafa",
"enterprise_location_forecast": true
},
{
"id": "80000000-0000-0000-0000-000000003002",
"tenant_id": "V0000000-0000-4000-a000-000000000001",
"product_id": "20000000-0000-0000-0000-000000000003",
"forecast_date": "2025-01-16T00:00:00Z",
"predicted_quantity": 35.0,
"confidence_score": 0.87,
"forecast_horizon_days": 1,
"created_at": "2025-01-15T06:00:00Z",
"notes": "Previsión de pan de campo para mañana",
"enterprise_location_forecast": true
},
{
"id": "80000000-0000-0000-0000-000000003003",
"tenant_id": "V0000000-0000-4000-a000-000000000001",
"product_id": "20000000-0000-0000-0000-000000000001",
"forecast_date": "2025-01-17T00:00:00Z",
"predicted_quantity": 95.0,
"confidence_score": 0.93,
"forecast_horizon_days": 2,
"created_at": "2025-01-15T06:00:00Z",
"notes": "Previsión fin de semana - aumento de demanda esperado",
"enterprise_location_forecast": true
}
]
}

View File

@@ -0,0 +1,55 @@
{
"tenant": {
"id": "80000000-0000-4000-a000-000000000001",
"name": "Panadería Central - Demo Enterprise",
"subscription_tier": "enterprise",
"tenant_type": "parent",
"email": "demo.enterprise@panaderiacentral.com",
"subdomain": "demo-central",
"description": "Enterprise tier demo tenant with multiple locations",
"created_at": "2025-01-15T06:00:00Z",
"enterprise_features": [
"multi_location_management",
"centralized_inventory",
"advanced_analytics",
"custom_reporting",
"api_access",
"priority_support"
]
},
"children": [
{
"id": "A0000000-0000-4000-a000-000000000001",
"name": "Madrid Centro",
"location": {
"city": "Madrid",
"zone": "Centro",
"latitude": 40.4168,
"longitude": -3.7038
},
"description": "Central Madrid location"
},
{
"id": "B0000000-0000-4000-a000-000000000001",
"name": "Barcelona Gràcia",
"location": {
"city": "Barcelona",
"zone": "Gràcia",
"latitude": 41.4036,
"longitude": 2.1561
},
"description": "Barcelona Gràcia district location"
},
{
"id": "C0000000-0000-4000-a000-000000000001",
"name": "Valencia Ruzafa",
"location": {
"city": "Valencia",
"zone": "Ruzafa",
"latitude": 39.4623,
"longitude": -0.3645
},
"description": "Valencia Ruzafa neighborhood location"
}
]
}

View File

@@ -0,0 +1,132 @@
{
"users": [
{
"id": "d2e3f4a5-b6c7-48d9-e0f1-a2b3c4d5e6f7",
"tenant_id": "80000000-0000-4000-a000-000000000001",
"name": "Carlos Martínez Ruiz",
"email": "carlos.martinez@panaderiacentral.com",
"role": "owner",
"position": "CEO",
"phone": "+34 912 345 678",
"status": "ACTIVE",
"created_at": "2025-01-15T06:00:00Z",
"last_login": "2025-01-15T06:00:00Z",
"permissions": [
"all_access",
"enterprise_admin",
"financial_reports",
"multi_location_management"
]
},
{
"id": "50000000-0000-0000-0000-000000000011",
"tenant_id": "80000000-0000-4000-a000-000000000001",
"name": "Roberto Producción",
"email": "roberto.produccion@panaderiacentral.com",
"role": "production_manager",
"position": "Head of Production",
"phone": "+34 913 456 789",
"status": "ACTIVE",
"created_at": "2025-01-15T06:00:00Z",
"last_login": "2025-01-15T06:00:00Z",
"permissions": [
"production_management",
"inventory_management",
"quality_control",
"multi_location_view"
]
},
{
"id": "50000000-0000-0000-0000-000000000012",
"tenant_id": "80000000-0000-4000-a000-000000000001",
"name": "Marta Calidad",
"email": "marta.calidad@panaderiacentral.com",
"role": "quality_control",
"position": "Quality Assurance Manager",
"phone": "+34 914 567 890",
"status": "ACTIVE",
"created_at": "2025-01-15T06:00:00Z",
"last_login": "2025-01-15T06:00:00Z",
"permissions": [
"quality_control",
"compliance_management",
"audit_access",
"multi_location_view"
]
},
{
"id": "50000000-0000-0000-0000-000000000013",
"tenant_id": "80000000-0000-4000-a000-000000000001",
"name": "Javier Logística",
"email": "javier.logistica@panaderiacentral.com",
"role": "logistics",
"position": "Logistics Coordinator",
"phone": "+34 915 678 901",
"status": "ACTIVE",
"created_at": "2025-01-15T06:00:00Z",
"last_login": "2025-01-15T06:00:00Z",
"permissions": [
"logistics_management",
"delivery_scheduling",
"fleet_management",
"multi_location_view"
]
},
{
"id": "50000000-0000-0000-0000-000000000014",
"tenant_id": "80000000-0000-4000-a000-000000000001",
"name": "Carmen Ventas",
"email": "carmen.ventas@panaderiacentral.com",
"role": "sales",
"position": "Sales Director",
"phone": "+34 916 789 012",
"status": "ACTIVE",
"created_at": "2025-01-15T06:00:00Z",
"last_login": "2025-01-15T06:00:00Z",
"permissions": [
"sales_management",
"customer_relations",
"contract_management",
"multi_location_view",
"enterprise_reports"
]
},
{
"id": "50000000-0000-0000-0000-000000000015",
"tenant_id": "80000000-0000-4000-a000-000000000001",
"name": "Luis Compras",
"email": "luis.compras@panaderiacentral.com",
"role": "procurement",
"position": "Procurement Manager",
"phone": "+34 917 890 123",
"status": "ACTIVE",
"created_at": "2025-01-15T06:00:00Z",
"last_login": "2025-01-15T06:00:00Z",
"permissions": [
"procurement_management",
"supplier_relations",
"inventory_planning",
"multi_location_view",
"enterprise_reports"
]
},
{
"id": "50000000-0000-0000-0000-000000000016",
"tenant_id": "80000000-0000-4000-a000-000000000001",
"name": "Miguel Mantenimiento",
"email": "miguel.mantenimiento@panaderiacentral.com",
"role": "maintenance",
"position": "Maintenance Supervisor",
"phone": "+34 918 901 234",
"status": "ACTIVE",
"created_at": "2025-01-15T06:00:00Z",
"last_login": "2025-01-15T06:00:00Z",
"permissions": [
"equipment_maintenance",
"facility_management",
"iot_monitoring",
"multi_location_view"
]
}
]
}

View File

@@ -0,0 +1,114 @@
{
"recipes": [
{
"id": "30000000-0000-0000-0000-000000000001",
"tenant_id": "80000000-0000-4000-a000-000000000001",
"name": "Baguette Premium - Enterprise Standard",
"recipe_code": "ENT-BAG-STD-001",
"version": "2.0",
"finished_product_id": "20000000-0000-0000-0000-000000000001",
"description": "Receta estándar de baguette premium para todas las ubicaciones enterprise. Optimizada para producción masiva con calidad consistente.",
"category": "Panes",
"cuisine_type": "Francesa",
"difficulty_level": 2,
"yield_quantity": 50.0,
"yield_unit": "units",
"prep_time_minutes": 30,
"cook_time_minutes": 25,
"total_time_minutes": 180,
"rest_time_minutes": 120,
"estimated_cost_per_unit": 1.80,
"last_calculated_cost": 1.75,
"cost_calculation_date": "2025-01-14T00:00:00Z",
"target_margin_percentage": 65.0,
"suggested_selling_price": 2.95,
"status": "APPROVED",
"is_active": true,
"is_standardized": true,
"created_at": "2025-01-15T06:00:00Z",
"updated_at": "2025-01-15T06:00:00Z",
"created_by": "50000000-0000-0000-0000-000000000011",
"enterprise_standard": true,
"applicable_locations": ["Madrid Centro", "Barcelona Gràcia", "Valencia Ruzafa"],
"instructions": {
"steps": [
{
"step": 1,
"title": "Amasado Estándar",
"description": "Mezclar harina, agua, sal y levadura en amasadora espiral durante 20 minutos. Temperatura de masa objetivo: 24°C.",
"duration_minutes": 20
},
{
"step": 2,
"title": "Fermentación Controlada",
"description": "Fermentar en cámara a 26°C con 75% humedad durante 90 minutos.",
"duration_minutes": 90
},
{
"step": 3,
"title": "División y Formado",
"description": "Dividir en piezas de 280g y formar baguettes con equipo automático.",
"duration_minutes": 25
},
{
"step": 4,
"title": "Fermentación Final",
"description": "Fermentación final en cámara a 28°C con 80% humedad durante 60 minutos.",
"duration_minutes": 60
},
{
"step": 5,
"title": "Cocción",
"description": "Hornear a 240°C con vapor durante 25 minutos en horno rotativo.",
"duration_minutes": 25
}
],
"quality_checks": [
{
"check": "Temperatura de masa",
"target": "24°C",
"tolerance": "±1°C"
},
{
"check": "Peso final",
"target": "280g",
"tolerance": "±5g"
},
{
"check": "Color de corteza",
"target": "Dorado intenso"
}
]
}
}
],
"recipe_ingredients": [
{
"id": "30000000-0000-0000-0000-000000001001",
"tenant_id": "80000000-0000-4000-a000-000000000001",
"recipe_id": "30000000-0000-0000-0000-000000000001",
"ingredient_id": "10000000-0000-0000-0000-000000000001",
"quantity": 14.0,
"unit": "kilograms",
"substitution_options": [
"10000000-0000-0000-0000-000000000002"
],
"is_essential": true,
"created_at": "2025-01-15T06:00:00Z",
"enterprise_standard": true
},
{
"id": "30000000-0000-0000-0000-000000001002",
"tenant_id": "80000000-0000-4000-a000-000000000001",
"recipe_id": "30000000-0000-0000-0000-000000000001",
"ingredient_id": "10000000-0000-0000-0000-000000000002",
"quantity": 0.5,
"unit": "kilograms",
"substitution_options": [],
"is_essential": false,
"created_at": "2025-01-15T06:00:00Z",
"enterprise_standard": true,
"notes": "Solo para versión premium"
}
]
}

View File

@@ -0,0 +1,63 @@
{
"suppliers": [
{
"id": "40000000-0000-0000-0000-000000000001",
"tenant_id": "80000000-0000-4000-a000-000000000001",
"name": "Molinos San José - Enterprise Division",
"supplier_code": "SUP-HARINA-ENT-001",
"business_name": "Molinos San José S.A. - Enterprise Division",
"tax_id": "A12345678",
"contact_person": "José Martínez",
"email": "enterprise@molinossanjose.es",
"phone": "+34 945 123 456",
"address": "Pol. Industrial Norte, Calle 5",
"city": "Vitoria-Gasteiz",
"postal_code": "01000",
"country": "España",
"status": "ACTIVE",
"rating": 4.8,
"payment_terms": "60_DAYS",
"minimum_order_amount": 1000.0,
"lead_time_days": 2,
"contract_start_date": "2024-01-01T00:00:00Z",
"contract_end_date": "2025-12-31T23:59:59Z",
"created_at": "2025-01-15T06:00:00Z",
"specialties": ["flour", "bread_improvers", "enterprise_supply"],
"delivery_areas": ["Madrid", "Barcelona", "Valencia", "Basque Country"],
"enterprise_contract": true,
"contract_type": "national_supply_agreement",
"annual_volume_commitment": 50000.0,
"preferred_supplier": true
},
{
"id": "40000000-0000-0000-0000-000000000002",
"tenant_id": "80000000-0000-4000-a000-000000000001",
"name": "Lescure - Enterprise Division",
"supplier_code": "SUP-LACTEO-ENT-001",
"business_name": "Lescure S.A. - Enterprise Division",
"tax_id": "B87654321",
"contact_person": "María López",
"email": "enterprise@lescure.com",
"phone": "+34 943 234 567",
"address": "Calle Urola, 12",
"city": "Donostia-San Sebastián",
"postal_code": "20001",
"country": "España",
"status": "ACTIVE",
"rating": 4.9,
"payment_terms": "30_DAYS",
"minimum_order_amount": 500.0,
"lead_time_days": 1,
"contract_start_date": "2024-03-15T00:00:00Z",
"contract_end_date": "2025-12-31T23:59:59Z",
"created_at": "2025-01-15T06:00:00Z",
"specialties": ["butter", "cream", "enterprise_dairy"],
"delivery_areas": ["Madrid", "Barcelona", "Valencia", "Basque Country"],
"enterprise_contract": true,
"contract_type": "premium_dairy_supply",
"annual_volume_commitment": 12000.0,
"preferred_supplier": true,
"organic_certified": true
}
]
}

View File

@@ -0,0 +1,87 @@
{
"equipment": [
{
"id": "30000000-0000-0000-0000-000000000001",
"tenant_id": "80000000-0000-4000-a000-000000000001",
"name": "Horno Rotativo Enterprise - Línea 1",
"type": "oven",
"model": "Sveba Dahlen DC-32 Enterprise",
"serial_number": "SD-ENT-2023-001",
"location": "Central Production Facility - Madrid",
"manufacturer": "Sveba Dahlen",
"firmware_version": "4.2.1",
"status": "OPERATIONAL",
"install_date": "2024-06-15T00:00:00Z",
"last_maintenance_date": "2025-01-10T00:00:00Z",
"next_maintenance_date": "2025-04-10T00:00:00Z",
"maintenance_interval_days": 90,
"efficiency_percentage": 95.0,
"uptime_percentage": 97.0,
"energy_usage_kwh": 85.0,
"power_kw": 90.0,
"capacity": 32.0,
"weight_kg": 2500.0,
"current_temperature": 230.0,
"target_temperature": 230.0,
"iot_enabled": true,
"iot_protocol": "MQTT",
"iot_endpoint": "iot.panaderiacentral.com",
"iot_port": 1883,
"iot_connection_status": "CONNECTED",
"iot_last_connected": "2025-01-15T05:45:00Z",
"supports_realtime": true,
"poll_interval_seconds": 10,
"temperature_zones": 4,
"supports_humidity": true,
"supports_energy_monitoring": true,
"supports_remote_control": true,
"is_active": true,
"notes": "Equipo principal para producción masiva",
"created_at": "2025-01-15T06:00:00Z",
"updated_at": "2025-01-15T06:00:00Z",
"enterprise_asset": true,
"shared_locations": ["Madrid Centro", "Barcelona Gràcia", "Valencia Ruzafa"]
}
],
"production_batches": [
{
"id": "30000000-0000-0000-0000-000000002001",
"tenant_id": "80000000-0000-4000-a000-000000000001",
"batch_number": "ENT-BAG-20250115-001",
"product_id": "20000000-0000-0000-0000-000000000001",
"recipe_id": "30000000-0000-0000-0000-000000000001",
"equipment_id": "30000000-0000-0000-0000-000000000001",
"status": "IN_PROGRESS",
"start_time": "2025-01-15T06:30:00Z",
"end_time": "2025-01-15T10:30:00Z",
"planned_quantity": 250.0,
"actual_quantity": 200.0,
"waste_quantity": 5.0,
"quality_status": "PENDING",
"production_line": "Linea 1 - Baguettes",
"shift": "Morning",
"supervisor_id": "50000000-0000-0000-0000-000000000011",
"created_at": "2025-01-15T06:00:00Z",
"updated_at": "2025-01-15T06:00:00Z",
"enterprise_batch": true,
"production_facility": "Central Production Facility - Madrid",
"distribution_plan": [
{
"location": "Madrid Centro",
"quantity": 100.0,
"delivery_time": "2025-01-15T12:00:00Z"
},
{
"location": "Barcelona Gràcia",
"quantity": 60.0,
"delivery_time": "2025-01-15T14:00:00Z"
},
{
"location": "Valencia Ruzafa",
"quantity": 40.0,
"delivery_time": "2025-01-15T16:00:00Z"
}
]
}
]
}

View File

@@ -0,0 +1,62 @@
{
"procurement_plans": [],
"procurement_requirements": [],
"purchase_orders": [
{
"id": "50000000-0000-0000-0000-000000002001",
"tenant_id": "80000000-0000-4000-a000-000000000001",
"po_number": "ENT-PO-20250115-001",
"supplier_id": "40000000-0000-0000-0000-000000000001",
"order_date": "2025-01-14T10:00:00Z",
"expected_delivery_date": "2025-01-16T10:00:00Z",
"status": "pending_approval",
"total_amount": 650.00,
"created_at": "2025-01-15T06:00:00Z",
"notes": "Pedido semanal de harina para producción central",
"enterprise_order": true,
"contract_reference": "ENT-HARINA-2024-001",
"payment_terms": "60_DAYS",
"delivery_location": "Central Warehouse - Madrid",
"incoterms": "DAP"
}
],
"purchase_order_items": [
{
"id": "50000000-0000-0000-0000-000000002101",
"tenant_id": "80000000-0000-4000-a000-000000000001",
"po_id": "50000000-0000-0000-0000-000000002001",
"ingredient_id": "10000000-0000-0000-0000-000000000001",
"quantity": 800.0,
"unit_price": 0.80,
"total_price": 640.00,
"created_at": "2025-01-15T06:00:00Z",
"enterprise_item": true,
"delivery_schedule": [
{
"delivery_date": "2025-01-16T10:00:00Z",
"quantity": 800.0,
"location": "Central Warehouse - Madrid"
}
]
},
{
"id": "50000000-0000-0000-0000-000000002102",
"tenant_id": "80000000-0000-4000-a000-000000000001",
"po_id": "50000000-0000-0000-0000-000000002001",
"ingredient_id": "10000000-0000-0000-0000-000000000002",
"quantity": 12.5,
"unit_price": 4.00,
"total_price": 50.00,
"created_at": "2025-01-15T06:00:00Z",
"enterprise_item": true,
"delivery_schedule": [
{
"delivery_date": "2025-01-16T10:00:00Z",
"quantity": 12.5,
"location": "Central Warehouse - Madrid"
}
]
}
],
"deliveries": []
}

View File

@@ -0,0 +1,112 @@
{
"customers": [
{
"id": "60000000-0000-0000-0000-000000002001",
"tenant_id": "80000000-0000-4000-a000-000000000001",
"customer_code": "ENT-CUST-001",
"name": "Grupo Hotelero Mediterráneo",
"customer_type": "ENTERPRISE",
"contact_person": "Luis Gómez",
"email": "compras@grupohotelmed.com",
"phone": "+34 912 345 678",
"address": "Calle Gran Vía, 45",
"city": "Madrid",
"postal_code": "28013",
"country": "España",
"status": "ACTIVE",
"total_orders": 125,
"total_spent": 18500.75,
"created_at": "2025-01-15T06:00:00Z",
"notes": "Cadena hotelera con 15 ubicaciones en España",
"contract_type": "national_supply_agreement",
"annual_volume_commitment": 25000.0,
"enterprise_customer": true,
"delivery_locations": [
"Madrid Centro",
"Barcelona Gràcia",
"Valencia Ruzafa",
"Sevilla Santa Cruz",
"Málaga Centro"
]
}
],
"customer_orders": [
{
"id": "60000000-0000-0000-0000-000000002001",
"tenant_id": "80000000-0000-4000-a000-000000000001",
"customer_id": "60000000-0000-0000-0000-000000002001",
"order_number": "ENT-ORD-20250115-001",
"order_date": "2025-01-14T11:00:00Z",
"delivery_date": "2025-01-15T09:00:00Z",
"status": "DELIVERED",
"total_amount": 650.50,
"created_at": "2025-01-15T06:00:00Z",
"notes": "Pedido semanal para 5 hoteles",
"enterprise_order": true,
"contract_reference": "ENT-HOTEL-2024-001",
"delivery_locations": [
{
"location": "Hotel Mediterráneo Madrid",
"quantity": 50.0,
"delivery_time": "2025-01-15T09:00:00Z"
},
{
"location": "Hotel Mediterráneo Barcelona",
"quantity": 30.0,
"delivery_time": "2025-01-15T10:00:00Z"
},
{
"location": "Hotel Mediterráneo Valencia",
"quantity": 20.0,
"delivery_time": "2025-01-15T11:00:00Z"
}
]
}
],
"order_items": [
{
"id": "60000000-0000-0000-0000-000000002101",
"tenant_id": "80000000-0000-4000-a000-000000000001",
"order_id": "60000000-0000-0000-0000-000000002001",
"product_id": "20000000-0000-0000-0000-000000000001",
"quantity": 100.0,
"unit_price": 2.50,
"total_price": 250.00,
"created_at": "2025-01-15T06:00:00Z",
"enterprise_item": true
},
{
"id": "60000000-0000-0000-0000-000000002102",
"tenant_id": "80000000-0000-4000-a000-000000000001",
"order_id": "60000000-0000-0000-0000-000000002001",
"product_id": "20000000-0000-0000-0000-000000000002",
"quantity": 25.0,
"unit_price": 3.75,
"total_price": 93.75,
"created_at": "2025-01-15T06:00:00Z",
"enterprise_item": true
},
{
"id": "60000000-0000-0000-0000-000000002103",
"tenant_id": "80000000-0000-4000-a000-000000000001",
"order_id": "60000000-0000-0000-0000-000000002001",
"product_id": "20000000-0000-0000-0000-000000000003",
"quantity": 20.0,
"unit_price": 2.25,
"total_price": 45.00,
"created_at": "2025-01-15T06:00:00Z",
"enterprise_item": true
},
{
"id": "60000000-0000-0000-0000-000000002104",
"tenant_id": "80000000-0000-4000-a000-000000000001",
"order_id": "60000000-0000-0000-0000-000000002001",
"product_id": "20000000-0000-0000-0000-000000000004",
"quantity": 15.0,
"unit_price": 1.75,
"total_price": 26.25,
"created_at": "2025-01-15T06:00:00Z",
"enterprise_item": true
}
]
}

View File

@@ -0,0 +1,69 @@
{
"sales_data": [
{
"id": "70000000-0000-0000-0000-000000002001",
"tenant_id": "80000000-0000-4000-a000-000000000001",
"sale_date": "2025-01-14T10:00:00Z",
"product_id": "20000000-0000-0000-0000-000000000001",
"quantity_sold": 250.0,
"unit_price": 2.50,
"total_revenue": 625.00,
"sales_channel": "ENTERPRISE",
"created_at": "2025-01-15T06:00:00Z",
"notes": "Venta a Grupo Hotelero Mediterráneo",
"enterprise_sale": true,
"customer_id": "60000000-0000-0000-0000-000000002001",
"contract_reference": "ENT-HOTEL-2024-001",
"delivery_locations": [
"Madrid Centro",
"Barcelona Gràcia",
"Valencia Ruzafa"
]
},
{
"id": "70000000-0000-0000-0000-000000002002",
"tenant_id": "80000000-0000-4000-a000-000000000001",
"sale_date": "2025-01-14T11:00:00Z",
"product_id": "20000000-0000-0000-0000-000000000002",
"quantity_sold": 50.0,
"unit_price": 3.75,
"total_revenue": 187.50,
"sales_channel": "ENTERPRISE",
"created_at": "2025-01-15T06:00:00Z",
"notes": "Venta a Grupo Hotelero Mediterráneo",
"enterprise_sale": true,
"customer_id": "60000000-0000-0000-0000-000000002001",
"contract_reference": "ENT-HOTEL-2024-001"
},
{
"id": "70000000-0000-0000-0000-000000002003",
"tenant_id": "80000000-0000-4000-a000-000000000001",
"sale_date": "2025-01-14T12:00:00Z",
"product_id": "20000000-0000-0000-0000-000000000003",
"quantity_sold": 40.0,
"unit_price": 2.25,
"total_revenue": 90.00,
"sales_channel": "ENTERPRISE",
"created_at": "2025-01-15T06:00:00Z",
"notes": "Venta a Grupo Hotelero Mediterráneo",
"enterprise_sale": true,
"customer_id": "60000000-0000-0000-0000-000000002001",
"contract_reference": "ENT-HOTEL-2024-001"
},
{
"id": "70000000-0000-0000-0000-000000002004",
"tenant_id": "80000000-0000-4000-a000-000000000001",
"sale_date": "2025-01-14T15:00:00Z",
"product_id": "20000000-0000-0000-0000-000000000004",
"quantity_sold": 30.0,
"unit_price": 1.75,
"total_revenue": 52.50,
"sales_channel": "ENTERPRISE",
"created_at": "2025-01-15T06:00:00Z",
"notes": "Venta a Grupo Hotelero Mediterráneo",
"enterprise_sale": true,
"customer_id": "60000000-0000-0000-0000-000000002001",
"contract_reference": "ENT-HOTEL-2024-001"
}
]
}

View File

@@ -0,0 +1,80 @@
{
"forecasts": [
{
"id": "80000000-0000-0000-0000-000000002001",
"tenant_id": "80000000-0000-4000-a000-000000000001",
"product_id": "20000000-0000-0000-0000-000000000001",
"forecast_date": "2025-01-16T00:00:00Z",
"predicted_quantity": 300.0,
"confidence_score": 0.95,
"forecast_horizon_days": 1,
"created_at": "2025-01-15T06:00:00Z",
"notes": "Demanda diaria enterprise para 15 hoteles",
"enterprise_forecast": true,
"forecast_type": "contractual_commitment",
"contract_reference": "ENT-HOTEL-2024-001",
"customer_id": "60000000-0000-0000-0000-000000002001",
"delivery_locations": [
"Madrid Centro",
"Barcelona Gràcia",
"Valencia Ruzafa",
"Sevilla Santa Cruz",
"Málaga Centro"
]
},
{
"id": "80000000-0000-0000-0000-000000002002",
"tenant_id": "80000000-0000-4000-a000-000000000001",
"product_id": "20000000-0000-0000-0000-000000000002",
"forecast_date": "2025-01-16T00:00:00Z",
"predicted_quantity": 60.0,
"confidence_score": 0.92,
"forecast_horizon_days": 1,
"created_at": "2025-01-15T06:00:00Z",
"notes": "Demanda diaria enterprise para desayunos",
"enterprise_forecast": true,
"forecast_type": "contractual_commitment",
"contract_reference": "ENT-HOTEL-2024-001",
"customer_id": "60000000-0000-0000-0000-000000002001"
},
{
"id": "80000000-0000-0000-0000-000000002099",
"tenant_id": "80000000-0000-4000-a000-000000000001",
"product_id": "20000000-0000-0000-0000-000000000001",
"forecast_date": "2025-01-17T00:00:00Z",
"predicted_quantity": 450.0,
"confidence_score": 0.98,
"forecast_horizon_days": 2,
"created_at": "2025-01-15T06:00:00Z",
"notes": "Demanda de fin de semana - evento especial",
"enterprise_forecast": true,
"forecast_type": "special_event",
"contract_reference": "ENT-HOTEL-2024-001",
"customer_id": "60000000-0000-0000-0000-000000002001",
"reasoning_data": {
"type": "special_event",
"parameters": {
"event_type": "conference",
"event_name": "Mediterranean Business Conference 2025",
"attendees": 500,
"demand_increase_factor": 1.8
}
}
}
],
"prediction_batches": [
{
"id": "80000000-0000-0000-0000-000000002101",
"tenant_id": "80000000-0000-4000-a000-000000000001",
"batch_id": "ENT-FCST-20250116-001",
"prediction_date": "2025-01-15T06:00:00Z",
"status": "COMPLETED",
"total_forecasts": 3,
"created_at": "2025-01-15T06:00:00Z",
"notes": "Predicción diaria para contratos enterprise",
"enterprise_batch": true,
"forecast_horizon": "48_hours",
"model_used": "enterprise_demand_v2"
}
]
}

View File

@@ -0,0 +1,43 @@
{
"tenant": {
"id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"name": "Panadería Artesana Madrid - Demo",
"subdomain": "demo-artesana",
"email": "demo.professional@panaderiaartesana.com",
"subscription_tier": "professional",
"tenant_type": "standalone",
"is_active": true,
"created_at": "2025-01-15T06:00:00Z",
"updated_at": "2025-01-15T06:00:00Z"
},
"owner": {
"id": "c1a2b3c4-d5e6-47a8-b9c0-d1e2f3a4b5c6",
"name": "María García López",
"email": "maria.garcia@panaderiaartesana.com",
"role": "owner"
},
"subscription": {
"id": "80000000-0000-0000-0000-000000000001",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"plan": "professional",
"status": "active",
"monthly_price": 299.00,
"max_users": 10,
"max_locations": 3,
"max_products": 500,
"features": {
"production_planning": true,
"procurement_management": true,
"inventory_management": true,
"sales_analytics": true,
"multi_location": true,
"advanced_reporting": true,
"api_access": true,
"priority_support": true
},
"trial_ends_at": "2025-02-15T06:00:00Z",
"next_billing_date": "2025-02-01T06:00:00Z",
"created_at": "2025-01-15T06:00:00Z",
"updated_at": "2025-01-15T06:00:00Z"
}
}

View File

@@ -0,0 +1,74 @@
{
"users": [
{
"id": "c1a2b3c4-d5e6-47a8-b9c0-d1e2f3a4b5c6",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"name": "María García López",
"email": "maria.garcia@panaderiaartesana.com",
"role": "owner",
"is_active": true,
"created_at": "2025-01-15T06:00:00Z",
"updated_at": "2025-01-15T06:00:00Z"
},
{
"id": "50000000-0000-0000-0000-000000000001",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"name": "Juan Panadero",
"email": "juan.panadero@panaderiaartesana.com",
"role": "baker",
"is_active": true,
"created_at": "2025-01-15T06:00:00Z",
"updated_at": "2025-01-15T06:00:00Z"
},
{
"id": "50000000-0000-0000-0000-000000000002",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"name": "Ana Ventas",
"email": "ana.ventas@panaderiaartesana.com",
"role": "sales",
"is_active": true,
"created_at": "2025-01-15T06:00:00Z",
"updated_at": "2025-01-15T06:00:00Z"
},
{
"id": "50000000-0000-0000-0000-000000000003",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"name": "Pedro Calidad",
"email": "pedro.calidad@panaderiaartesana.com",
"role": "quality_control",
"is_active": true,
"created_at": "2025-01-15T06:00:00Z",
"updated_at": "2025-01-15T06:00:00Z"
},
{
"id": "50000000-0000-0000-0000-000000000004",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"name": "Laura Admin",
"email": "laura.admin@panaderiaartesana.com",
"role": "admin",
"is_active": true,
"created_at": "2025-01-15T06:00:00Z",
"updated_at": "2025-01-15T06:00:00Z"
},
{
"id": "50000000-0000-0000-0000-000000000005",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"name": "Carlos Almacén",
"email": "carlos.almacen@panaderiaartesana.com",
"role": "warehouse",
"is_active": true,
"created_at": "2025-01-15T06:00:00Z",
"updated_at": "2025-01-15T06:00:00Z"
},
{
"id": "50000000-0000-0000-0000-000000000006",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"name": "Isabel Producción",
"email": "isabel.produccion@panaderiaartesana.com",
"role": "production_manager",
"is_active": true,
"created_at": "2025-01-15T06:00:00Z",
"updated_at": "2025-01-15T06:00:00Z"
}
]
}

View File

@@ -1016,5 +1016,102 @@
"updated_at": "2025-01-15T06:00:00Z",
"created_by": "c1a2b3c4-d5e6-47a8-b9c0-d1e2f3a4b5c6"
}
],
"stock": [
{
"id": "10000000-0000-0000-0000-000000001001",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"ingredient_id": "10000000-0000-0000-0000-000000000001",
"quantity": 80.0,
"reserved_quantity": 0.0,
"available_quantity": 80.0,
"location": "Almacén Principal - Zona A",
"production_stage": "raw_ingredient",
"quality_status": "good",
"expiration_date": "2025-07-15T00:00:00Z",
"supplier_id": "40000000-0000-0000-0000-000000000001",
"batch_number": "HAR-T55-20250110-001",
"created_at": "2025-01-15T06:00:00Z",
"updated_at": "2025-01-15T06:00:00Z",
"is_available": true,
"is_expired": false,
"notes": "⚠️ CRITICAL: Below reorder point (80 < 150) - NO pending PO - Should trigger RED alert"
},
{
"id": "10000000-0000-0000-0000-000000001002",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"ingredient_id": "10000000-0000-0000-0000-000000000011",
"quantity": 25.0,
"reserved_quantity": 5.0,
"available_quantity": 20.0,
"location": "Almacén Refrigerado - Zona B",
"production_stage": "raw_ingredient",
"quality_status": "good",
"expiration_date": "2025-02-15T00:00:00Z",
"supplier_id": "40000000-0000-0000-0000-000000000002",
"batch_number": "MAN-SAL-20250112-001",
"created_at": "2025-01-15T06:00:00Z",
"updated_at": "2025-01-15T06:00:00Z",
"is_available": true,
"is_expired": false,
"notes": "⚠️ LOW: Below reorder point (25 < 40) - Has pending PO (PO-2025-006) - Should show warning"
},
{
"id": "10000000-0000-0000-0000-000000001003",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"ingredient_id": "10000000-0000-0000-0000-000000000021",
"quantity": 8.0,
"reserved_quantity": 2.0,
"available_quantity": 6.0,
"location": "Almacén Refrigerado - Zona C",
"production_stage": "raw_ingredient",
"quality_status": "good",
"expiration_date": "2025-02-28T00:00:00Z",
"supplier_id": "40000000-0000-0000-0000-000000000003",
"batch_number": "LEV-FRE-20250114-001",
"created_at": "2025-01-15T06:00:00Z",
"updated_at": "2025-01-15T06:00:00Z",
"is_available": true,
"is_expired": false,
"notes": "⚠️ LOW: Below reorder point (8 < 10) - Has pending PO (PO-2025-004-URGENT) - Critical for production"
},
{
"id": "10000000-0000-0000-0000-000000001004",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"ingredient_id": "10000000-0000-0000-0000-000000000002",
"quantity": 180.0,
"reserved_quantity": 20.0,
"available_quantity": 160.0,
"location": "Almacén Principal - Zona A",
"production_stage": "raw_ingredient",
"quality_status": "good",
"expiration_date": "2025-06-15T00:00:00Z",
"supplier_id": "40000000-0000-0000-0000-000000000001",
"batch_number": "HAR-T65-20250111-001",
"created_at": "2025-01-15T06:00:00Z",
"updated_at": "2025-01-15T06:00:00Z",
"is_available": true,
"is_expired": false,
"notes": "Above reorder point - Normal stock level"
},
{
"id": "10000000-0000-0000-0000-000000001005",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"ingredient_id": "10000000-0000-0000-0000-000000000012",
"quantity": 120.0,
"reserved_quantity": 10.0,
"available_quantity": 110.0,
"location": "Almacén Refrigerado - Zona B",
"production_stage": "raw_ingredient",
"quality_status": "good",
"expiration_date": "2025-01-22T00:00:00Z",
"supplier_id": "40000000-0000-0000-0000-000000000002",
"batch_number": "LEC-ENT-20250114-001",
"created_at": "2025-01-15T06:00:00Z",
"updated_at": "2025-01-15T06:00:00Z",
"is_available": true,
"is_expired": false,
"notes": "Above reorder point - Normal stock level"
}
]
}

View File

@@ -0,0 +1,840 @@
{
"recipes": [
{
"id": "30000000-0000-0000-0000-000000000001",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"name": "Baguette Francesa Tradicional",
"recipe_code": null,
"version": "1.0",
"finished_product_id": "20000000-0000-0000-0000-000000000001",
"description": "Baguette francesa tradicional con corteza crujiente y miga alveolada. Perfecta para acompañar cualquier comida.",
"category": "Panes",
"cuisine_type": "Francesa",
"difficulty_level": 2,
"yield_quantity": 10.0,
"yield_unit": "units",
"prep_time_minutes": 20,
"cook_time_minutes": 25,
"total_time_minutes": 165,
"rest_time_minutes": 120,
"estimated_cost_per_unit": null,
"last_calculated_cost": null,
"cost_calculation_date": null,
"target_margin_percentage": null,
"suggested_selling_price": null,
"instructions": {
"steps": [
{
"step": 1,
"title": "Amasado",
"description": "Mezclar harina, agua, sal y levadura. Amasar durante 15 minutos hasta obtener una masa lisa y elástica.",
"duration_minutes": 15
},
{
"step": 2,
"title": "Primera Fermentación",
"description": "Dejar reposar la masa en un recipiente tapado durante 60 minutos a temperatura ambiente (22-24°C).",
"duration_minutes": 60
},
{
"step": 3,
"title": "División y Formado",
"description": "Dividir la masa en 10 piezas de 250g cada una. Formar las baguettes dándoles la forma alargada característica.",
"duration_minutes": 20
},
{
"step": 4,
"title": "Segunda Fermentación",
"description": "Colocar las baguettes en un lienzo enharinado y dejar fermentar 60 minutos más.",
"duration_minutes": 60
},
{
"step": 5,
"title": "Greñado y Horneado",
"description": "Hacer cortes diagonales en la superficie con una cuchilla. Hornear a 240°C con vapor inicial durante 25 minutos.",
"duration_minutes": 25
}
]
},
"preparation_notes": "Es crucial usar vapor al inicio del horneado para lograr una corteza crujiente. La temperatura del agua debe estar entre 18-20°C.",
"storage_instructions": "Consumir el mismo día de producción. Se puede congelar después del horneado.",
"serves_count": null,
"nutritional_info": null,
"allergen_info": null,
"dietary_tags": null,
"batch_size_multiplier": 1.0,
"minimum_batch_size": null,
"maximum_batch_size": null,
"optimal_production_temperature": null,
"optimal_humidity": null,
"quality_check_configuration": null,
"status": "ACTIVE",
"is_seasonal": false,
"season_start_month": null,
"season_end_month": null,
"is_signature_item": true,
"created_at": "2025-01-15T06:00:00Z",
"updated_at": "2025-01-15T06:00:00Z",
"created_by": "c1a2b3c4-d5e6-47a8-b9c0-d1e2f3a4b5c6",
"updated_by": "c1a2b3c4-d5e6-47a8-b9c0-d1e2f3a4b5c6"
},
{
"id": "30000000-0000-0000-0000-000000000002",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"name": "Croissant de Mantequilla Artesanal",
"recipe_code": null,
"version": "1.0",
"finished_product_id": "20000000-0000-0000-0000-000000000002",
"description": "Croissant de mantequilla con laminado perfecto y textura hojaldrada. Elaboración artesanal con mantequilla de alta calidad.",
"category": "Bollería",
"cuisine_type": "Francesa",
"difficulty_level": 4,
"yield_quantity": 12.0,
"yield_unit": "units",
"prep_time_minutes": 45,
"cook_time_minutes": 18,
"total_time_minutes": 333,
"rest_time_minutes": 270,
"estimated_cost_per_unit": null,
"last_calculated_cost": null,
"cost_calculation_date": null,
"target_margin_percentage": null,
"suggested_selling_price": null,
"instructions": {
"steps": [
{
"step": 1,
"title": "Preparación de la Masa Base",
"description": "Mezclar todos los ingredientes excepto la mantequilla de laminado. Amasar hasta obtener una masa homogénea.",
"duration_minutes": 20
},
{
"step": 2,
"title": "Reposo en Frío",
"description": "Envolver la masa en film y refrigerar durante 2 horas.",
"duration_minutes": 120
},
{
"step": 3,
"title": "Laminado",
"description": "Extender la masa en rectángulo. Colocar la mantequilla en el centro y hacer 3 dobleces sencillos con 30 minutos de reposo entre cada uno.",
"duration_minutes": 90
},
{
"step": 4,
"title": "Formado",
"description": "Extender a 3mm de grosor, cortar triángulos y enrollar para formar los croissants.",
"duration_minutes": 25
},
{
"step": 5,
"title": "Fermentación Final",
"description": "Dejar fermentar a 26°C durante 2-3 horas hasta que dupliquen su volumen.",
"duration_minutes": 150
},
{
"step": 6,
"title": "Horneado",
"description": "Pintar con huevo batido y hornear a 200°C durante 18 minutos hasta dorar.",
"duration_minutes": 18
}
]
},
"preparation_notes": "La mantequilla para laminar debe estar a 15-16°C, flexible pero no blanda. Trabajar en ambiente fresco.",
"storage_instructions": "Consumir el día de producción. Se puede congelar la masa formada antes de la fermentación final.",
"serves_count": null,
"nutritional_info": null,
"allergen_info": null,
"dietary_tags": null,
"batch_size_multiplier": 1.0,
"minimum_batch_size": null,
"maximum_batch_size": null,
"optimal_production_temperature": null,
"optimal_humidity": null,
"quality_check_configuration": null,
"status": "ACTIVE",
"is_seasonal": false,
"season_start_month": null,
"season_end_month": null,
"is_signature_item": true,
"created_at": "2025-01-15T06:00:00Z",
"updated_at": "2025-01-15T06:00:00Z",
"created_by": "c1a2b3c4-d5e6-47a8-b9c0-d1e2f3a4b5c6",
"updated_by": "c1a2b3c4-d5e6-47a8-b9c0-d1e2f3a4b5c6"
},
{
"id": "30000000-0000-0000-0000-000000000003",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"name": "Pan de Pueblo con Masa Madre",
"recipe_code": null,
"version": "1.0",
"finished_product_id": "20000000-0000-0000-0000-000000000003",
"description": "Hogaza de pan rústico elaborada con masa madre natural. Corteza gruesa y miga densa con sabor ligeramente ácido.",
"category": "Panes Artesanales",
"cuisine_type": "Española",
"difficulty_level": 3,
"yield_quantity": 4.0,
"yield_unit": "units",
"prep_time_minutes": 30,
"cook_time_minutes": 45,
"total_time_minutes": 435,
"rest_time_minutes": 360,
"estimated_cost_per_unit": null,
"last_calculated_cost": null,
"cost_calculation_date": null,
"target_margin_percentage": null,
"suggested_selling_price": null,
"instructions": {
"steps": [
{
"step": 1,
"title": "Autolisis",
"description": "Mezclar harinas y agua, dejar reposar 30 minutos para desarrollar el gluten.",
"duration_minutes": 30
},
{
"step": 2,
"title": "Incorporación de Masa Madre y Sal",
"description": "Añadir la masa madre y la sal. Amasar suavemente hasta integrar completamente.",
"duration_minutes": 15
},
{
"step": 3,
"title": "Fermentación en Bloque con Pliegues",
"description": "Realizar 4 series de pliegues cada 30 minutos durante las primeras 2 horas. Luego dejar reposar 2 horas más.",
"duration_minutes": 240
},
{
"step": 4,
"title": "División y Preformado",
"description": "Dividir en 4 piezas de 800g. Preformar en bolas y dejar reposar 30 minutos.",
"duration_minutes": 30
},
{
"step": 5,
"title": "Formado Final",
"description": "Formar las hogazas dándoles tensión superficial. Colocar en banneton o lienzo enharinado.",
"duration_minutes": 15
},
{
"step": 6,
"title": "Fermentación Final",
"description": "Dejar fermentar a temperatura ambiente durante 2 horas o en frío durante la noche.",
"duration_minutes": 120
},
{
"step": 7,
"title": "Horneado",
"description": "Hacer cortes en la superficie. Hornear a 230°C con vapor inicial durante 45 minutos.",
"duration_minutes": 45
}
]
},
"preparation_notes": "La masa madre debe estar activa y en su punto óptimo. La temperatura final de la masa debe ser 24-25°C.",
"storage_instructions": "Se conserva hasta 5-7 días en bolsa de papel. Mejora al segundo día.",
"serves_count": null,
"nutritional_info": null,
"allergen_info": null,
"dietary_tags": null,
"batch_size_multiplier": 1.0,
"minimum_batch_size": null,
"maximum_batch_size": null,
"optimal_production_temperature": null,
"optimal_humidity": null,
"quality_check_configuration": null,
"status": "ACTIVE",
"is_seasonal": false,
"season_start_month": null,
"season_end_month": null,
"is_signature_item": true,
"created_at": "2025-01-15T06:00:00Z",
"updated_at": "2025-01-15T06:00:00Z",
"created_by": "c1a2b3c4-d5e6-47a8-b9c0-d1e2f3a4b5c6",
"updated_by": "c1a2b3c4-d5e6-47a8-b9c0-d1e2f3a4b5c6"
},
{
"id": "30000000-0000-0000-0000-000000000004",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"name": "Napolitana de Chocolate",
"recipe_code": null,
"version": "1.0",
"finished_product_id": "20000000-0000-0000-0000-000000000004",
"description": "Bollería de hojaldre rectangular rellena de chocolate. Clásico de las panaderías españolas.",
"category": "Bollería",
"cuisine_type": "Española",
"difficulty_level": 3,
"yield_quantity": 16.0,
"yield_unit": "units",
"prep_time_minutes": 40,
"cook_time_minutes": 15,
"total_time_minutes": 325,
"rest_time_minutes": 270,
"estimated_cost_per_unit": null,
"last_calculated_cost": null,
"cost_calculation_date": null,
"target_margin_percentage": null,
"suggested_selling_price": null,
"instructions": {
"steps": [
{
"step": 1,
"title": "Masa Base y Laminado",
"description": "Preparar masa de hojaldre siguiendo el mismo proceso que los croissants.",
"duration_minutes": 180
},
{
"step": 2,
"title": "Corte y Formado",
"description": "Extender la masa y cortar rectángulos de 10x15cm. Colocar barritas de chocolate en el centro.",
"duration_minutes": 20
},
{
"step": 3,
"title": "Sellado",
"description": "Doblar la masa sobre sí misma para cubrir el chocolate. Sellar bien los bordes.",
"duration_minutes": 20
},
{
"step": 4,
"title": "Fermentación",
"description": "Dejar fermentar a 26°C durante 90 minutos.",
"duration_minutes": 90
},
{
"step": 5,
"title": "Horneado",
"description": "Pintar con huevo y hornear a 190°C durante 15 minutos.",
"duration_minutes": 15
}
]
},
"preparation_notes": "El chocolate debe ser de buena calidad para un mejor resultado. No sobrecargar de chocolate.",
"storage_instructions": "Consumir preferiblemente el día de producción.",
"serves_count": null,
"nutritional_info": null,
"allergen_info": null,
"dietary_tags": null,
"batch_size_multiplier": 1.0,
"minimum_batch_size": null,
"maximum_batch_size": null,
"optimal_production_temperature": null,
"optimal_humidity": null,
"quality_check_configuration": null,
"status": "ACTIVE",
"is_seasonal": false,
"season_start_month": null,
"season_end_month": null,
"is_signature_item": false,
"created_at": "2025-01-15T06:00:00Z",
"updated_at": "2025-01-15T06:00:00Z",
"created_by": "c1a2b3c4-d5e6-47a8-b9c0-d1e2f3a4b5c6",
"updated_by": "c1a2b3c4-d5e6-47a8-b9c0-d1e2f3a4b5c6"
}
],
"recipe_ingredients": [
{
"id": "473debdb-ab7c-4a79-9b41-985715695710",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"recipe_id": "30000000-0000-0000-0000-000000000001",
"ingredient_id": "10000000-0000-0000-0000-000000000001",
"quantity": 1000.0,
"unit": "g",
"quantity_in_base_unit": null,
"alternative_quantity": null,
"alternative_unit": null,
"preparation_method": "tamizada",
"ingredient_notes": null,
"is_optional": false,
"ingredient_order": 1,
"ingredient_group": "Secos",
"substitution_options": null,
"substitution_ratio": null,
"unit_cost": null,
"total_cost": null,
"cost_updated_at": null
},
{
"id": "545c7899-d893-41f4-a839-963235f128cd",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"recipe_id": "30000000-0000-0000-0000-000000000001",
"ingredient_id": "10000000-0000-0000-0000-000000000033",
"quantity": 650.0,
"unit": "ml",
"quantity_in_base_unit": null,
"alternative_quantity": null,
"alternative_unit": null,
"preparation_method": "temperatura ambiente",
"ingredient_notes": null,
"is_optional": false,
"ingredient_order": 2,
"ingredient_group": "Líquidos",
"substitution_options": null,
"substitution_ratio": null,
"unit_cost": null,
"total_cost": null,
"cost_updated_at": null
},
{
"id": "4e9ec9cc-6339-4191-bad5-c52b604106c9",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"recipe_id": "30000000-0000-0000-0000-000000000001",
"ingredient_id": "10000000-0000-0000-0000-000000000031",
"quantity": 20.0,
"unit": "g",
"quantity_in_base_unit": null,
"alternative_quantity": null,
"alternative_unit": null,
"preparation_method": null,
"ingredient_notes": null,
"is_optional": false,
"ingredient_order": 3,
"ingredient_group": "Secos",
"substitution_options": null,
"substitution_ratio": null,
"unit_cost": null,
"total_cost": null,
"cost_updated_at": null
},
{
"id": "f89b85f2-e18e-451a-8048-668bcfb6bc51",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"recipe_id": "30000000-0000-0000-0000-000000000001",
"ingredient_id": "10000000-0000-0000-0000-000000000021",
"quantity": 15.0,
"unit": "g",
"quantity_in_base_unit": null,
"alternative_quantity": null,
"alternative_unit": null,
"preparation_method": "desmenuzada",
"ingredient_notes": null,
"is_optional": false,
"ingredient_order": 4,
"ingredient_group": "Fermentos",
"substitution_options": null,
"substitution_ratio": null,
"unit_cost": null,
"total_cost": null,
"cost_updated_at": null
},
{
"id": "5e25c0c8-17b9-4db1-b099-8dc459def206",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"recipe_id": "30000000-0000-0000-0000-000000000002",
"ingredient_id": "10000000-0000-0000-0000-000000000001",
"quantity": 500.0,
"unit": "g",
"quantity_in_base_unit": null,
"alternative_quantity": null,
"alternative_unit": null,
"preparation_method": null,
"ingredient_notes": null,
"is_optional": false,
"ingredient_order": 1,
"ingredient_group": "Masa base",
"substitution_options": null,
"substitution_ratio": null,
"unit_cost": null,
"total_cost": null,
"cost_updated_at": null
},
{
"id": "89a9872d-4bf4-469f-8c84-37f7bf0c9a92",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"recipe_id": "30000000-0000-0000-0000-000000000002",
"ingredient_id": "10000000-0000-0000-0000-000000000012",
"quantity": 120.0,
"unit": "ml",
"quantity_in_base_unit": null,
"alternative_quantity": null,
"alternative_unit": null,
"preparation_method": "tibia",
"ingredient_notes": null,
"is_optional": false,
"ingredient_order": 2,
"ingredient_group": "Masa base",
"substitution_options": null,
"substitution_ratio": null,
"unit_cost": null,
"total_cost": null,
"cost_updated_at": null
},
{
"id": "1843a05b-d3dd-4963-afa1-1c76fcd6922f",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"recipe_id": "30000000-0000-0000-0000-000000000002",
"ingredient_id": "10000000-0000-0000-0000-000000000033",
"quantity": 80.0,
"unit": "ml",
"quantity_in_base_unit": null,
"alternative_quantity": null,
"alternative_unit": null,
"preparation_method": null,
"ingredient_notes": null,
"is_optional": false,
"ingredient_order": 3,
"ingredient_group": "Masa base",
"substitution_options": null,
"substitution_ratio": null,
"unit_cost": null,
"total_cost": null,
"cost_updated_at": null
},
{
"id": "af984d98-3b75-458f-8fdd-02699dc33e9d",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"recipe_id": "30000000-0000-0000-0000-000000000002",
"ingredient_id": "10000000-0000-0000-0000-000000000032",
"quantity": 50.0,
"unit": "g",
"quantity_in_base_unit": null,
"alternative_quantity": null,
"alternative_unit": null,
"preparation_method": null,
"ingredient_notes": null,
"is_optional": false,
"ingredient_order": 4,
"ingredient_group": "Masa base",
"substitution_options": null,
"substitution_ratio": null,
"unit_cost": null,
"total_cost": null,
"cost_updated_at": null
},
{
"id": "b09b738f-d24c-4dde-be76-6b88ea99511e",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"recipe_id": "30000000-0000-0000-0000-000000000002",
"ingredient_id": "10000000-0000-0000-0000-000000000031",
"quantity": 10.0,
"unit": "g",
"quantity_in_base_unit": null,
"alternative_quantity": null,
"alternative_unit": null,
"preparation_method": null,
"ingredient_notes": null,
"is_optional": false,
"ingredient_order": 5,
"ingredient_group": "Masa base",
"substitution_options": null,
"substitution_ratio": null,
"unit_cost": null,
"total_cost": null,
"cost_updated_at": null
},
{
"id": "119496cd-e7e3-40a4-b298-09a434b679fc",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"recipe_id": "30000000-0000-0000-0000-000000000002",
"ingredient_id": "10000000-0000-0000-0000-000000000021",
"quantity": 20.0,
"unit": "g",
"quantity_in_base_unit": null,
"alternative_quantity": null,
"alternative_unit": null,
"preparation_method": null,
"ingredient_notes": null,
"is_optional": false,
"ingredient_order": 6,
"ingredient_group": "Masa base",
"substitution_options": null,
"substitution_ratio": null,
"unit_cost": null,
"total_cost": null,
"cost_updated_at": null
},
{
"id": "c8fe9422-3000-42b4-a74a-cb00b6277130",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"recipe_id": "30000000-0000-0000-0000-000000000002",
"ingredient_id": "10000000-0000-0000-0000-000000000011",
"quantity": 25.0,
"unit": "g",
"quantity_in_base_unit": null,
"alternative_quantity": null,
"alternative_unit": null,
"preparation_method": "en la masa",
"ingredient_notes": null,
"is_optional": false,
"ingredient_order": 7,
"ingredient_group": "Masa base",
"substitution_options": null,
"substitution_ratio": null,
"unit_cost": null,
"total_cost": null,
"cost_updated_at": null
},
{
"id": "107a15bf-d2df-4e25-95fe-aee64febf112",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"recipe_id": "30000000-0000-0000-0000-000000000002",
"ingredient_id": "10000000-0000-0000-0000-000000000011",
"quantity": 250.0,
"unit": "g",
"quantity_in_base_unit": null,
"alternative_quantity": null,
"alternative_unit": null,
"preparation_method": "para laminar (15-16°C)",
"ingredient_notes": null,
"is_optional": false,
"ingredient_order": 8,
"ingredient_group": "Laminado",
"substitution_options": null,
"substitution_ratio": null,
"unit_cost": null,
"total_cost": null,
"cost_updated_at": null
},
{
"id": "242e8508-3adf-4b11-b482-33d740bd5397",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"recipe_id": "30000000-0000-0000-0000-000000000003",
"ingredient_id": "10000000-0000-0000-0000-000000000002",
"quantity": 800.0,
"unit": "g",
"quantity_in_base_unit": null,
"alternative_quantity": null,
"alternative_unit": null,
"preparation_method": null,
"ingredient_notes": null,
"is_optional": false,
"ingredient_order": 1,
"ingredient_group": "Harinas",
"substitution_options": null,
"substitution_ratio": null,
"unit_cost": null,
"total_cost": null,
"cost_updated_at": null
},
{
"id": "ea701cf5-0c6b-45aa-9519-e4dc42a40662",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"recipe_id": "30000000-0000-0000-0000-000000000003",
"ingredient_id": "10000000-0000-0000-0000-000000000004",
"quantity": 200.0,
"unit": "g",
"quantity_in_base_unit": null,
"alternative_quantity": null,
"alternative_unit": null,
"preparation_method": null,
"ingredient_notes": null,
"is_optional": false,
"ingredient_order": 2,
"ingredient_group": "Harinas",
"substitution_options": null,
"substitution_ratio": null,
"unit_cost": null,
"total_cost": null,
"cost_updated_at": null
},
{
"id": "3a4f0c61-8451-42fe-b3bc-4b0f4527af87",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"recipe_id": "30000000-0000-0000-0000-000000000003",
"ingredient_id": "10000000-0000-0000-0000-000000000023",
"quantity": 300.0,
"unit": "g",
"quantity_in_base_unit": null,
"alternative_quantity": null,
"alternative_unit": null,
"preparation_method": "activa y alimentada",
"ingredient_notes": null,
"is_optional": false,
"ingredient_order": 3,
"ingredient_group": "Fermentos",
"substitution_options": null,
"substitution_ratio": null,
"unit_cost": null,
"total_cost": null,
"cost_updated_at": null
},
{
"id": "ededf3a3-b58a-4f10-8d12-324aa3400349",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"recipe_id": "30000000-0000-0000-0000-000000000003",
"ingredient_id": "10000000-0000-0000-0000-000000000033",
"quantity": 650.0,
"unit": "ml",
"quantity_in_base_unit": null,
"alternative_quantity": null,
"alternative_unit": null,
"preparation_method": "temperatura ambiente",
"ingredient_notes": null,
"is_optional": false,
"ingredient_order": 4,
"ingredient_group": "Líquidos",
"substitution_options": null,
"substitution_ratio": null,
"unit_cost": null,
"total_cost": null,
"cost_updated_at": null
},
{
"id": "93177be7-24e5-4e97-8d46-df373d6a04bc",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"recipe_id": "30000000-0000-0000-0000-000000000003",
"ingredient_id": "10000000-0000-0000-0000-000000000031",
"quantity": 22.0,
"unit": "g",
"quantity_in_base_unit": null,
"alternative_quantity": null,
"alternative_unit": null,
"preparation_method": null,
"ingredient_notes": null,
"is_optional": false,
"ingredient_order": 5,
"ingredient_group": "Condimentos",
"substitution_options": null,
"substitution_ratio": null,
"unit_cost": null,
"total_cost": null,
"cost_updated_at": null
},
{
"id": "c27a4fbb-d451-4a14-b0e2-09e5cbd07bad",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"recipe_id": "30000000-0000-0000-0000-000000000004",
"ingredient_id": "10000000-0000-0000-0000-000000000001",
"quantity": 500.0,
"unit": "g",
"quantity_in_base_unit": null,
"alternative_quantity": null,
"alternative_unit": null,
"preparation_method": null,
"ingredient_notes": null,
"is_optional": false,
"ingredient_order": 1,
"ingredient_group": "Masa",
"substitution_options": null,
"substitution_ratio": null,
"unit_cost": null,
"total_cost": null,
"cost_updated_at": null
},
{
"id": "dd8a0784-ead1-483b-b183-21c71b692a7d",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"recipe_id": "30000000-0000-0000-0000-000000000004",
"ingredient_id": "10000000-0000-0000-0000-000000000011",
"quantity": 300.0,
"unit": "g",
"quantity_in_base_unit": null,
"alternative_quantity": null,
"alternative_unit": null,
"preparation_method": null,
"ingredient_notes": null,
"is_optional": false,
"ingredient_order": 2,
"ingredient_group": "Laminado",
"substitution_options": null,
"substitution_ratio": null,
"unit_cost": null,
"total_cost": null,
"cost_updated_at": null
},
{
"id": "6434bf78-48e5-469d-a8d0-6f4dbe5c69ca",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"recipe_id": "30000000-0000-0000-0000-000000000004",
"ingredient_id": "10000000-0000-0000-0000-000000000041",
"quantity": 200.0,
"unit": "g",
"quantity_in_base_unit": null,
"alternative_quantity": null,
"alternative_unit": null,
"preparation_method": "en barritas",
"ingredient_notes": null,
"is_optional": false,
"ingredient_order": 3,
"ingredient_group": "Relleno",
"substitution_options": null,
"substitution_ratio": null,
"unit_cost": null,
"total_cost": null,
"cost_updated_at": null
},
{
"id": "38661b92-03e9-4dcd-ac90-86832eee9455",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"recipe_id": "30000000-0000-0000-0000-000000000004",
"ingredient_id": "10000000-0000-0000-0000-000000000032",
"quantity": 60.0,
"unit": "g",
"quantity_in_base_unit": null,
"alternative_quantity": null,
"alternative_unit": null,
"preparation_method": null,
"ingredient_notes": null,
"is_optional": false,
"ingredient_order": 4,
"ingredient_group": "Masa",
"substitution_options": null,
"substitution_ratio": null,
"unit_cost": null,
"total_cost": null,
"cost_updated_at": null
},
{
"id": "1ff5fb46-3361-4978-b248-a6b3bb6592f7",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"recipe_id": "30000000-0000-0000-0000-000000000004",
"ingredient_id": "10000000-0000-0000-0000-000000000031",
"quantity": 10.0,
"unit": "g",
"quantity_in_base_unit": null,
"alternative_quantity": null,
"alternative_unit": null,
"preparation_method": null,
"ingredient_notes": null,
"is_optional": false,
"ingredient_order": 5,
"ingredient_group": "Masa",
"substitution_options": null,
"substitution_ratio": null,
"unit_cost": null,
"total_cost": null,
"cost_updated_at": null
},
{
"id": "aa85612a-f99b-4c8b-a100-08ae4a9898a5",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"recipe_id": "30000000-0000-0000-0000-000000000004",
"ingredient_id": "10000000-0000-0000-0000-000000000021",
"quantity": 15.0,
"unit": "g",
"quantity_in_base_unit": null,
"alternative_quantity": null,
"alternative_unit": null,
"preparation_method": null,
"ingredient_notes": null,
"is_optional": false,
"ingredient_order": 6,
"ingredient_group": "Masa",
"substitution_options": null,
"substitution_ratio": null,
"unit_cost": null,
"total_cost": null,
"cost_updated_at": null
},
{
"id": "33c542c8-bf36-4041-957f-765bf28cc68a",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"recipe_id": "30000000-0000-0000-0000-000000000004",
"ingredient_id": "10000000-0000-0000-0000-000000000012",
"quantity": 150.0,
"unit": "ml",
"quantity_in_base_unit": null,
"alternative_quantity": null,
"alternative_unit": null,
"preparation_method": null,
"ingredient_notes": null,
"is_optional": false,
"ingredient_order": 7,
"ingredient_group": "Masa",
"substitution_options": null,
"substitution_ratio": null,
"unit_cost": null,
"total_cost": null,
"cost_updated_at": null
}
]
}

View File

@@ -0,0 +1,154 @@
{
"suppliers": [
{
"id": "40000000-0000-0000-0000-000000000001",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"name": "Harinas del Norte",
"supplier_code": "SUP-HARINA-001",
"business_name": "Harinas del Norte S.L.",
"tax_id": "B12345678",
"contact_person": "José Martínez",
"email": "pedidos@harinasdelnorte.es",
"phone": "+34 945 123 456",
"address": "Pol. Industrial Norte, Calle 5",
"city": "Vitoria-Gasteiz",
"postal_code": "01000",
"country": "España",
"status": "ACTIVE",
"rating": 4.5,
"payment_terms": "30_DAYS",
"minimum_order_amount": 200.0,
"lead_time_days": 2,
"contract_start_date": "2024-01-01T00:00:00Z",
"contract_end_date": "2025-12-31T23:59:59Z",
"created_at": "2025-01-15T06:00:00Z",
"specialties": ["flour", "bread_improvers"],
"delivery_areas": ["Madrid", "Basque Country", "Navarra"]
},
{
"id": "40000000-0000-0000-0000-000000000002",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"name": "Lácteos Gipuzkoa",
"supplier_code": "SUP-LACTEO-001",
"business_name": "Lácteos Gipuzkoa S.A.",
"tax_id": "B87654321",
"contact_person": "María López",
"email": "ventas@lacteosgipuzkoa.com",
"phone": "+34 943 234 567",
"address": "Calle Urola, 12",
"city": "Donostia-San Sebastián",
"postal_code": "20001",
"country": "España",
"status": "ACTIVE",
"rating": 4.8,
"payment_terms": "15_DAYS",
"minimum_order_amount": 150.0,
"lead_time_days": 1,
"contract_start_date": "2024-03-15T00:00:00Z",
"contract_end_date": "2025-12-31T23:59:59Z",
"created_at": "2025-01-15T06:00:00Z",
"specialties": ["milk", "butter", "cream"],
"delivery_areas": ["Madrid", "Basque Country", "Cantabria"]
},
{
"id": "40000000-0000-0000-0000-000000000003",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"name": "Frutas Frescas",
"supplier_code": "SUP-FRUTA-001",
"business_name": "Frutas Frescas S.L.",
"tax_id": "B23456789",
"contact_person": "Carlos Ruiz",
"email": "info@frutasfrescas.es",
"phone": "+34 915 345 678",
"address": "Mercado Central, Pabellón 3",
"city": "Madrid",
"postal_code": "28013",
"country": "España",
"status": "ACTIVE",
"rating": 4.2,
"payment_terms": "7_DAYS",
"minimum_order_amount": 100.0,
"lead_time_days": 1,
"contract_start_date": "2024-06-01T00:00:00Z",
"contract_end_date": "2025-12-31T23:59:59Z",
"created_at": "2025-01-15T06:00:00Z",
"specialties": ["fruits", "vegetables", "citrus"],
"delivery_areas": ["Madrid", "Toledo", "Guadalajara"]
},
{
"id": "40000000-0000-0000-0000-000000000004",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"name": "Sal de Mar",
"supplier_code": "SUP-SAL-001",
"business_name": "Sal de Mar S.A.",
"tax_id": "B34567890",
"contact_person": "Ana Martínez",
"email": "ventas@saldemar.com",
"phone": "+34 965 456 789",
"address": "Calle Salinera, 8",
"city": "Alicante",
"postal_code": "03001",
"country": "España",
"status": "ACTIVE",
"rating": 4.7,
"payment_terms": "30_DAYS",
"minimum_order_amount": 50.0,
"lead_time_days": 3,
"contract_start_date": "2024-01-01T00:00:00Z",
"contract_end_date": "2025-12-31T23:59:59Z",
"created_at": "2025-01-15T06:00:00Z",
"specialties": ["salt", "sea_salt", "gourmet_salt"],
"delivery_areas": ["Madrid", "Valencia", "Murcia"]
},
{
"id": "40000000-0000-0000-0000-000000000005",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"name": "Envases Pro",
"supplier_code": "SUP-ENVASE-001",
"business_name": "Envases Pro S.L.",
"tax_id": "B45678901",
"contact_person": "Luis Gómez",
"email": "comercial@envasespro.es",
"phone": "+34 932 345 678",
"address": "Calle Industrial, 15",
"city": "Barcelona",
"postal_code": "08019",
"country": "España",
"status": "ACTIVE",
"rating": 4.0,
"payment_terms": "60_DAYS",
"minimum_order_amount": 300.0,
"lead_time_days": 5,
"contract_start_date": "2024-01-01T00:00:00Z",
"contract_end_date": "2025-12-31T23:59:59Z",
"created_at": "2025-01-15T06:00:00Z",
"specialties": ["packaging", "bags", "boxes"],
"delivery_areas": ["Madrid", "Barcelona", "Zaragoza"]
},
{
"id": "40000000-0000-0000-0000-000000000006",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"name": "Levaduras Spain",
"supplier_code": "SUP-LEVADURA-001",
"business_name": "Levaduras Spain S.A.",
"tax_id": "B56789012",
"contact_person": "Sofía Fernández",
"email": "ventas@levadurasspain.com",
"phone": "+34 976 567 890",
"address": "Calle Fermentación, 3",
"city": "Zaragoza",
"postal_code": "50001",
"country": "España",
"status": "ACTIVE",
"rating": 4.9,
"payment_terms": "30_DAYS",
"minimum_order_amount": 100.0,
"lead_time_days": 2,
"contract_start_date": "2024-01-01T00:00:00Z",
"contract_end_date": "2025-12-31T23:59:59Z",
"created_at": "2025-01-15T06:00:00Z",
"specialties": ["yeast", "baking_yeast", "dry_yeast"],
"delivery_areas": ["Madrid", "Zaragoza", "Navarra"]
}
]
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,436 @@
{
"purchase_orders": [
{
"id": "50000000-0000-0000-0000-0000000000c1",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"po_number": "PO-LATE-0001",
"supplier_id": "40000000-0000-0000-0000-000000000001",
"order_date": "BASE_TS - 1d",
"status": "pending_approval",
"priority": "high",
"required_delivery_date": "BASE_TS - 4h",
"estimated_delivery_date": "BASE_TS - 4h",
"expected_delivery_date": "BASE_TS - 4h",
"subtotal": 500.00,
"tax_amount": 105.00,
"shipping_cost": 20.00,
"discount_amount": 0.00,
"total_amount": 625.00,
"currency": "EUR",
"delivery_address": "Calle Panadería, 45, 28001 Madrid",
"delivery_instructions": "URGENTE: Entrega en almacén trasero",
"delivery_contact": "Carlos Almacén",
"delivery_phone": "+34 910 123 456",
"requires_approval": true,
"sent_to_supplier_at": "BASE_TS - 1d",
"supplier_confirmation_date": "BASE_TS - 23h",
"supplier_reference": "SUP-REF-LATE-001",
"notes": "⚠️ EDGE CASE: Delivery should have arrived 4 hours ago - will trigger red supplier delay alert",
"created_by": "50000000-0000-0000-0000-000000000005"
},
{
"id": "50000000-0000-0000-0000-0000000000c2",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"po_number": "PO-UPCOMING-0001",
"supplier_id": "40000000-0000-0000-0000-000000000002",
"order_date": "BASE_TS - 1h",
"status": "pending_approval",
"priority": "medium",
"required_delivery_date": "BASE_TS + 2h30m",
"estimated_delivery_date": "BASE_TS + 2h30m",
"expected_delivery_date": "BASE_TS + 2h30m",
"subtotal": 300.00,
"tax_amount": 63.00,
"shipping_cost": 15.00,
"discount_amount": 0.00,
"total_amount": 378.00,
"currency": "EUR",
"delivery_address": "Calle Panadería, 45, 28001 Madrid",
"delivery_instructions": "Mantener refrigerado",
"delivery_contact": "Carlos Almacén",
"delivery_phone": "+34 910 123 456",
"requires_approval": true,
"sent_to_supplier_at": "BASE_TS - 1h",
"supplier_confirmation_date": "BASE_TS - 30m",
"supplier_reference": "SUP-REF-UPCOMING-001",
"notes": "⚠️ EDGE CASE: Delivery expected in 2.5 hours - will show in upcoming deliveries",
"created_by": "50000000-0000-0000-0000-000000000005"
},
{
"id": "50000000-0000-0000-0000-000000000001",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"po_number": "PO-2025-001",
"supplier_id": "40000000-0000-0000-0000-000000000001",
"order_date_offset_days": -7,
"status": "completed",
"priority": "normal",
"required_delivery_date_offset_days": -2,
"estimated_delivery_date_offset_days": -2,
"expected_delivery_date_offset_days": -2,
"subtotal": 850.00,
"tax_amount": 178.50,
"shipping_cost": 25.00,
"discount_amount": 0.00,
"total_amount": 1053.50,
"currency": "EUR",
"delivery_address": "Calle Panadería, 45, 28001 Madrid",
"delivery_instructions": "Entrega en almacén trasero",
"delivery_contact": "Carlos Almacén",
"delivery_phone": "+34 910 123 456",
"requires_approval": false,
"sent_to_supplier_at_offset_days": -7,
"supplier_confirmation_date_offset_days": -6,
"supplier_reference": "SUP-REF-2025-001",
"notes": "Pedido habitual semanal de harinas",
"created_by": "50000000-0000-0000-0000-000000000005"
},
{
"id": "50000000-0000-0000-0000-000000000002",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"po_number": "PO-2025-002",
"supplier_id": "40000000-0000-0000-0000-000000000002",
"order_date_offset_days": -5,
"status": "completed",
"priority": "normal",
"required_delivery_date_offset_days": -1,
"estimated_delivery_date_offset_days": -1,
"expected_delivery_date_offset_days": -1,
"subtotal": 320.00,
"tax_amount": 67.20,
"shipping_cost": 15.00,
"discount_amount": 0.00,
"total_amount": 402.20,
"currency": "EUR",
"delivery_address": "Calle Panadería, 45, 28001 Madrid",
"delivery_instructions": "Mantener refrigerado",
"delivery_contact": "Carlos Almacén",
"delivery_phone": "+34 910 123 456",
"requires_approval": false,
"sent_to_supplier_at_offset_days": -5,
"supplier_confirmation_date_offset_days": -4,
"supplier_reference": "LGIPUZ-2025-042",
"notes": "Pedido de lácteos para producción semanal",
"created_by": "50000000-0000-0000-0000-000000000005"
},
{
"id": "50000000-0000-0000-0000-000000000003",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"po_number": "PO-2025-003",
"supplier_id": "40000000-0000-0000-0000-000000000003",
"order_date_offset_days": -3,
"status": "approved",
"priority": "high",
"required_delivery_date_offset_days": 1,
"estimated_delivery_date_offset_days": 2,
"expected_delivery_date_offset_days": 2,
"subtotal": 450.00,
"tax_amount": 94.50,
"shipping_cost": 20.00,
"discount_amount": 22.50,
"total_amount": 542.00,
"currency": "EUR",
"delivery_address": "Calle Panadería, 45, 28001 Madrid",
"delivery_instructions": "Requiere inspección de calidad",
"delivery_contact": "Pedro Calidad",
"delivery_phone": "+34 910 123 456",
"requires_approval": true,
"auto_approved": true,
"auto_approval_rule_id": "10000000-0000-0000-0000-000000000001",
"approved_at_offset_days": -2,
"approved_by": "50000000-0000-0000-0000-000000000006",
"notes": "Pedido urgente para nueva línea de productos ecológicos - Auto-aprobado por IA",
"reasoning_data": {
"job": "ensure_quality_ingredients",
"context": {
"en": "Organic ingredients needed for new product line",
"es": "Ingredientes ecológicos necesarios para nueva línea de productos",
"eu": "Produktu lerro berrirako osagai ekologikoak behar dira"
},
"decision": {
"en": "Auto-approved: Under €500 threshold and from certified supplier",
"es": "Auto-aprobado: Bajo umbral de €500 y de proveedor certificado",
"eu": "Auto-onartuta: €500ko mugaren azpian eta hornitzaile ziurtatutik"
}
},
"created_by": "50000000-0000-0000-0000-000000000005"
},
{
"id": "50000000-0000-0000-0000-000000000004",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"po_number": "PO-2025-004-URGENT",
"supplier_id": "40000000-0000-0000-0000-000000000001",
"order_date_offset_days": -0.5,
"status": "confirmed",
"priority": "urgent",
"required_delivery_date_offset_days": -0.167,
"estimated_delivery_date_offset_days": 0.083,
"expected_delivery_date_offset_days": -0.167,
"subtotal": 1200.00,
"tax_amount": 252.00,
"shipping_cost": 35.00,
"discount_amount": 60.00,
"total_amount": 1427.00,
"currency": "EUR",
"delivery_address": "Calle Panadería, 45, 28001 Madrid",
"delivery_instructions": "URGENTE - Entrega antes de las 10:00 AM",
"delivery_contact": "Isabel Producción",
"delivery_phone": "+34 910 123 456",
"requires_approval": false,
"sent_to_supplier_at_offset_days": -0.5,
"supplier_confirmation_date_offset_days": -0.4,
"supplier_reference": "SUP-URGENT-2025-005",
"notes": "EDGE CASE: Entrega retrasada - debió llegar hace 4 horas. Stock crítico de harina",
"reasoning_data": {
"job": "avoid_production_stoppage",
"context": {
"en": "Critical flour shortage - production at risk",
"es": "Escasez crítica de harina - producción en riesgo",
"eu": "Irina-faltagatik ekoizpena arriskuan"
},
"urgency": {
"en": "Urgent: Delivery delayed 4 hours, affecting today's production",
"es": "Urgente: Entrega retrasada 4 horas, afectando la producción de hoy",
"eu": "Presazkoa: Entrega 4 ordu berandu, gaurko ekoizpena eraginda"
}
},
"created_by": "50000000-0000-0000-0000-000000000006"
},
{
"id": "50000000-0000-0000-0000-000000000007",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"po_number": "PO-2025-007",
"supplier_id": "40000000-0000-0000-0000-000000000004",
"order_date_offset_days": -7,
"status": "completed",
"priority": "normal",
"required_delivery_date_offset_days": -5,
"estimated_delivery_date_offset_days": -5,
"expected_delivery_date_offset_days": -5,
"subtotal": 450.00,
"tax_amount": 94.50,
"shipping_cost": 25.00,
"discount_amount": 0.00,
"total_amount": 569.50,
"currency": "EUR",
"delivery_address": "Calle Panadería, 45, 28001 Madrid",
"delivery_instructions": "Entrega en horario de mañana",
"delivery_contact": "Carlos Almacén",
"delivery_phone": "+34 910 123 456",
"requires_approval": false,
"sent_to_supplier_at_offset_days": -7,
"supplier_confirmation_date_offset_days": -6,
"supplier_reference": "SUP-REF-2025-007",
"notes": "Pedido de ingredientes especiales para línea premium - Entregado hace 5 días",
"created_by": "50000000-0000-0000-0000-000000000005"
},
{
"id": "50000000-0000-0000-0000-000000000005",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"po_number": "PO-2025-005",
"supplier_id": "40000000-0000-0000-0000-000000000004",
"order_date_offset_days": 0,
"status": "draft",
"priority": "normal",
"required_delivery_date_offset_days": 3,
"estimated_delivery_date_offset_days": 3,
"expected_delivery_date_offset_days": 3,
"subtotal": 280.00,
"tax_amount": 58.80,
"shipping_cost": 12.00,
"discount_amount": 0.00,
"total_amount": 350.80,
"currency": "EUR",
"delivery_address": "Calle Panadería, 45, 28001 Madrid",
"delivery_instructions": "Llamar antes de entregar",
"delivery_contact": "Carlos Almacén",
"delivery_phone": "+34 910 123 456",
"requires_approval": false,
"notes": "Pedido planificado para reposición semanal",
"created_by": "50000000-0000-0000-0000-000000000005"
},
{
"id": "50000000-0000-0000-0000-000000000006",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"po_number": "PO-2025-006",
"supplier_id": "40000000-0000-0000-0000-000000000002",
"order_date_offset_days": -0.5,
"status": "sent_to_supplier",
"priority": "high",
"required_delivery_date_offset_days": 0.25,
"estimated_delivery_date_offset_days": 0.25,
"expected_delivery_date_offset_days": 0.25,
"subtotal": 195.00,
"tax_amount": 40.95,
"shipping_cost": 10.00,
"discount_amount": 0.00,
"total_amount": 245.95,
"currency": "EUR",
"delivery_address": "Calle Panadería, 45, 28001 Madrid",
"delivery_instructions": "Mantener cadena de frío - Entrega urgente para producción",
"delivery_contact": "Carlos Almacén",
"delivery_phone": "+34 910 123 456",
"requires_approval": false,
"sent_to_supplier_at_offset_days": -0.5,
"notes": "⏰ EDGE CASE: Entrega esperada en 6 horas - mantequilla para producción de croissants de mañana",
"created_by": "50000000-0000-0000-0000-000000000006"
}
],
"purchase_order_items": [
{
"id": "51000000-0000-0000-0000-000000000001",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"purchase_order_id": "50000000-0000-0000-0000-000000000001",
"inventory_product_id": "10000000-0000-0000-0000-000000000001",
"product_name": "Harina de Trigo T55",
"product_code": "HAR-T55-001",
"ordered_quantity": 500.0,
"unit_of_measure": "kilograms",
"unit_price": 0.85,
"line_total": 425.00,
"received_quantity": 500.0,
"remaining_quantity": 0.0
},
{
"id": "51000000-0000-0000-0000-000000000002",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"purchase_order_id": "50000000-0000-0000-0000-000000000001",
"inventory_product_id": "10000000-0000-0000-0000-000000000002",
"product_name": "Harina de Trigo T65",
"product_code": "HAR-T65-002",
"ordered_quantity": 200.0,
"unit_of_measure": "kilograms",
"unit_price": 0.95,
"line_total": 190.00,
"received_quantity": 200.0,
"remaining_quantity": 0.0
},
{
"id": "51000000-0000-0000-0000-000000000003",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"purchase_order_id": "50000000-0000-0000-0000-000000000001",
"inventory_product_id": "10000000-0000-0000-0000-000000000005",
"product_name": "Harina Centeno",
"product_code": "HAR-CENT-005",
"ordered_quantity": 100.0,
"unit_of_measure": "kilograms",
"unit_price": 1.15,
"line_total": 115.00,
"received_quantity": 100.0,
"remaining_quantity": 0.0
},
{
"id": "51000000-0000-0000-0000-000000000004",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"purchase_order_id": "50000000-0000-0000-0000-000000000001",
"inventory_product_id": "10000000-0000-0000-0000-000000000006",
"product_name": "Sal Marina",
"product_code": "SAL-MAR-006",
"ordered_quantity": 50.0,
"unit_of_measure": "kilograms",
"unit_price": 2.40,
"line_total": 120.00,
"received_quantity": 50.0,
"remaining_quantity": 0.0
},
{
"id": "51000000-0000-0000-0000-000000000005",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"purchase_order_id": "50000000-0000-0000-0000-000000000002",
"inventory_product_id": "10000000-0000-0000-0000-000000000011",
"product_name": "Mantequilla sin Sal 82% MG",
"product_code": "MANT-001",
"ordered_quantity": 80.0,
"unit_of_measure": "kilograms",
"unit_price": 4.00,
"line_total": 320.00,
"received_quantity": 80.0,
"remaining_quantity": 0.0
},
{
"id": "51000000-0000-0000-0000-000000000006",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"purchase_order_id": "50000000-0000-0000-0000-000000000004",
"inventory_product_id": "10000000-0000-0000-0000-000000000001",
"product_name": "Harina de Trigo T55",
"product_code": "HAR-T55-001",
"ordered_quantity": 1000.0,
"unit_of_measure": "kilograms",
"unit_price": 0.80,
"line_total": 800.00,
"received_quantity": 0.0,
"remaining_quantity": 1000.0,
"notes": "URGENTE - Stock crítico"
},
{
"id": "51000000-0000-0000-0000-000000000007",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"purchase_order_id": "50000000-0000-0000-0000-000000000004",
"inventory_product_id": "10000000-0000-0000-0000-000000000011",
"product_name": "Levadura Fresca",
"product_code": "LEV-FRESC-001",
"ordered_quantity": 50.0,
"unit_of_measure": "kilograms",
"unit_price": 8.00,
"line_total": 400.00,
"received_quantity": 0.0,
"remaining_quantity": 50.0,
"notes": "Stock agotado - prioridad máxima"
},
{
"id": "51000000-0000-0000-0000-000000000008",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"purchase_order_id": "50000000-0000-0000-0000-000000000006",
"inventory_product_id": "10000000-0000-0000-0000-000000000011",
"product_name": "Mantequilla sin Sal 82% MG",
"product_code": "MANT-001",
"ordered_quantity": 30.0,
"unit_of_measure": "kilograms",
"unit_price": 6.50,
"line_total": 195.00,
"received_quantity": 0.0,
"remaining_quantity": 30.0
},
{
"id": "51000000-0000-0000-0000-000000000009",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"purchase_order_id": "50000000-0000-0000-0000-000000000007",
"inventory_product_id": "10000000-0000-0000-0000-000000000041",
"product_name": "Chocolate Negro 70% Cacao",
"product_code": "CHO-NEG-001",
"ordered_quantity": 20.0,
"unit_of_measure": "kilograms",
"unit_price": 15.50,
"line_total": 310.00,
"received_quantity": 20.0,
"remaining_quantity": 0.0
},
{
"id": "51000000-0000-0000-0000-000000000010",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"purchase_order_id": "50000000-0000-0000-0000-000000000007",
"inventory_product_id": "10000000-0000-0000-0000-000000000042",
"product_name": "Almendras Laminadas",
"product_code": "ALM-LAM-001",
"ordered_quantity": 15.0,
"unit_of_measure": "kilograms",
"unit_price": 8.90,
"line_total": 133.50,
"received_quantity": 15.0,
"remaining_quantity": 0.0
},
{
"id": "51000000-0000-0000-0000-000000000011",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"purchase_order_id": "50000000-0000-0000-0000-000000000007",
"inventory_product_id": "10000000-0000-0000-0000-000000000043",
"product_name": "Pasas de Corinto",
"product_code": "PAS-COR-001",
"ordered_quantity": 10.0,
"unit_of_measure": "kilograms",
"unit_price": 4.50,
"line_total": 45.00,
"received_quantity": 10.0,
"remaining_quantity": 0.0
}
]
}

View File

@@ -0,0 +1,306 @@
{
"customers": [
{
"id": "60000000-0000-0000-0000-000000000001",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"customer_code": "CUST-001",
"name": "Restaurante El Buen Yantar",
"customer_type": "WHOLESALE",
"contact_person": "Luis Gómez",
"email": "compras@buenyantar.es",
"phone": "+34 912 345 678",
"address": "Calle Mayor, 45",
"city": "Madrid",
"postal_code": "28013",
"country": "España",
"status": "ACTIVE",
"total_orders": 45,
"total_spent": 3250.75,
"created_at": "2025-01-15T06:00:00Z",
"notes": "Regular wholesale customer - weekly orders"
},
{
"id": "60000000-0000-0000-0000-000000000002",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"customer_code": "CUST-002",
"name": "Cafetería La Esquina",
"customer_type": "RETAIL",
"contact_person": "Marta Ruiz",
"email": "cafeteria@laesquina.com",
"phone": "+34 913 456 789",
"address": "Plaza del Sol, 12",
"city": "Madrid",
"postal_code": "28012",
"country": "España",
"status": "ACTIVE",
"total_orders": 12,
"total_spent": 850.20,
"created_at": "2025-01-15T06:00:00Z",
"notes": "Small retail customer - biweekly orders"
},
{
"id": "60000000-0000-0000-0000-000000000003",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"customer_code": "CUST-003",
"name": "Hotel Madrid Plaza",
"customer_type": "WHOLESALE",
"contact_person": "Carlos Fernández",
"email": "compras@hotelmadridplaza.com",
"phone": "+34 914 567 890",
"address": "Calle Gran Vía, 25",
"city": "Madrid",
"postal_code": "28013",
"country": "España",
"status": "ACTIVE",
"total_orders": 28,
"total_spent": 2150.50,
"created_at": "2025-01-15T06:00:00Z",
"notes": "Hotel chain - large volume orders"
},
{
"id": "60000000-0000-0000-0000-000000000004",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"customer_code": "CUST-004",
"name": "Panadería Los Nogales",
"customer_type": "RETAIL",
"contact_person": "Ana López",
"email": "panaderia@losnogales.es",
"phone": "+34 915 678 901",
"address": "Calle Alcala, 120",
"city": "Madrid",
"postal_code": "28009",
"country": "España",
"status": "ACTIVE",
"total_orders": 8,
"total_spent": 620.40,
"created_at": "2025-01-15T06:00:00Z",
"notes": "Local bakery - frequent small orders"
},
{
"id": "60000000-0000-0000-0000-000000000005",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"customer_code": "CUST-005",
"name": "Supermercado EcoMarket",
"customer_type": "WHOLESALE",
"contact_person": "Pedro Martínez",
"email": "compras@ecomarket.es",
"phone": "+34 916 789 012",
"address": "Avenida América, 35",
"city": "Madrid",
"postal_code": "28002",
"country": "España",
"status": "ACTIVE",
"total_orders": 15,
"total_spent": 1250.75,
"created_at": "2025-01-15T06:00:00Z",
"notes": "Organic supermarket chain - premium products"
}
],
"customer_orders": [
{
"id": "60000000-0000-0000-0000-000000000001",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"customer_id": "60000000-0000-0000-0000-000000000001",
"order_number": "ORD-20250115-001",
"order_date": "2025-01-14T11:00:00Z",
"delivery_date": "2025-01-15T09:00:00Z",
"status": "DELIVERED",
"total_amount": 125.50,
"created_at": "2025-01-15T06:00:00Z",
"notes": "Regular weekly order"
},
{
"id": "60000000-0000-0000-0000-000000000002",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"customer_id": "60000000-0000-0000-0000-000000000002",
"order_number": "ORD-20250115-002",
"order_date": "2025-01-14T14:00:00Z",
"delivery_date": "2025-01-15T10:00:00Z",
"status": "DELIVERED",
"total_amount": 45.20,
"created_at": "2025-01-15T06:00:00Z",
"notes": "Small retail order"
},
{
"id": "60000000-0000-0000-0000-000000000099",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"customer_id": "60000000-0000-0000-0000-000000000001",
"order_number": "ORD-URGENT-001",
"order_date": "2025-01-15T07:00:00Z",
"delivery_date": "2025-01-15T08:30:00Z",
"status": "PENDING",
"total_amount": 185.75,
"is_urgent": true,
"created_at": "2025-01-15T06:00:00Z",
"notes": "Urgent order - special event at restaurant",
"reasoning_data": {
"type": "urgent_delivery",
"parameters": {
"event_type": "special_event",
"required_time": "2025-01-15T08:30:00Z",
"priority": "high"
}
}
},
{
"id": "60000000-0000-0000-0000-000000000100",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"customer_id": "60000000-0000-0000-0000-000000000005",
"order_number": "ORD-20250115-003",
"order_date": "2025-01-15T08:00:00Z",
"delivery_date": "2025-01-15T10:00:00Z",
"status": "PENDING",
"total_amount": 215.50,
"created_at": "2025-01-15T06:00:00Z",
"notes": "Regular wholesale order - organic products",
"reasoning_data": {
"type": "standard_delivery",
"parameters": {
"delivery_window": "morning",
"priority": "medium"
}
}
}
],
"order_items": [
{
"id": "60000000-0000-0000-0000-000000000101",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"order_id": "60000000-0000-0000-0000-000000000001",
"product_id": "20000000-0000-0000-0000-000000000001",
"quantity": 50.0,
"unit_price": 2.50,
"total_price": 125.00,
"created_at": "2025-01-15T06:00:00Z"
},
{
"id": "60000000-0000-0000-0000-000000000102",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"order_id": "60000000-0000-0000-0000-000000000002",
"product_id": "20000000-0000-0000-0000-000000000002",
"quantity": 12.0,
"unit_price": 3.75,
"total_price": 45.00,
"created_at": "2025-01-15T06:00:00Z"
},
{
"id": "60000000-0000-0000-0000-000000000199",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"order_id": "60000000-0000-0000-0000-000000000099",
"product_id": "20000000-0000-0000-0000-000000000001",
"quantity": 75.0,
"unit_price": 2.45,
"total_price": 183.75,
"created_at": "2025-01-15T06:00:00Z",
"notes": "Urgent delivery - priority processing"
},
{
"id": "60000000-0000-0000-0000-000000000103",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"order_id": "60000000-0000-0000-0000-000000000100",
"product_id": "20000000-0000-0000-0000-000000000003",
"quantity": 20.0,
"unit_price": 3.25,
"total_price": 65.00,
"created_at": "2025-01-15T06:00:00Z"
}
],
"completed_orders": [
{
"id": "60000000-0000-0000-0000-000000000201",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"customer_id": "60000000-0000-0000-0000-000000000001",
"order_number": "ORD-20250114-001",
"order_date": "2025-01-13T10:00:00Z",
"delivery_date": "2025-01-13T12:00:00Z",
"status": "DELIVERED",
"total_amount": 150.25,
"created_at": "2025-01-13T10:00:00Z",
"notes": "Regular weekly order - delivered on time"
},
{
"id": "60000000-0000-0000-0000-000000000202",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"customer_id": "60000000-0000-0000-0000-000000000003",
"order_number": "ORD-20250114-002",
"order_date": "2025-01-13T14:00:00Z",
"delivery_date": "2025-01-14T08:00:00Z",
"status": "DELIVERED",
"total_amount": 225.75,
"created_at": "2025-01-13T14:00:00Z",
"notes": "Hotel order - large quantity for breakfast service"
},
{
"id": "60000000-0000-0000-0000-000000000203",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"customer_id": "60000000-0000-0000-0000-000000000002",
"order_number": "ORD-20250113-001",
"order_date": "2025-01-12T09:00:00Z",
"delivery_date": "2025-01-12T11:00:00Z",
"status": "DELIVERED",
"total_amount": 55.50,
"created_at": "2025-01-12T09:00:00Z",
"notes": "Small retail order - delivered on time"
},
{
"id": "60000000-0000-0000-0000-000000000204",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"customer_id": "60000000-0000-0000-0000-000000000004",
"order_number": "ORD-20250113-002",
"order_date": "2025-01-12T11:00:00Z",
"delivery_date": "2025-01-12T14:00:00Z",
"status": "DELIVERED",
"total_amount": 42.75,
"created_at": "2025-01-12T11:00:00Z",
"notes": "Local bakery order - small quantity"
},
{
"id": "60000000-0000-0000-0000-000000000205",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"customer_id": "60000000-0000-0000-0000-000000000005",
"order_number": "ORD-20250112-001",
"order_date": "2025-01-11T10:00:00Z",
"delivery_date": "2025-01-11T16:00:00Z",
"status": "DELIVERED",
"total_amount": 185.25,
"created_at": "2025-01-11T10:00:00Z",
"notes": "Organic supermarket order - premium products"
},
{
"id": "60000000-0000-0000-0000-000000000206",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"customer_id": "60000000-0000-0000-0000-000000000001",
"order_number": "ORD-20250111-001",
"order_date": "2025-01-10T08:00:00Z",
"delivery_date": "2025-01-10T10:00:00Z",
"status": "DELIVERED",
"total_amount": 135.50,
"created_at": "2025-01-10T08:00:00Z",
"notes": "Regular wholesale order - delivered on time"
},
{
"id": "60000000-0000-0000-0000-000000000207",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"customer_id": "60000000-0000-0000-0000-000000000003",
"order_number": "ORD-20250110-001",
"order_date": "2025-01-09T15:00:00Z",
"delivery_date": "2025-01-10T07:00:00Z",
"status": "DELIVERED",
"total_amount": 195.75,
"created_at": "2025-01-09T15:00:00Z",
"notes": "Hotel order - evening delivery for next morning"
},
{
"id": "60000000-0000-0000-0000-000000000208",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"customer_id": "60000000-0000-0000-0000-000000000002",
"order_number": "ORD-20250109-001",
"order_date": "2025-01-08T10:00:00Z",
"delivery_date": "2025-01-08T12:00:00Z",
"status": "DELIVERED",
"total_amount": 48.25,
"created_at": "2025-01-08T10:00:00Z",
"notes": "Small retail order - delivered on time"
}
]
}

View File

@@ -0,0 +1,72 @@
{
"sales_data": [
{
"id": "70000000-0000-0000-0000-000000000001",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"sale_date": "2025-01-14T10:00:00Z",
"product_id": "20000000-0000-0000-0000-000000000001",
"quantity_sold": 45.0,
"unit_price": 2.50,
"total_revenue": 112.50,
"sales_channel": "IN_STORE",
"created_at": "2025-01-15T06:00:00Z",
"notes": "Regular daily sales"
},
{
"id": "70000000-0000-0000-0000-000000000002",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"sale_date": "2025-01-14T11:00:00Z",
"product_id": "20000000-0000-0000-0000-000000000002",
"quantity_sold": 10.0,
"unit_price": 3.75,
"total_revenue": 37.50,
"sales_channel": "IN_STORE",
"created_at": "2025-01-15T06:00:00Z",
"notes": "Morning croissant sales"
},
{
"id": "70000000-0000-0000-0000-000000000003",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"sale_date": "2025-01-14T12:00:00Z",
"product_id": "20000000-0000-0000-0000-000000000003",
"quantity_sold": 8.0,
"unit_price": 2.25,
"total_revenue": 18.00,
"sales_channel": "IN_STORE",
"created_at": "2025-01-15T06:00:00Z",
"notes": "Lunch time bread sales"
},
{
"id": "70000000-0000-0000-0000-000000000004",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"sale_date": "2025-01-14T15:00:00Z",
"product_id": "20000000-0000-0000-0000-000000000004",
"quantity_sold": 12.0,
"unit_price": 1.75,
"total_revenue": 21.00,
"sales_channel": "IN_STORE",
"created_at": "2025-01-15T06:00:00Z",
"notes": "Afternoon pastry sales"
},
{
"id": "70000000-0000-0000-0000-000000000099",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"sale_date": "2025-01-15T07:30:00Z",
"product_id": "20000000-0000-0000-0000-000000000001",
"quantity_sold": 25.0,
"unit_price": 2.60,
"total_revenue": 65.00,
"sales_channel": "IN_STORE",
"created_at": "2025-01-15T06:00:00Z",
"notes": "Early morning rush - higher price point",
"reasoning_data": {
"type": "peak_demand",
"parameters": {
"demand_factor": 1.2,
"time_period": "morning_rush",
"price_adjustment": 0.10
}
}
}
]
}

View File

@@ -0,0 +1,164 @@
{
"forecasts": [
{
"id": "80000000-0000-0000-0000-000000000001",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"product_id": "20000000-0000-0000-0000-000000000001",
"forecast_date": "2025-01-16T00:00:00Z",
"predicted_quantity": 50.0,
"confidence_score": 0.92,
"forecast_horizon_days": 1,
"created_at": "2025-01-15T06:00:00Z",
"notes": "Regular daily demand forecast"
},
{
"id": "80000000-0000-0000-0000-000000000002",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"product_id": "20000000-0000-0000-0000-000000000002",
"forecast_date": "2025-01-16T00:00:00Z",
"predicted_quantity": 15.0,
"confidence_score": 0.88,
"forecast_horizon_days": 1,
"created_at": "2025-01-15T06:00:00Z",
"notes": "Croissant demand forecast"
},
{
"id": "80000000-0000-0000-0000-000000000003",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"product_id": "20000000-0000-0000-0000-000000000003",
"forecast_date": "2025-01-16T00:00:00Z",
"predicted_quantity": 10.0,
"confidence_score": 0.85,
"forecast_horizon_days": 1,
"created_at": "2025-01-15T06:00:00Z",
"notes": "Country bread demand forecast"
},
{
"id": "80000000-0000-0000-0000-000000000099",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"product_id": "20000000-0000-0000-0000-000000000001",
"forecast_date": "2025-01-17T00:00:00Z",
"predicted_quantity": 75.0,
"confidence_score": 0.95,
"forecast_horizon_days": 2,
"created_at": "2025-01-15T06:00:00Z",
"notes": "Weekend demand spike forecast",
"reasoning_data": {
"type": "demand_spike",
"parameters": {
"event_type": "weekend",
"demand_increase_factor": 1.5,
"historical_pattern": "weekend_spike"
}
}
},
{
"id": "80000000-0000-0000-0000-000000000100",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"product_id": "20000000-0000-0000-0000-000000000001",
"forecast_date": "2025-01-18T00:00:00Z",
"predicted_quantity": 60.0,
"confidence_score": 0.92,
"forecast_horizon_days": 3,
"created_at": "2025-01-15T06:00:00Z",
"notes": "Sunday demand forecast - slightly lower than Saturday",
"historical_accuracy": 0.90
},
{
"id": "80000000-0000-0000-0000-000000000101",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"product_id": "20000000-0000-0000-0000-000000000002",
"forecast_date": "2025-01-16T00:00:00Z",
"predicted_quantity": 15.0,
"confidence_score": 0.88,
"forecast_horizon_days": 1,
"created_at": "2025-01-15T06:00:00Z",
"notes": "Croissant demand forecast - weekend preparation",
"historical_accuracy": 0.89
},
{
"id": "80000000-0000-0000-0000-000000000102",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"product_id": "20000000-0000-0000-0000-000000000002",
"forecast_date": "2025-01-17T00:00:00Z",
"predicted_quantity": 25.0,
"confidence_score": 0.90,
"forecast_horizon_days": 2,
"created_at": "2025-01-15T06:00:00Z",
"notes": "Weekend croissant demand - higher than weekdays",
"historical_accuracy": 0.91
},
{
"id": "80000000-0000-0000-0000-000000000103",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"product_id": "20000000-0000-0000-0000-000000000003",
"forecast_date": "2025-01-16T00:00:00Z",
"predicted_quantity": 10.0,
"confidence_score": 0.85,
"forecast_horizon_days": 1,
"created_at": "2025-01-15T06:00:00Z",
"notes": "Country bread demand forecast",
"historical_accuracy": 0.88
},
{
"id": "80000000-0000-0000-0000-000000000104",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"product_id": "20000000-0000-0000-0000-000000000003",
"forecast_date": "2025-01-17T00:00:00Z",
"predicted_quantity": 12.0,
"confidence_score": 0.87,
"forecast_horizon_days": 2,
"created_at": "2025-01-15T06:00:00Z",
"notes": "Weekend country bread demand",
"historical_accuracy": 0.90
},
{
"id": "80000000-0000-0000-0000-000000000105",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"product_id": "20000000-0000-0000-0000-000000000001",
"forecast_date": "2025-01-19T00:00:00Z",
"predicted_quantity": 45.0,
"confidence_score": 0.91,
"forecast_horizon_days": 4,
"created_at": "2025-01-15T06:00:00Z",
"notes": "Monday demand - back to normal after weekend",
"historical_accuracy": 0.92
},
{
"id": "80000000-0000-0000-0000-000000000106",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"product_id": "20000000-0000-0000-0000-000000000001",
"forecast_date": "2025-01-20T00:00:00Z",
"predicted_quantity": 48.0,
"confidence_score": 0.90,
"forecast_horizon_days": 5,
"created_at": "2025-01-15T06:00:00Z",
"notes": "Tuesday demand forecast",
"historical_accuracy": 0.90
},
{
"id": "80000000-0000-0000-0000-000000000107",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"product_id": "20000000-0000-0000-0000-000000000001",
"forecast_date": "2025-01-21T00:00:00Z",
"predicted_quantity": 50.0,
"confidence_score": 0.89,
"forecast_horizon_days": 6,
"created_at": "2025-01-15T06:00:00Z",
"notes": "Wednesday demand forecast",
"historical_accuracy": 0.89
}
],
"prediction_batches": [
{
"id": "80000000-0000-0000-0000-000000001001",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"batch_id": "20250116-001",
"prediction_date": "2025-01-15T06:00:00Z",
"status": "COMPLETED",
"total_forecasts": 4,
"created_at": "2025-01-15T06:00:00Z",
"notes": "Daily forecasting batch"
}
]
}

View File

@@ -0,0 +1,160 @@
{
"orchestration_run": {
"id": "90000000-0000-0000-0000-000000000001",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"run_number": "ORCH-20250114-001",
"status": "completed",
"run_type": "daily",
"started_at": "2025-01-14T22:00:00Z",
"completed_at": "2025-01-14T22:15:00Z",
"duration_seconds": 900,
"trigger_type": "scheduled",
"trigger_source": "system",
"created_at": "2025-01-14T22:00:00Z",
"updated_at": "2025-01-14T22:15:00Z",
"notes": "Nightly orchestration run - Last successful execution before demo session"
},
"orchestration_results": {
"production_batches_created": 18,
"production_batches_completed": 15,
"production_batches_in_progress": 3,
"purchase_orders_created": 6,
"purchase_orders_approved": 4,
"purchase_orders_pending_approval": 2,
"inventory_updates": 25,
"stock_alerts_generated": 3,
"quality_checks_performed": 12,
"delivery_schedules_updated": 4,
"forecasts_generated": 10,
"ai_insights_posted": 5,
"notifications_sent": 8,
"errors_encountered": 0,
"warnings_generated": 2
},
"production_coordination": {
"batches_synchronized": [
{
"batch_id": "40000000-0000-0000-0000-000000000001",
"product_name": "Baguette Francesa Tradicional",
"quantity": 98.0,
"status": "COMPLETED",
"coordinated_with_po": "50000000-0000-0000-0000-000000000001",
"flour_consumed": 50.0,
"yeast_consumed": 2.0,
"butter_consumed": 1.5
},
{
"batch_id": "40000000-0000-0000-0000-000000000002",
"product_name": "Croissant de Mantequilla Artesanal",
"quantity": 115.0,
"status": "COMPLETED",
"coordinated_with_po": "50000000-0000-0000-0000-000000000002",
"flour_consumed": 30.0,
"yeast_consumed": 1.5,
"butter_consumed": 15.0
},
{
"batch_id": "40000000-0000-0000-0000-000000000003",
"product_name": "Pan de Pueblo con Masa Madre",
"quantity": 80.0,
"status": "COMPLETED",
"coordinated_with_po": "50000000-0000-0000-0000-000000000001",
"flour_consumed": 40.0,
"yeast_consumed": 1.0
}
],
"production_alerts": [
{
"alert_type": "LOW_STOCK",
"product_id": "10000000-0000-0000-0000-000000000001",
"product_name": "Harina de Trigo T55",
"current_stock": 150.0,
"threshold": 200.0,
"severity": "WARNING",
"related_po": "50000000-0000-0000-0000-000000000004"
},
{
"alert_type": "DELAYED_DELIVERY",
"product_id": "10000000-0000-0000-0000-000000000001",
"product_name": "Harina de Trigo T55",
"expected_delivery": "2025-01-14T10:00:00Z",
"actual_delivery": "2025-01-14T14:00:00Z",
"delay_hours": 4,
"severity": "CRITICAL",
"related_po": "50000000-0000-0000-0000-000000000004",
"impacted_batches": [
"40000000-0000-0000-0000-0000000000a3"
]
}
]
},
"procurement_coordination": {
"purchase_orders_processed": [
{
"po_id": "50000000-0000-0000-0000-000000000001",
"supplier_id": "40000000-0000-0000-0000-000000000001",
"supplier_name": "Harinas del Norte",
"status": "completed",
"total_amount": 1053.50,
"items_received": 3,
"items_pending": 0,
"delivery_status": "on_time"
},
{
"po_id": "50000000-0000-0000-0000-000000000002",
"supplier_id": "40000000-0000-0000-0000-000000000002",
"supplier_name": "Lácteos Gipuzkoa",
"status": "completed",
"total_amount": 402.20,
"items_received": 1,
"items_pending": 0,
"delivery_status": "on_time"
},
{
"po_id": "50000000-0000-0000-0000-000000000004",
"supplier_id": "40000000-0000-0000-0000-000000000001",
"supplier_name": "Harinas del Norte",
"status": "confirmed",
"total_amount": 1427.00,
"items_received": 0,
"items_pending": 2,
"delivery_status": "delayed",
"delay_hours": 4,
"urgency": "high"
}
],
"procurement_alerts": [
{
"alert_type": "PO_APPROVAL_ESCALATION",
"po_id": "50000000-0000-0000-0000-000000000003",
"supplier_name": "Eco-Proveedores",
"status": "pending_approval",
"age_hours": 72,
"severity": "WARNING",
"reason": "Auto-approval threshold not met"
}
]
},
"inventory_synchronization": {
"stock_updates": 25,
"low_stock_alerts": 3,
"expiration_alerts": 1,
"stock_movements": 15,
"inventory_accuracy": 98.5
},
"ai_insights": {
"yield_improvement_suggestions": 2,
"waste_reduction_opportunities": 1,
"demand_forecasting_updates": 3,
"procurement_optimization": 2,
"production_scheduling": 1
},
"system_state": {
"last_successful_run": "2025-01-14T22:00:00Z",
"next_scheduled_run": "2025-01-15T22:00:00Z",
"system_health": "healthy",
"api_availability": 100.0,
"database_performance": "optimal",
"integration_status": "all_connected"
}
}

View File

@@ -0,0 +1,118 @@
{
"quality_controls": [
{
"id": "70000000-0000-0000-0000-000000000001",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"batch_id": "40000000-0000-0000-0000-000000000001",
"product_id": "20000000-0000-0000-0000-000000000001",
"product_name": "Baguette Francesa Tradicional",
"control_type": "visual_inspection",
"control_date": "2025-01-08T14:30:00Z",
"status": "COMPLETED",
"result": "PASSED",
"quality_score": 95.0,
"inspected_by": "50000000-0000-0000-0000-000000000007",
"notes": "Excelente aspecto y textura, 2 unidades con quemaduras leves (dentro de tolerancia)",
"defects_found": [
{
"defect_type": "burnt",
"quantity": 2.0,
"severity": "minor"
}
],
"corrective_actions": null,
"created_at": "2025-01-08T14:30:00Z",
"updated_at": "2025-01-08T14:45:00Z"
},
{
"id": "70000000-0000-0000-0000-000000000002",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"batch_id": "40000000-0000-0000-0000-000000000002",
"product_id": "20000000-0000-0000-0000-000000000002",
"product_name": "Croissant de Mantequilla Artesanal",
"control_type": "dimensional_check",
"control_date": "2025-01-08T14:45:00Z",
"status": "COMPLETED",
"result": "PASSED",
"quality_score": 92.0,
"inspected_by": "50000000-0000-0000-0000-000000000007",
"notes": "Buen desarrollo y laminado, 3 unidades con forma irregular (dentro de tolerancia)",
"defects_found": [
{
"defect_type": "misshapen",
"quantity": 3.0,
"severity": "minor"
}
],
"corrective_actions": null,
"created_at": "2025-01-08T14:45:00Z",
"updated_at": "2025-01-08T15:00:00Z"
},
{
"id": "70000000-0000-0000-0000-000000000003",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"batch_id": "40000000-0000-0000-0000-000000000004",
"product_id": "20000000-0000-0000-0000-000000000004",
"product_name": "Napolitana de Chocolate",
"control_type": "taste_test",
"control_date": "2025-01-09T14:30:00Z",
"status": "COMPLETED",
"result": "FAILED",
"quality_score": 65.0,
"inspected_by": "50000000-0000-0000-0000-000000000007",
"notes": "⚠️ CRITICAL: Sabor amargo en el chocolate, posible problema con proveedor de cacao",
"defects_found": [
{
"defect_type": "off_taste",
"quantity": 10.0,
"severity": "major"
}
],
"corrective_actions": [
"Lote puesto en cuarentena",
"Notificado proveedor de chocolate",
"Programada nueva prueba con muestra diferente"
],
"batch_status_after_control": "QUARANTINED",
"created_at": "2025-01-09T14:30:00Z",
"updated_at": "2025-01-09T15:00:00Z"
},
{
"id": "70000000-0000-0000-0000-000000000004",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"batch_id": "40000000-0000-0000-0000-000000000015",
"product_id": "20000000-0000-0000-0000-000000000001",
"product_name": "Baguette Francesa Tradicional",
"control_type": "visual_inspection",
"control_date": "BASE_TS + 0h",
"status": "PENDING",
"result": null,
"quality_score": null,
"inspected_by": null,
"notes": "⚠️ PENDING: Control de calidad programado para lote en producción",
"defects_found": null,
"corrective_actions": null,
"batch_status_after_control": "QUALITY_CHECK",
"created_at": "2025-01-15T06:00:00Z",
"updated_at": "2025-01-15T06:00:00Z"
}
],
"quality_alerts": [
{
"id": "71000000-0000-0000-0000-000000000001",
"tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"alert_type": "QUALITY_FAILURE",
"severity": "HIGH",
"status": "OPEN",
"related_control_id": "70000000-0000-0000-0000-000000000003",
"related_batch_id": "40000000-0000-0000-0000-000000000004",
"product_id": "20000000-0000-0000-0000-000000000004",
"product_name": "Napolitana de Chocolate",
"description": "Fallo crítico en control de calidad - Sabor amargo en chocolate",
"created_at": "2025-01-09T15:00:00Z",
"acknowledged_at": "2025-01-09T15:15:00Z",
"resolved_at": null,
"notes": "Lote en cuarentena, investigación en curso con proveedor"
}
]
}

View File

@@ -0,0 +1,82 @@
{
"description": "Map of cross-service references for validation",
"references": [
{
"from_service": "production",
"from_entity": "ProductionBatch",
"from_field": "product_id",
"to_service": "inventory",
"to_entity": "Ingredient",
"to_filter": {"product_type": "FINISHED_PRODUCT"},
"required": true
},
{
"from_service": "production",
"from_entity": "ProductionBatch",
"from_field": "recipe_id",
"to_service": "recipes",
"to_entity": "Recipe",
"required": false
},
{
"from_service": "recipes",
"from_entity": "RecipeIngredient",
"from_field": "ingredient_id",
"to_service": "inventory",
"to_entity": "Ingredient",
"to_filter": {"product_type": "INGREDIENT"},
"required": true
},
{
"from_service": "inventory",
"from_entity": "Stock",
"from_field": "supplier_id",
"to_service": "suppliers",
"to_entity": "Supplier",
"required": false
},
{
"from_service": "procurement",
"from_entity": "PurchaseOrder",
"from_field": "supplier_id",
"to_service": "suppliers",
"to_entity": "Supplier",
"required": true
},
{
"from_service": "procurement",
"from_entity": "PurchaseOrderItem",
"from_field": "inventory_product_id",
"to_service": "inventory",
"to_entity": "Ingredient",
"required": true
},
{
"from_service": "orders",
"from_entity": "OrderItem",
"from_field": "product_id",
"to_service": "inventory",
"to_entity": "Ingredient",
"to_filter": {"product_type": "FINISHED_PRODUCT"},
"required": true
},
{
"from_service": "sales",
"from_entity": "SalesData",
"from_field": "product_id",
"to_service": "inventory",
"to_entity": "Ingredient",
"to_filter": {"product_type": "FINISHED_PRODUCT"},
"required": true
},
{
"from_service": "forecasting",
"from_entity": "Forecast",
"from_field": "product_id",
"to_service": "inventory",
"to_entity": "Ingredient",
"to_filter": {"product_type": "FINISHED_PRODUCT"},
"required": true
}
]
}

View File

@@ -0,0 +1,108 @@
{
"owners": {
"professional": {
"id": "c1a2b3c4-d5e6-47a8-b9c0-d1e2f3a4b5c6",
"name": "María García López",
"email": "maria.garcia@panaderiaartesana.com",
"role": "owner",
"created_at": "2025-01-15T06:00:00Z"
},
"enterprise": {
"id": "d2e3f4a5-b6c7-48d9-e0f1-a2b3c4d5e6f7",
"name": "Carlos Martínez Ruiz",
"email": "carlos.martinez@panaderiacentral.com",
"role": "owner",
"created_at": "2025-01-15T06:00:00Z"
}
},
"staff": {
"professional": [
{
"id": "50000000-0000-0000-0000-000000000001",
"name": "Juan Panadero",
"role": "baker",
"email": "juan.panadero@panaderiaartesana.com",
"created_at": "2025-01-15T06:00:00Z"
},
{
"id": "50000000-0000-0000-0000-000000000002",
"name": "Ana Ventas",
"role": "sales",
"email": "ana.ventas@panaderiaartesana.com",
"created_at": "2025-01-15T06:00:00Z"
},
{
"id": "50000000-0000-0000-0000-000000000003",
"name": "Pedro Calidad",
"role": "quality_control",
"email": "pedro.calidad@panaderiaartesana.com",
"created_at": "2025-01-15T06:00:00Z"
},
{
"id": "50000000-0000-0000-0000-000000000004",
"name": "Laura Admin",
"role": "admin",
"email": "laura.admin@panaderiaartesana.com",
"created_at": "2025-01-15T06:00:00Z"
},
{
"id": "50000000-0000-0000-0000-000000000005",
"name": "Carlos Almacén",
"role": "warehouse",
"email": "carlos.almacen@panaderiaartesana.com",
"created_at": "2025-01-15T06:00:00Z"
},
{
"id": "50000000-0000-0000-0000-000000000006",
"name": "Isabel Producción",
"role": "production_manager",
"email": "isabel.produccion@panaderiaartesana.com",
"created_at": "2025-01-15T06:00:00Z"
}
],
"enterprise": [
{
"id": "50000000-0000-0000-0000-000000000011",
"name": "Roberto Producción",
"role": "production_manager",
"email": "roberto.produccion@panaderiacentral.com",
"created_at": "2025-01-15T06:00:00Z"
},
{
"id": "50000000-0000-0000-0000-000000000012",
"name": "Marta Calidad",
"role": "quality_control",
"email": "marta.calidad@panaderiacentral.com",
"created_at": "2025-01-15T06:00:00Z"
},
{
"id": "50000000-0000-0000-0000-000000000013",
"name": "Javier Logística",
"role": "logistics",
"email": "javier.logistica@panaderiacentral.com",
"created_at": "2025-01-15T06:00:00Z"
},
{
"id": "50000000-0000-0000-0000-000000000014",
"name": "Carmen Ventas",
"role": "sales",
"email": "carmen.ventas@panaderiacentral.com",
"created_at": "2025-01-15T06:00:00Z"
},
{
"id": "50000000-0000-0000-0000-000000000015",
"name": "Luis Compras",
"role": "procurement",
"email": "luis.compras@panaderiacentral.com",
"created_at": "2025-01-15T06:00:00Z"
},
{
"id": "50000000-0000-0000-0000-000000000016",
"name": "Miguel Mantenimiento",
"role": "maintenance",
"email": "miguel.mantenimiento@panaderiacentral.com",
"created_at": "2025-01-15T06:00:00Z"
}
]
}
}

View File

@@ -0,0 +1,57 @@
{
"professional": {
"base_tenant_id": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6",
"email": "demo.professional@panaderiaartesana.com",
"name": "Panadería Artesana Madrid - Demo",
"subdomain": "demo-artesana",
"subscription_tier": "professional",
"tenant_type": "standalone",
"description": "Professional tier demo tenant for bakery operations",
"created_at": "2025-01-15T06:00:00Z"
},
"enterprise": {
"base_tenant_id": "80000000-0000-4000-a000-000000000001",
"email": "demo.enterprise@panaderiacentral.com",
"name": "Panadería Central - Demo Enterprise",
"subdomain": "demo-central",
"subscription_tier": "enterprise",
"tenant_type": "parent",
"description": "Enterprise tier demo tenant with multiple locations",
"created_at": "2025-01-15T06:00:00Z",
"children": [
{
"name": "Madrid Centro",
"base_tenant_id": "A0000000-0000-4000-a000-000000000001",
"location": {
"city": "Madrid",
"zone": "Centro",
"latitude": 40.4168,
"longitude": -3.7038
},
"description": "Central Madrid location"
},
{
"name": "Barcelona Gràcia",
"base_tenant_id": "B0000000-0000-4000-a000-000000000001",
"location": {
"city": "Barcelona",
"zone": "Gràcia",
"latitude": 41.4036,
"longitude": 2.1561
},
"description": "Barcelona Gràcia district location"
},
{
"name": "Valencia Ruzafa",
"base_tenant_id": "C0000000-0000-4000-a000-000000000001",
"location": {
"city": "Valencia",
"zone": "Ruzafa",
"latitude": 39.4623,
"longitude": -0.3645
},
"description": "Valencia Ruzafa neighborhood location"
}
]
}
}

View File

@@ -0,0 +1,102 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Forecast",
"description": "Schema for demand forecast data in Bakery-IA system",
"type": "object",
"required": [
"id",
"tenant_id",
"product_id",
"forecast_date",
"predicted_quantity",
"confidence_score",
"forecast_horizon_days",
"created_at"
],
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "Unique identifier for the forecast"
},
"tenant_id": {
"type": "string",
"format": "uuid",
"description": "Tenant identifier"
},
"product_id": {
"type": "string",
"format": "uuid",
"description": "Product identifier"
},
"forecast_date": {
"type": "string",
"format": "date-time",
"description": "Forecast date"
},
"predicted_quantity": {
"type": "number",
"minimum": 0,
"description": "Predicted quantity"
},
"confidence_score": {
"type": "number",
"minimum": 0,
"maximum": 1,
"description": "Confidence score (0-1)"
},
"forecast_horizon_days": {
"type": "integer",
"minimum": 0,
"description": "Forecast horizon in days"
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "Creation timestamp"
},
"notes": {
"type": "string",
"description": "Additional notes"
},
"enterprise_forecast": {
"type": "boolean",
"description": "Enterprise-level forecast"
},
"forecast_type": {
"type": "string",
"description": "Type of forecast"
},
"contract_reference": {
"type": "string",
"description": "Contract reference"
},
"customer_id": {
"type": "string",
"format": "uuid",
"description": "Customer identifier"
},
"delivery_locations": {
"type": "array",
"items": {
"type": "string"
},
"description": "Delivery locations"
},
"reasoning_data": {
"type": "object",
"description": "Reasoning data for special forecasts",
"properties": {
"type": {
"type": "string",
"description": "Reasoning type"
},
"parameters": {
"type": "object",
"description": "Reasoning parameters"
}
}
}
},
"additionalProperties": false
}

View 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"]
}
}
]
}

View 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
}

View File

@@ -0,0 +1,137 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Customer",
"description": "Schema for customer data in Bakery-IA system",
"type": "object",
"required": [
"id",
"tenant_id",
"customer_code",
"name",
"customer_type",
"contact_person",
"email",
"phone",
"address",
"city",
"postal_code",
"country",
"status",
"created_at"
],
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "Unique identifier for the customer"
},
"tenant_id": {
"type": "string",
"format": "uuid",
"description": "Tenant identifier"
},
"customer_code": {
"type": "string",
"minLength": 1,
"maxLength": 50,
"description": "Customer code"
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 100,
"description": "Customer name"
},
"customer_type": {
"type": "string",
"enum": ["RETAIL", "WHOLESALE", "ENTERPRISE", "ONLINE"],
"description": "Customer type"
},
"contact_person": {
"type": "string",
"minLength": 1,
"maxLength": 100,
"description": "Primary contact person"
},
"email": {
"type": "string",
"format": "email",
"description": "Contact email"
},
"phone": {
"type": "string",
"minLength": 1,
"maxLength": 20,
"description": "Contact phone number"
},
"address": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Street address"
},
"city": {
"type": "string",
"minLength": 1,
"maxLength": 50,
"description": "City"
},
"postal_code": {
"type": "string",
"minLength": 1,
"maxLength": 10,
"description": "Postal code"
},
"country": {
"type": "string",
"minLength": 1,
"maxLength": 50,
"description": "Country"
},
"status": {
"type": "string",
"enum": ["ACTIVE", "INACTIVE", "PENDING", "SUSPENDED"],
"description": "Customer status"
},
"total_orders": {
"type": "integer",
"minimum": 0,
"description": "Total orders placed"
},
"total_spent": {
"type": "number",
"minimum": 0,
"description": "Total amount spent in EUR"
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "Creation timestamp"
},
"notes": {
"type": "string",
"description": "Additional notes"
},
"enterprise_customer": {
"type": "boolean",
"description": "Enterprise-level customer"
},
"contract_type": {
"type": "string",
"description": "Contract type"
},
"annual_volume_commitment": {
"type": "number",
"minimum": 0,
"description": "Annual volume commitment"
},
"delivery_locations": {
"type": "array",
"items": {
"type": "string"
},
"description": "Delivery locations"
}
},
"additionalProperties": false
}

View File

@@ -0,0 +1,116 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "CustomerOrder",
"description": "Schema for customer order data in Bakery-IA system",
"type": "object",
"required": [
"id",
"tenant_id",
"customer_id",
"order_number",
"order_date",
"delivery_date",
"status",
"total_amount",
"created_at"
],
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "Unique identifier for the customer order"
},
"tenant_id": {
"type": "string",
"format": "uuid",
"description": "Tenant identifier"
},
"customer_id": {
"type": "string",
"format": "uuid",
"description": "Customer identifier"
},
"order_number": {
"type": "string",
"minLength": 1,
"maxLength": 50,
"description": "Order number"
},
"order_date": {
"type": "string",
"format": "date-time",
"description": "Order date"
},
"delivery_date": {
"type": "string",
"format": "date-time",
"description": "Delivery date"
},
"status": {
"type": "string",
"enum": ["DRAFT", "PENDING", "PROCESSING", "DELIVERED", "CANCELLED", "REJECTED"],
"description": "Order status"
},
"total_amount": {
"type": "number",
"minimum": 0,
"description": "Total order amount in EUR"
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "Creation timestamp"
},
"notes": {
"type": "string",
"description": "Additional notes"
},
"is_urgent": {
"type": "boolean",
"description": "Urgent order flag"
},
"enterprise_order": {
"type": "boolean",
"description": "Enterprise-level order"
},
"contract_reference": {
"type": "string",
"description": "Contract reference"
},
"delivery_locations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"location": {
"type": "string"
},
"quantity": {
"type": "number",
"minimum": 0
},
"delivery_time": {
"type": "string",
"format": "date-time"
}
}
},
"description": "Delivery locations"
},
"reasoning_data": {
"type": "object",
"description": "Reasoning data for urgent orders",
"properties": {
"type": {
"type": "string",
"description": "Reasoning type"
},
"parameters": {
"type": "object",
"description": "Reasoning parameters"
}
}
}
},
"additionalProperties": false
}

View File

@@ -0,0 +1,104 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "PurchaseOrder",
"description": "Schema for purchase order data in Bakery-IA system",
"type": "object",
"required": [
"id",
"tenant_id",
"po_number",
"supplier_id",
"order_date",
"expected_delivery_date",
"status",
"total_amount",
"created_at"
],
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "Unique identifier for the purchase order"
},
"tenant_id": {
"type": "string",
"format": "uuid",
"description": "Tenant identifier"
},
"po_number": {
"type": "string",
"minLength": 1,
"maxLength": 50,
"description": "Purchase order number"
},
"supplier_id": {
"type": "string",
"format": "uuid",
"description": "Supplier identifier"
},
"order_date": {
"type": "string",
"format": "date-time",
"description": "Order date"
},
"expected_delivery_date": {
"type": "string",
"format": "date-time",
"description": "Expected delivery date"
},
"status": {
"type": "string",
"enum": ["DRAFT", "PENDING", "APPROVED", "DELIVERED", "CANCELLED", "REJECTED"],
"description": "Purchase order status"
},
"total_amount": {
"type": "number",
"minimum": 0,
"description": "Total order amount in EUR"
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "Creation timestamp"
},
"notes": {
"type": "string",
"description": "Additional notes"
},
"reasoning_data": {
"type": "object",
"description": "Reasoning data for urgent orders",
"properties": {
"type": {
"type": "string",
"description": "Reasoning type"
},
"parameters": {
"type": "object",
"description": "Reasoning parameters"
}
}
},
"enterprise_order": {
"type": "boolean",
"description": "Enterprise-level order"
},
"contract_reference": {
"type": "string",
"description": "Contract reference"
},
"payment_terms": {
"type": "string",
"description": "Payment terms"
},
"delivery_location": {
"type": "string",
"description": "Delivery location"
},
"incoterms": {
"type": "string",
"description": "International commercial terms"
}
},
"additionalProperties": false
}

View File

@@ -0,0 +1,87 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "PurchaseOrderItem",
"description": "Schema for purchase order item data in Bakery-IA system",
"type": "object",
"required": [
"id",
"tenant_id",
"po_id",
"ingredient_id",
"quantity",
"unit_price",
"total_price",
"created_at"
],
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "Unique identifier for the purchase order item"
},
"tenant_id": {
"type": "string",
"format": "uuid",
"description": "Tenant identifier"
},
"po_id": {
"type": "string",
"format": "uuid",
"description": "Purchase order identifier"
},
"ingredient_id": {
"type": "string",
"format": "uuid",
"description": "Ingredient identifier"
},
"quantity": {
"type": "number",
"minimum": 0,
"description": "Quantity ordered"
},
"unit_price": {
"type": "number",
"minimum": 0,
"description": "Unit price in EUR"
},
"total_price": {
"type": "number",
"minimum": 0,
"description": "Total price in EUR"
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "Creation timestamp"
},
"notes": {
"type": "string",
"description": "Additional notes"
},
"enterprise_item": {
"type": "boolean",
"description": "Enterprise-level item"
},
"delivery_schedule": {
"type": "array",
"items": {
"type": "object",
"properties": {
"delivery_date": {
"type": "string",
"format": "date-time"
},
"quantity": {
"type": "number",
"minimum": 0
},
"location": {
"type": "string"
}
}
},
"description": "Delivery schedule"
}
},
"additionalProperties": false
}

View File

@@ -0,0 +1,261 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://schemas.bakery-ia.com/demo/production/batch/v1",
"type": "object",
"title": "ProductionBatch",
"description": "Production batch for demo cloning",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "Unique batch identifier"
},
"tenant_id": {
"type": "string",
"format": "uuid",
"description": "Tenant owner (replaced during cloning)"
},
"batch_number": {
"type": "string",
"pattern": "^BATCH-[0-9]{8}-[A-Z0-9]{6}$",
"description": "Unique batch code"
},
"product_id": {
"type": "string",
"format": "uuid",
"description": "Cross-service ref to inventory.Ingredient (type=FINISHED_PRODUCT)"
},
"product_name": {
"type": "string",
"minLength": 1,
"maxLength": 255
},
"recipe_id": {
"type": ["string", "null"],
"format": "uuid",
"description": "Cross-service ref to recipes.Recipe"
},
"planned_start_time": {
"type": "string",
"format": "date-time",
"description": "ISO 8601 datetime with timezone"
},
"planned_end_time": {
"type": "string",
"format": "date-time"
},
"planned_quantity": {
"type": "number",
"minimum": 0.1,
"description": "Quantity in product's unit of measure"
},
"planned_duration_minutes": {
"type": "integer",
"minimum": 1
},
"actual_start_time": {
"type": ["string", "null"],
"format": "date-time",
"description": "Set when status becomes IN_PROGRESS"
},
"actual_end_time": {
"type": ["string", "null"],
"format": "date-time",
"description": "Set when status becomes COMPLETED"
},
"actual_quantity": {
"type": ["number", "null"],
"minimum": 0
},
"actual_duration_minutes": {
"type": ["integer", "null"],
"minimum": 1
},
"status": {
"type": "string",
"enum": ["PENDING", "IN_PROGRESS", "COMPLETED", "CANCELLED", "ON_HOLD", "QUALITY_CHECK", "FAILED"],
"default": "PENDING"
},
"priority": {
"type": "string",
"enum": ["LOW", "MEDIUM", "HIGH", "URGENT"],
"default": "MEDIUM"
},
"current_process_stage": {
"type": ["string", "null"],
"enum": ["mixing", "proofing", "shaping", "baking", "cooling", "packaging", "finishing", null]
},
"process_stage_history": {
"type": ["array", "null"],
"items": {
"type": "object",
"properties": {
"stage": {"type": "string"},
"timestamp": {"type": "string", "format": "date-time"}
}
}
},
"pending_quality_checks": {
"type": ["array", "null"],
"items": {"type": "string"}
},
"completed_quality_checks": {
"type": ["array", "null"],
"items": {
"type": "object",
"properties": {
"stage": {"type": "string"},
"score": {"type": "number"},
"timestamp": {"type": "string", "format": "date-time"}
}
}
},
"estimated_cost": {
"type": ["number", "null"],
"minimum": 0
},
"actual_cost": {
"type": ["number", "null"],
"minimum": 0
},
"labor_cost": {
"type": ["number", "null"],
"minimum": 0
},
"material_cost": {
"type": ["number", "null"],
"minimum": 0
},
"overhead_cost": {
"type": ["number", "null"],
"minimum": 0
},
"yield_percentage": {
"type": ["number", "null"],
"minimum": 0,
"maximum": 100
},
"quality_score": {
"type": ["number", "null"],
"minimum": 0,
"maximum": 10
},
"waste_quantity": {
"type": ["number", "null"],
"minimum": 0
},
"defect_quantity": {
"type": ["number", "null"],
"minimum": 0
},
"waste_defect_type": {
"type": ["string", "null"],
"enum": ["burnt", "misshapen", "underproofed", "temperature_issues", "expired", null]
},
"equipment_used": {
"type": ["array", "null"],
"items": {"type": "string", "format": "uuid"},
"minItems": 1,
"description": "Array of Equipment IDs"
},
"staff_assigned": {
"type": ["array", "null"],
"items": {"type": "string", "format": "uuid"}
},
"station_id": {
"type": ["string", "null"],
"maxLength": 50
},
"order_id": {
"type": ["string", "null"],
"format": "uuid",
"description": "Cross-service ref to orders.CustomerOrder"
},
"forecast_id": {
"type": ["string", "null"],
"format": "uuid",
"description": "Cross-service ref to forecasting.Forecast"
},
"is_rush_order": {
"type": "boolean",
"default": false
},
"is_special_recipe": {
"type": "boolean",
"default": false
},
"is_ai_assisted": {
"type": "boolean",
"default": false
},
"production_notes": {
"type": ["string", "null"]
},
"quality_notes": {
"type": ["string", "null"]
},
"delay_reason": {
"type": ["string", "null"],
"maxLength": 255
},
"cancellation_reason": {
"type": ["string", "null"],
"maxLength": 255
},
"reasoning_data": {
"type": ["object", "null"],
"properties": {
"type": {
"type": "string",
"enum": ["forecast_demand", "customer_order", "stock_replenishment"]
},
"parameters": {"type": "object"},
"urgency": {
"type": "object",
"properties": {
"level": {"type": "string"},
"ready_by_time": {"type": "string"},
"customer_commitment": {"type": "boolean"}
}
},
"metadata": {"type": "object"}
}
},
"created_at": {
"type": ["string", "null"],
"format": "date-time"
},
"updated_at": {
"type": ["string", "null"],
"format": "date-time"
},
"completed_at": {
"type": ["string", "null"],
"format": "date-time"
}
},
"required": [
"id", "tenant_id", "batch_number", "product_id", "product_name",
"planned_start_time", "planned_end_time", "planned_quantity",
"planned_duration_minutes", "status", "priority"
],
"additionalProperties": false,
"allOf": [
{
"if": {
"properties": {"status": {"const": "IN_PROGRESS"}}
},
"then": {
"required": ["actual_start_time"]
}
},
{
"if": {
"properties": {"status": {"const": "COMPLETED"}}
},
"then": {
"required": ["actual_start_time", "actual_end_time", "actual_quantity"]
}
}
]
}

View File

@@ -0,0 +1,169 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://schemas.bakery-ia.com/demo/production/equipment/v1",
"type": "object",
"title": "Equipment",
"description": "Production equipment for demo cloning",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "Unique equipment identifier"
},
"tenant_id": {
"type": "string",
"format": "uuid",
"description": "Tenant owner (replaced during cloning)"
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 255
},
"type": {
"type": "string",
"enum": ["oven", "mixer", "proofer", "freezer", "packaging", "other"]
},
"model": {
"type": ["string", "null"],
"maxLength": 100
},
"serial_number": {
"type": ["string", "null"],
"maxLength": 100
},
"location": {
"type": ["string", "null"],
"maxLength": 255
},
"manufacturer": {
"type": ["string", "null"],
"maxLength": 100
},
"firmware_version": {
"type": ["string", "null"],
"maxLength": 50
},
"status": {
"type": "string",
"enum": ["OPERATIONAL", "MAINTENANCE", "DOWN", "WARNING"],
"default": "OPERATIONAL"
},
"install_date": {
"type": ["string", "null"],
"format": "date-time"
},
"last_maintenance_date": {
"type": ["string", "null"],
"format": "date-time"
},
"next_maintenance_date": {
"type": ["string", "null"],
"format": "date-time"
},
"maintenance_interval_days": {
"type": ["integer", "null"],
"minimum": 1
},
"efficiency_percentage": {
"type": ["number", "null"],
"minimum": 0,
"maximum": 100
},
"uptime_percentage": {
"type": ["number", "null"],
"minimum": 0,
"maximum": 100
},
"energy_usage_kwh": {
"type": ["number", "null"],
"minimum": 0
},
"power_kw": {
"type": ["number", "null"],
"minimum": 0
},
"capacity": {
"type": ["number", "null"],
"minimum": 0
},
"weight_kg": {
"type": ["number", "null"],
"minimum": 0
},
"current_temperature": {
"type": ["number", "null"]
},
"target_temperature": {
"type": ["number", "null"]
},
"iot_enabled": {
"type": "boolean",
"default": false
},
"iot_protocol": {
"type": ["string", "null"],
"enum": ["rest_api", "opc_ua", "mqtt", "modbus", "custom"]
},
"iot_endpoint": {
"type": ["string", "null"],
"maxLength": 500
},
"iot_port": {
"type": ["integer", "null"],
"minimum": 1,
"maximum": 65535
},
"iot_connection_status": {
"type": ["string", "null"],
"enum": ["connected", "disconnected", "error", "unknown"]
},
"iot_last_connected": {
"type": ["string", "null"],
"format": "date-time"
},
"supports_realtime": {
"type": "boolean",
"default": false
},
"poll_interval_seconds": {
"type": ["integer", "null"],
"minimum": 1
},
"temperature_zones": {
"type": ["integer", "null"],
"minimum": 1
},
"supports_humidity": {
"type": "boolean",
"default": false
},
"supports_energy_monitoring": {
"type": "boolean",
"default": false
},
"supports_remote_control": {
"type": "boolean",
"default": false
},
"is_active": {
"type": "boolean",
"default": true
},
"notes": {
"type": ["string", "null"]
},
"created_at": {
"type": ["string", "null"],
"format": "date-time"
},
"updated_at": {
"type": ["string", "null"],
"format": "date-time"
}
},
"required": [
"id", "tenant_id", "name", "type", "status", "is_active"
],
"additionalProperties": false
}

View 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
}

View 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
}

View File

@@ -0,0 +1,103 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "SalesData",
"description": "Schema for sales data in Bakery-IA system",
"type": "object",
"required": [
"id",
"tenant_id",
"sale_date",
"product_id",
"quantity_sold",
"unit_price",
"total_revenue",
"sales_channel",
"created_at"
],
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "Unique identifier for the sales record"
},
"tenant_id": {
"type": "string",
"format": "uuid",
"description": "Tenant identifier"
},
"sale_date": {
"type": "string",
"format": "date-time",
"description": "Sale date"
},
"product_id": {
"type": "string",
"format": "uuid",
"description": "Product identifier"
},
"quantity_sold": {
"type": "number",
"minimum": 0,
"description": "Quantity sold"
},
"unit_price": {
"type": "number",
"minimum": 0,
"description": "Unit price in EUR"
},
"total_revenue": {
"type": "number",
"minimum": 0,
"description": "Total revenue in EUR"
},
"sales_channel": {
"type": "string",
"enum": ["IN_STORE", "ONLINE", "WHOLESALE", "ENTERPRISE", "OTHER"],
"description": "Sales channel"
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "Creation timestamp"
},
"notes": {
"type": "string",
"description": "Additional notes"
},
"enterprise_sale": {
"type": "boolean",
"description": "Enterprise-level sale"
},
"customer_id": {
"type": "string",
"format": "uuid",
"description": "Customer identifier"
},
"contract_reference": {
"type": "string",
"description": "Contract reference"
},
"delivery_locations": {
"type": "array",
"items": {
"type": "string"
},
"description": "Delivery locations"
},
"reasoning_data": {
"type": "object",
"description": "Reasoning data for special sales",
"properties": {
"type": {
"type": "string",
"description": "Reasoning type"
},
"parameters": {
"type": "object",
"description": "Reasoning parameters"
}
}
}
},
"additionalProperties": false
}

View File

@@ -0,0 +1,183 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Supplier",
"description": "Schema for supplier data in Bakery-IA system",
"type": "object",
"required": [
"id",
"tenant_id",
"name",
"supplier_code",
"business_name",
"tax_id",
"contact_person",
"email",
"phone",
"address",
"city",
"postal_code",
"country",
"status",
"rating",
"payment_terms",
"minimum_order_amount",
"lead_time_days",
"contract_start_date",
"contract_end_date",
"created_at"
],
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "Unique identifier for the supplier"
},
"tenant_id": {
"type": "string",
"format": "uuid",
"description": "Tenant identifier"
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 100,
"description": "Supplier name"
},
"supplier_code": {
"type": "string",
"minLength": 1,
"maxLength": 50,
"description": "Supplier code"
},
"business_name": {
"type": "string",
"minLength": 1,
"maxLength": 100,
"description": "Legal business name"
},
"tax_id": {
"type": "string",
"minLength": 1,
"maxLength": 20,
"description": "Tax identification number"
},
"contact_person": {
"type": "string",
"minLength": 1,
"maxLength": 100,
"description": "Primary contact person"
},
"email": {
"type": "string",
"format": "email",
"description": "Contact email"
},
"phone": {
"type": "string",
"minLength": 1,
"maxLength": 20,
"description": "Contact phone number"
},
"address": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Street address"
},
"city": {
"type": "string",
"minLength": 1,
"maxLength": 50,
"description": "City"
},
"postal_code": {
"type": "string",
"minLength": 1,
"maxLength": 10,
"description": "Postal code"
},
"country": {
"type": "string",
"minLength": 1,
"maxLength": 50,
"description": "Country"
},
"status": {
"type": "string",
"enum": ["ACTIVE", "INACTIVE", "PENDING", "SUSPENDED"],
"description": "Supplier status"
},
"rating": {
"type": "number",
"minimum": 0,
"maximum": 5,
"description": "Supplier rating (0-5)"
},
"payment_terms": {
"type": "string",
"enum": ["7_DAYS", "15_DAYS", "30_DAYS", "60_DAYS", "90_DAYS"],
"description": "Payment terms"
},
"minimum_order_amount": {
"type": "number",
"minimum": 0,
"description": "Minimum order amount in EUR"
},
"lead_time_days": {
"type": "integer",
"minimum": 0,
"description": "Lead time in days"
},
"contract_start_date": {
"type": "string",
"format": "date-time",
"description": "Contract start date"
},
"contract_end_date": {
"type": "string",
"format": "date-time",
"description": "Contract end date"
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "Creation timestamp"
},
"specialties": {
"type": "array",
"items": {
"type": "string"
},
"description": "Product specialties"
},
"delivery_areas": {
"type": "array",
"items": {
"type": "string"
},
"description": "Delivery areas"
},
"enterprise_contract": {
"type": "boolean",
"description": "Enterprise-level contract"
},
"contract_type": {
"type": "string",
"description": "Type of contract"
},
"annual_volume_commitment": {
"type": "number",
"minimum": 0,
"description": "Annual volume commitment"
},
"preferred_supplier": {
"type": "boolean",
"description": "Preferred supplier status"
},
"organic_certified": {
"type": "boolean",
"description": "Organic certification"
}
},
"additionalProperties": false
}