Fix Demo enterprise

This commit is contained in:
Urtzi Alfaro
2025-12-17 13:03:52 +01:00
parent 0bbfa010bf
commit 8bfe4f2dd7
111 changed files with 26200 additions and 2245 deletions

View File

@@ -0,0 +1,24 @@
{
"location": {
"id": "E0000000-0000-4000-a000-000000000001",
"parent_tenant_id": "80000000-0000-4000-a000-000000000001",
"name": "Bilbao - Casco Viejo",
"location_code": "BIL",
"city": "Bilbao",
"zone": "Casco Viejo",
"address": "Calle Somera, 8",
"postal_code": "48005",
"country": "España",
"latitude": 43.2567,
"longitude": -2.9272,
"status": "ACTIVE",
"opening_hours": "07:00-21:00",
"daily_capacity": 1500,
"storage_capacity_kg": 900,
"created_at": "2024-06-01T00:00:00Z",
"enterprise_location": true,
"location_type": "retail",
"staff_count": 8,
"description": "Basque region location with focus on quality and local culture"
}
}

View File

@@ -0,0 +1,24 @@
{
"users": [
{
"id": "944f50dd-b6d8-57a1-af87-20bfc1052c75",
"tenant_id": "E0000000-0000-4000-a000-000000000001",
"name": "Gerente Bilbao - Casco Viejo",
"email": "gerente.e0000000-0000-4000-a000-000000000001@panaderiaartesana.es",
"role": "manager",
"is_active": true,
"created_at": "BASE_TS - 180d",
"updated_at": "BASE_TS - 180d"
},
{
"id": "26e92f43-d03c-5fd7-99da-c54b319f8cb3",
"tenant_id": "E0000000-0000-4000-a000-000000000001",
"name": "Empleado Bilbao - Casco Viejo",
"email": "empleado.e0000000-0000-4000-a000-000000000001@panaderiaartesana.es",
"role": "user",
"is_active": true,
"created_at": "BASE_TS - 150d",
"updated_at": "BASE_TS - 150d"
}
]
}

View File

