lf5/fuzzer/datatypes.py
2024-02-06 17:43:34 +01:00

65 lines
1.1 KiB
Python

from dataclasses import dataclass, asdict
@dataclass
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 Order:
order_id: int
customer: Customer
invoice_amount: int
order_date: str # Assuming timestamp as a string for simplicity
@dataclass
class Ingredient:
ingredient_id: int
designation: str
stock: int
net_price: int
unit: str
carbohydrates: int
calories: int
protein: int
@dataclass
class Supplier:
supplier_id: int
city: str
street: str
email: str
phone: str
supplier_name: str
house_number: str
postal_code: int
@dataclass
class SupplierContainsIngredients:
supplier: Supplier
ingredient: Ingredient
delivery_cost: int
delivery_time: int
@dataclass
class OrderContainsIngredients:
order: Order
ingredient: Ingredient
quantity: int