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