@@ -0,0 +1,242 @@
{
"stock": [
{
"id": "e85b30cf-832f-4491-a646-156dd52e9e39",
"tenant_id": "E0000000-0000-4000-a000-000000000001",
"ingredient_id": "10000000-0000-0000-0000-000000000001",
"production_stage": "raw_ingredient",
"quality_status": "APPROVED",
"expiration_date": "BASE_TS + 1d 6h",
"supplier_id": "40000000-0000-0000-0000-000000000001",
"batch_number": "BIL-PRO-20250116-001",
"created_at": "BASE_TS - 6h",
"current_quantity": 20.0,
"reserved_quantity": 0.0,
"available_quantity": 20.0,
"storage_location": "Bilbao - Casco Viejo - Display Area",
"updated_at": "BASE_TS - 6h",
"is_available": true,
"is_expired": false
},
{
"id": "d117af21-52d9-4015-aa85-4ff260f5c88c",
"tenant_id": "E0000000-0000-4000-a000-000000000001",
"ingredient_id": "10000000-0000-0000-0000-000000000002",
"production_stage": "raw_ingredient",
"quality_status": "APPROVED",
"expiration_date": "BASE_TS + 1d 6h",
"supplier_id": "40000000-0000-0000-0000-000000000001",
"batch_number": "BIL-PRO-20250116-002",
"created_at": "BASE_TS - 6h",
"current_quantity": 22.5,
"reserved_quantity": 0.0,
"available_quantity": 22.5,
"storage_location": "Bilbao - Casco Viejo - Display Area",
"updated_at": "BASE_TS - 6h",
"is_available": true,
"is_expired": false
},
{
"id": "c3c5ffa9-33bc-4a5d-9cfe-981541799ed5",
"tenant_id": "E0000000-0000-4000-a000-000000000001",
"ingredient_id": "10000000-0000-0000-0000-000000000003",
"production_stage": "raw_ingredient",
"quality_status": "APPROVED",
"expiration_date": "BASE_TS + 1d 6h",
"supplier_id": "40000000-0000-0000-0000-000000000001",
"batch_number": "BIL-PRO-20250116-003",
"created_at": "BASE_TS - 6h",
"current_quantity": 25.0,
"reserved_quantity": 0.0,
"available_quantity": 25.0,
"storage_location": "Bilbao - Casco Viejo - Display Area",
"updated_at": "BASE_TS - 6h",
"is_available": true,
"is_expired": false
},
{
"id": "269aaab9-06c3-4bdc-8277-5a3c659f4346",
"tenant_id": "E0000000-0000-4000-a000-000000000001",
"ingredient_id": "10000000-0000-0000-0000-000000000004",
"production_stage": "raw_ingredient",
"quality_status": "APPROVED",
"expiration_date": "BASE_TS + 1d 6h",
"supplier_id": "40000000-0000-0000-0000-000000000001",
"batch_number": "BIL-PRO-20250116-004",
"created_at": "BASE_TS - 6h",
"current_quantity": 27.5,
"reserved_quantity": 0.0,
"available_quantity": 27.5,
"storage_location": "Bilbao - Casco Viejo - Display Area",
"updated_at": "BASE_TS - 6h",
"is_available": true,
"is_expired": false
}
],
"ingredients": [
{
"id": "10000000-0000-0000-0000-000000000001",
"tenant_id": "E0000000-0000-4000-a000-000000000001",
"name": "Harina de Trigo T55",
"sku": "HAR-T55-ENT-001",
"barcode": null,
"product_type": "INGREDIENT",
"ingredient_category": "FLOUR",
"product_category": "BREAD",
"subcategory": null,
"description": "Harina de trigo refinada tipo 55, ideal para panes tradicionales y bollería",
"brand": "Molinos San José - Enterprise Grade",
"unit_of_measure": "KILOGRAMS",
"package_size": null,
"average_cost": 0.78,
"last_purchase_price": null,
"standard_cost": null,
"low_stock_threshold": 700.0,
"reorder_point": 1050.0,
"reorder_quantity": null,
"max_stock_level": null,
"shelf_life_days": null,
"display_life_hours": null,
"best_before_hours": null,
"storage_instructions": null,
"central_baker_product_code": null,
"delivery_days": null,
"minimum_order_quantity": null,
"pack_size": null,
"is_active": true,
"is_perishable": false,
"allergen_info": [
"gluten"
],
"nutritional_info": null,
"produced_locally": false,
"recipe_id": null,
"created_at": "BASE_TS",
"updated_at": "BASE_TS",
"created_by": "ae38accc-1ad4-410d-adbc-a55630908924"
},
{
"id": "10000000-0000-0000-0000-000000000002",
"tenant_id": "E0000000-0000-4000-a000-000000000001",
"name": "Harina de Trigo T65",
"sku": "HAR-T65-ENT-002",
"barcode": null,
"product_type": "INGREDIENT",
"ingredient_category": "FLOUR",
"product_category": "BREAD",
"subcategory": null,
"description": "Harina de trigo semi-integral tipo 65, perfecta para panes rústicos",
"brand": "Molinos San José - Enterprise Grade",
"unit_of_measure": "KILOGRAMS",
"package_size": null,
"average_cost": 0.87,
"last_purchase_price": null,
"standard_cost": null,
"low_stock_threshold": 560.0,
"reorder_point": 840.0,
"reorder_quantity": null,
"max_stock_level": null,
"shelf_life_days": null,
"display_life_hours": null,
"best_before_hours": null,
"storage_instructions": null,
"central_baker_product_code": null,
"delivery_days": null,
"minimum_order_quantity": null,
"pack_size": null,
"is_active": true,
"is_perishable": false,
"allergen_info": [
"gluten"
],
"nutritional_info": null,
"produced_locally": false,
"recipe_id": null,
"created_at": "BASE_TS",
"updated_at": "BASE_TS",
"created_by": "ae38accc-1ad4-410d-adbc-a55630908924"
},
{
"id": "10000000-0000-0000-0000-000000000003",
"tenant_id": "E0000000-0000-4000-a000-000000000001",
"name": "Harina de Fuerza W300",
"sku": "HAR-FUE-003",
"barcode": null,
"product_type": "INGREDIENT",
"ingredient_category": "FLOUR",
"product_category": "BREAD",
"subcategory": null,
"description": "Harina de gran fuerza W300, ideal para masas con alta hidratación",
"brand": "Harinas Premium - Enterprise Grade",
"unit_of_measure": "KILOGRAMS",
"package_size": null,
"average_cost": 1.06,
"last_purchase_price": null,
"standard_cost": null,
"low_stock_threshold": 350.0,
"reorder_point": 560.0,
"reorder_quantity": null,
"max_stock_level": null,
"shelf_life_days": null,
"display_life_hours": null,
"best_before_hours": null,
"storage_instructions": null,
"central_baker_product_code": null,
"delivery_days": null,
"minimum_order_quantity": null,
"pack_size": null,
"is_active": true,
"is_perishable": false,
"allergen_info": [
"gluten"
],
"nutritional_info": null,
"produced_locally": false,
"recipe_id": null,
"created_at": "BASE_TS",
"updated_at": "BASE_TS",
"created_by": "ae38accc-1ad4-410d-adbc-a55630908924"
},
{
"id": "10000000-0000-0000-0000-000000000004",
"tenant_id": "E0000000-0000-4000-a000-000000000001",
"name": "Harina Integral de Trigo",
"sku": "HAR-INT-004",
"barcode": null,
"product_type": "INGREDIENT",
"ingredient_category": "FLOUR",
"product_category": "BREAD",
"subcategory": null,
"description": "Harina integral 100% con salvado, rica en fibra",
"brand": "Bio Cereales - Enterprise Grade",
"unit_of_measure": "KILOGRAMS",
"package_size": null,
"average_cost": 1.1,
"last_purchase_price": null,
"standard_cost": null,
"low_stock_threshold": 420.0,
"reorder_point": 630.0,
"reorder_quantity": null,
"max_stock_level": null,
"shelf_life_days": null,
"display_life_hours": null,
"best_before_hours": null,
"storage_instructions": null,
"central_baker_product_code": null,
"delivery_days": null,
"minimum_order_quantity": null,
"pack_size": null,
"is_active": true,
"is_perishable": false,
"allergen_info": [
"gluten"
],
"nutritional_info": null,
"produced_locally": false,
"recipe_id": null,
"created_at": "BASE_TS",
"updated_at": "BASE_TS",
"created_by": "ae38accc-1ad4-410d-adbc-a55630908924"
}
]
}

