lf5/fuzzer/datatypes.py

60 lines
1.1 KiB
Python
Raw Normal View History

2024-02-06 17:39:32 +01:00
from dataclasses import dataclass, asdict
2024-02-05 10:26:18 +01:00
@dataclass
2024-02-06 17:39:32 +01:00
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
2024-02-05 10:26:18 +01:00
2024-02-06 17:39:32 +01:00
def dict(self):
return {k: str(v) for k, v in asdict(self).items()}
2024-02-05 10:26:18 +01:00
@dataclass
2024-02-06 17:39:32 +01:00
class Order:
order_id: int
customer_id: int
invoice_amount: int
order_date: str # Assuming timestamp as a string for simplicity
2024-02-05 10:26:18 +01:00
@dataclass
2024-02-06 17:39:32 +01:00
class Ingredient:
ingredient_id: int
designation: str
stock: int
net_price: int
unit: str
carbohydrates: int
calories: int
protein: int
2024-02-05 10:26:18 +01:00
@dataclass
2024-02-06 17:39:32 +01:00
class Supplier:
supplier_id: int
city: str
street: str
email: str
phone: str
supplier_name: str
house_number: str
postal_code: int
2024-02-05 10:26:18 +01:00
@dataclass
2024-02-06 17:39:32 +01:00
class SupplierContainsIngredients:
supplier_id: int
ingredient_id: int
delivery_cost: int
delivery_time: int
2024-02-05 10:26:18 +01:00
2024-02-06 17:39:32 +01:00
@dataclass
class OrderContainsIngredients:
order_id: int
ingredient_id: int
quantity: int