Update README: LOT API origins array, updated DB schema
Deploy / deploy (push) Successful in 9s

Reflects nested batch_origin_entries structure, farmers table,
decimal(6,2) precision fix for recipes_spices.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Malek TellissiandClaude Sonnet 4.6 committed 2026-09-12 20:09:20 +02:00
1 parent 7c0fde4fd5
commit 769d91465f
1 file changed
+23 -5
+23 -5
View File
@@ -133,12 +133,20 @@ GET https://api.sms.spices.blue/api/v1/{lot_number}
{ {
"name": "Kurkuma", "name": "Kurkuma",
"percentage": 60.0, "percentage": 60.0,
"origin": { "origins": [
{
"country": "Indien", "country": "Indien",
"farmer": "Singh Farm",
"supplier": "Gewürzhandel GmbH", "supplier": "Gewürzhandel GmbH",
"farmer": "Singh Farm",
"notes": null "notes": null
},
{
"country": "Sri Lanka",
"supplier": "Ceylon Spices",
"farmer": null,
"notes": "Restmenge aus Vorlieferung"
} }
]
} }
] ]
} }
@@ -200,7 +208,7 @@ Table recipes {
Table recipes_spices { Table recipes_spices {
recipe_id int [ref: > recipes.id] recipe_id int [ref: > recipes.id]
spice_id int [ref: > spices.id] spice_id int [ref: > spices.id]
amount_in_percent decimal(4,2) amount_in_percent decimal(6,2)
} }
Table packings { Table packings {
@@ -250,11 +258,21 @@ Table batch_origins {
id int [pk] id int [pk]
batch_id int [ref: > batches.id] batch_id int [ref: > batches.id]
spice_id int [ref: > spices.id] spice_id int [ref: > spices.id]
}
Table batch_origin_entries {
id int [pk]
batch_origin_id int [ref: > batch_origins.id]
supplier_id int [ref: > suppliers.id, nullable] supplier_id int [ref: > suppliers.id, nullable]
origin_country varchar origin_country varchar
farmer varchar farmer_id int [ref: > farmers.id, nullable]
notes text notes text
} }
Table farmers {
id int [pk]
name varchar(255)
}
``` ```
--- ---
@@ -267,7 +285,7 @@ Table batch_origins {
- [x] Rezepte mit Versionierung - [x] Rezepte mit Versionierung
- [x] Produktgrößen, Preise, SKU, GTIN mit Barcode-Vorschau - [x] Produktgrößen, Preise, SKU, GTIN mit Barcode-Vorschau
- [x] Inventar (eindeutige Items mit Ausgangs-Flag) - [x] Inventar (eindeutige Items mit Ausgangs-Flag)
- [x] Chargen (LOT) mit automatischem Rohstoff-Abzug - [x] Chargen (LOT) mit automatischem Rohstoff-Abzug und mehreren Lieferanten/Landwirten pro Rohstoff
- [x] Warenausgang (Produktverkauf) - [x] Warenausgang (Produktverkauf)
- [x] Shopify-Import (Produkte, Varianten, Lagerbestand, Bilder, Beschreibung, Preise) - [x] Shopify-Import (Produkte, Varianten, Lagerbestand, Bilder, Beschreibung, Preise)
- [x] Continuous Deployment via Gitea Actions + Docker - [x] Continuous Deployment via Gitea Actions + Docker