View File

@@ -0,0 +1,5 @@
{
"recipes": [],
"recipe_ingredients": [],
"recipe_instructions": []
}

View File

@@ -0,0 +1,75 @@
{
"equipment": [],
"quality_check_templates": [],
"quality_checks": [],
"batches": [
{
"id": "50000001-0000-4000-a000-000000000001",
"tenant_id": "E0000000-0000-4000-a000-000000000001",
"recipe_id": "30000000-0000-0000-0000-000000000001",
"product_id": "20000000-0000-0000-0000-000000000001",
"batch_number": "BATCH-E000-0001",
"status": "completed",
"quantity_produced": 50,
"quantity_good": 50,
"quantity_defective": 0,
"production_date": "BASE_TS - 1d",
"expiration_date": "BASE_TS + 2d",
"production_line": "Linea 1",
"shift": "morning",
"produced_by": "ae38accc-1ad4-410d-adbc-a55630908924",
"approved_by": "80765906-0074-4206-8f58-5867df1975fd",
"created_at": "BASE_TS - 1d",
"updated_at": "BASE_TS - 1d",
"is_active": true,
"ingredients": [
{
"ingredient_id": "10000000-0000-0000-0000-000000000001",
"quantity_used": 25.0,
"unit": "kg"
}
],
"product_name": "Baguette Tradicional",
"planned_start_time": "BASE_TS",
"planned_end_time": "BASE_TS + 4h",
"actual_start_time": "BASE_TS - 1d",
"actual_end_time": "BASE_TS - 1d + 4h",
"planned_quantity": 50.0,
"planned_duration_minutes": 240
},
{
"id": "50000002-0000-4000-a000-000000000001",
"tenant_id": "E0000000-0000-4000-a000-000000000001",
"recipe_id": "30000000-0000-0000-0000-000000000002",
"product_id": "20000000-0000-0000-0000-000000000002",
"batch_number": "BATCH-E000-0002",
"status": "completed",
"quantity_produced": 60,
"quantity_good": 60,
"quantity_defective": 0,
"production_date": "BASE_TS - 2d",
"expiration_date": "BASE_TS + 1d",
"production_line": "Linea 2",
"shift": "morning",
"produced_by": "ae38accc-1ad4-410d-adbc-a55630908924",
"approved_by": "80765906-0074-4206-8f58-5867df1975fd",
"created_at": "BASE_TS - 2d",
"updated_at": "BASE_TS - 2d",
"is_active": true,
"ingredients": [
{
"ingredient_id": "10000000-0000-0000-0000-000000000001",
"quantity_used": 30.0,
"unit": "kg"
}
],
"product_name": "Croissant de Mantequilla",
"planned_start_time": "BASE_TS",
"planned_end_time": "BASE_TS + 4h",
"actual_start_time": "BASE_TS - 1d",
"actual_end_time": "BASE_TS - 1d + 4h",
"planned_quantity": 50.0,
"planned_duration_minutes": 240
}
]
}

