update daatypes

This commit is contained in:
Johannes Jöns 2024-02-06 17:39:32 +01:00
parent 86c5c43f8f
commit 04cafd0bf2

View file

@ -1,55 +1,59 @@
from dataclasses import dataclass from dataclasses import dataclass, asdict
@dataclass @dataclass
class Kunde: class Customer:
KundenNr: int customer_id: int
Vorname: str first_name: str
Nachname: str last_name: str
Strasse: str street: str
Geburstdatum: str # Assuming timestamp as a string for simplicity birth_date: str # Assuming timestamp as a string for simplicity
HausNr: str house_number: str
PLZ: int postal_code: int
Email: str email: str
Telefon: int phone: int
Ort: str city: str
def dict(self):
return {k: str(v) for k, v in asdict(self).items()}
@dataclass @dataclass
class Bestellung: class Order:
BestellNr: int order_id: int
KundenNr: int customer_id: int
Rechnungsbetrag: int invoice_amount: int
Bestelldatum: str # Assuming timestamp as a string for simplicity order_date: str # Assuming timestamp as a string for simplicity
@dataclass @dataclass
class Zutat: class Ingredient:
ZutatenNr: int ingredient_id: int
Bezeichnung: str designation: str
Bestand: int stock: int
Nettopreis: int net_price: int
Einheit: str unit: str
Kohlenhydrate: int carbohydrates: int
Kalorien: int calories: int
Protein: int protein: int
@dataclass @dataclass
class Lieferant: class Supplier:
LieferantenNr: int supplier_id: int
Ort: str city: str
Strasse: str street: str
Email: str email: str
Telefon: str phone: str
Liferantenname: str supplier_name: str
HausNr: str house_number: str
PLZ: int postal_code: int
@dataclass @dataclass
class LieferantContainsZutaten: class SupplierContainsIngredients:
LieferantenNr: int supplier_id: int
ZutatenNr: int ingredient_id: int
delivery_cost: int
delivery_time: int
@dataclass @dataclass
class BestellungContainsZutaten: class OrderContainsIngredients:
BestellNr: int order_id: int
ZutatenNr: int ingredient_id: int
Menge: int quantity: int