View File

@@ -0,0 +1,4 @@
{
"purchase_orders": [],
"purchase_order_items": []
}

View File

@@ -0,0 +1,44 @@
{
"customers": [
{
"id": "60000000-0000-0000-0000-000000000001",
"tenant_id": "E0000000-0000-4000-a000-000000000001",
"customer_code": "CUST-001",
"name": "Restaurante El Buen Yantar - Bilbao",
"customer_type": "WHOLESALE",
"contact_person": "Luis Gómez",
"email": "compras@buenyantar.es",
"phone": "+34 912 345 678",
"address": "Calle Mayor, 45",
"city": "Bilbao",
"postal_code": "48013",
"country": "España",
"status": "ACTIVE",
"total_orders": 45,
"total_spent": 3250.75,
"created_at": "BASE_TS",
"notes": "Regular wholesale customer - weekly orders"
},
{
"id": "60000000-0000-0000-0000-000000000002",
"tenant_id": "E0000000-0000-4000-a000-000000000001",
"customer_code": "CUST-002",
"name": "Cafetería La Esquina - Bilbao",
"customer_type": "RETAIL",
"contact_person": "Marta Ruiz",
"email": "cafeteria@laesquina.com",
"phone": "+34 913 456 789",
"address": "Plaza del Sol, 12",
"city": "Bilbao",
"postal_code": "48012",
"country": "España",
"status": "ACTIVE",
"total_orders": 12,
"total_spent": 850.2,
"created_at": "BASE_TS",
"notes": "Small retail customer - biweekly orders"
}
],
"customer_orders": [],
"order_items": []
}

View File

@@ -0,0 +1,229 @@
{
"sales_data": [
{
"id": "6b021d81-0f78-4dda-af68-6ddbc721c06a",
"tenant_id": "E0000000-0000-4000-a000-000000000001",
"sale_date": "BASE_TS - 16h 0m",
"product_id": "20000000-0000-0000-0000-000000000001",
"quantity_sold": 2,
"unit_price": 0.9,
"total_revenue": 1.8,
"sales_channel": "in_store",
"payment_method": "cash",
"created_at": "BASE_TS - 16h 0m",
"notes": "Venta local en Bilbao - Casco Viejo",
"enterprise_location_sale": true,
"date": "BASE_TS"
},
{
"id": "bee94849-b27c-4741-b896-491af67f24db",
"tenant_id": "E0000000-0000-4000-a000-000000000001",
"sale_date": "BASE_TS - 15h 3m",
"product_id": "20000000-0000-0000-0000-000000000002",
"quantity_sold": 3,
"unit_price": 1.39,
"total_revenue": 4.16,
"sales_channel": "in_store",
"payment_method": "card",
"created_at": "BASE_TS - 15h 3m",
"notes": "Venta local en Bilbao - Casco Viejo",
"enterprise_location_sale": true,
"date": "BASE_TS"
},
{
"id": "8e97a063-4ca4-4fc5-b2fc-9dd94ce04678",
"tenant_id": "E0000000-0000-4000-a000-000000000001",
"sale_date": "BASE_TS - 14h 6m",
"product_id": "20000000-0000-0000-0000-000000000003",
"quantity_sold": 4,
"unit_price": 3.74,
"total_revenue": 14.96,
"sales_channel": "in_store",
"payment_method": "card",
"created_at": "BASE_TS - 14h 6m",
"notes": "Venta local en Bilbao - Casco Viejo",
"enterprise_location_sale": true,
"date": "BASE_TS"
},
{
"id": "fb310fd1-27f9-4821-9d34-d1eeef8356dc",
"tenant_id": "E0000000-0000-4000-a000-000000000001",
"sale_date": "BASE_TS - 13h 9m",
"product_id": "20000000-0000-0000-0000-000000000004",
"quantity_sold": 5,
"unit_price": 1.45,
"total_revenue": 7.26,
"sales_channel": "in_store",
"payment_method": "card",
"created_at": "BASE_TS - 13h 9m",
"notes": "Venta local en Bilbao - Casco Viejo",
"enterprise_location_sale": true,
"date": "BASE_TS"
},
{
"id": "682a5f61-fdba-4bd5-8c1f-7e173a690521",
"tenant_id": "E0000000-0000-4000-a000-000000000001",
"sale_date": "BASE_TS - 12h 12m",
"product_id": "20000000-0000-0000-0000-000000000001",
"quantity_sold": 6,
"unit_price": 0.9,
"total_revenue": 5.41,
"sales_channel": "in_store",
"payment_method": "cash",
"created_at": "BASE_TS - 12h 12m",
"notes": "Venta local en Bilbao - Casco Viejo",
"enterprise_location_sale": true,
"date": "BASE_TS"
},
{
"id": "b20f6751-39a1-4329-a5c9-29a71403cc4b",
"tenant_id": "E0000000-0000-4000-a000-000000000001",
"sale_date": "BASE_TS - 11h 15m",
"product_id": "20000000-0000-0000-0000-000000000002",
"quantity_sold": 2,
"unit_price": 1.39,
"total_revenue": 2.77,
"sales_channel": "in_store",
"payment_method": "card",
"created_at": "BASE_TS - 11h 15m",
"notes": "Venta local en Bilbao - Casco Viejo",
"enterprise_location_sale": true,
"date": "BASE_TS"
},
{
"id": "1b0f403f-e2cc-4bd7-8349-7d646dfb435b",
"tenant_id": "E0000000-0000-4000-a000-000000000001",
"sale_date": "BASE_TS - 10h 18m",
"product_id": "20000000-0000-0000-0000-000000000003",
"quantity_sold": 3,
"unit_price": 3.74,
"total_revenue": 11.22,
"sales_channel": "in_store",
"payment_method": "card",
"created_at": "BASE_TS - 10h 18m",
"notes": "Venta local en Bilbao - Casco Viejo",
"enterprise_location_sale": true,
"date": "BASE_TS"
},
{
"id": "6ac8c158-ead3-4fe3-8dc6-010ddc9803c9",
"tenant_id": "E0000000-0000-4000-a000-000000000001",
"sale_date": "BASE_TS - 9h 21m",
"product_id": "20000000-0000-0000-0000-000000000004",
"quantity_sold": 4,
"unit_price": 1.45,
"total_revenue": 5.81,
"sales_channel": "in_store",
"payment_method": "card",
"created_at": "BASE_TS - 9h 21m",
"notes": "Venta local en Bilbao - Casco Viejo",
"enterprise_location_sale": true,
"date": "BASE_TS"
},
{
"id": "e2cf5f55-71eb-489d-ae01-307cd08a0d6c",
"tenant_id": "E0000000-0000-4000-a000-000000000001",
"sale_date": "BASE_TS - 8h 24m",
"product_id": "20000000-0000-0000-0000-000000000001",
"quantity_sold": 5,
"unit_price": 0.9,
"total_revenue": 4.51,
"sales_channel": "in_store",
"payment_method": "cash",
"created_at": "BASE_TS - 8h 24m",
"notes": "Venta local en Bilbao - Casco Viejo",
"enterprise_location_sale": true,
"date": "BASE_TS"
},
{
"id": "58fb2270-4375-4d9c-9b6d-7a8fa38c2d22",
"tenant_id": "E0000000-0000-4000-a000-000000000001",
"sale_date": "BASE_TS - 7h 27m",
"product_id": "20000000-0000-0000-0000-000000000002",
"quantity_sold": 6,
"unit_price": 1.39,
"total_revenue": 8.32,
"sales_channel": "in_store",
"payment_method": "card",
"created_at": "BASE_TS - 7h 27m",
"notes": "Venta local en Bilbao - Casco Viejo",
"enterprise_location_sale": true,
"date": "BASE_TS"
},
{
"id": "a354222f-8635-491a-a0da-b81e887bb205",
"tenant_id": "E0000000-0000-4000-a000-000000000001",
"sale_date": "BASE_TS - 6h 30m",
"product_id": "20000000-0000-0000-0000-000000000003",
"quantity_sold": 2,
"unit_price": 3.74,
"total_revenue": 7.48,
"sales_channel": "in_store",
"payment_method": "card",
"created_at": "BASE_TS - 6h 30m",
"notes": "Venta local en Bilbao - Casco Viejo",
"enterprise_location_sale": true,
"date": "BASE_TS"
},
{
"id": "ada5c135-4d10-431d-8f92-a7828c8ef6d4",
"tenant_id": "E0000000-0000-4000-a000-000000000001",
"sale_date": "BASE_TS - 5h 33m",
"product_id": "20000000-0000-0000-0000-000000000004",
"quantity_sold": 3,
"unit_price": 1.45,
"total_revenue": 4.36,
"sales_channel": "in_store",
"payment_method": "card",
"created_at": "BASE_TS - 5h 33m",
"notes": "Venta local en Bilbao - Casco Viejo",
"enterprise_location_sale": true,
"date": "BASE_TS"
},
{
"id": "9c01f80b-546d-4195-abb7-2a864b6c3720",
"tenant_id": "E0000000-0000-4000-a000-000000000001",
"sale_date": "BASE_TS - 16h 36m",
"product_id": "20000000-0000-0000-0000-000000000001",
"quantity_sold": 4,
"unit_price": 0.9,
"total_revenue": 3.61,
"sales_channel": "in_store",
"payment_method": "cash",
"created_at": "BASE_TS - 16h 36m",
"notes": "Venta local en Bilbao - Casco Viejo",
"enterprise_location_sale": true,
"date": "BASE_TS"
},
{
"id": "5054f48f-53c5-40ff-bee6-1138c6185803",
"tenant_id": "E0000000-0000-4000-a000-000000000001",
"sale_date": "BASE_TS - 15h 39m",
"product_id": "20000000-0000-0000-0000-000000000002",
"quantity_sold": 5,
"unit_price": 1.39,
"total_revenue": 6.93,
"sales_channel": "in_store",
"payment_method": "card",
"created_at": "BASE_TS - 15h 39m",
"notes": "Venta local en Bilbao - Casco Viejo",
"enterprise_location_sale": true,
"date": "BASE_TS"
},
{
"id": "60849ef7-7214-46cd-91ef-2c05f902cc6f",
"tenant_id": "E0000000-0000-4000-a000-000000000001",
"sale_date": "BASE_TS - 14h 42m",
"product_id": "20000000-0000-0000-0000-000000000003",
"quantity_sold": 6,
"unit_price": 3.74,
"total_revenue": 22.44,
"sales_channel": "in_store",
"payment_method": "card",
"created_at": "BASE_TS - 14h 42m",
"notes": "Venta local en Bilbao - Casco Viejo",
"enterprise_location_sale": true,
"date": "BASE_TS"
}
]
}

View File

@@ -0,0 +1,4 @@
{
"orchestration_run": null,
"alerts": []
}