PyMenuSite/article.py
2023-02-12 21:55:04 +01:00

27 lines
746 B
Python

class Article():
def __init__(self, name: str, id: str, price: float = 0, quantity: int = 1) -> Article:
"""
the article data
:param name: the name
:type name: str
:param id: uuid
:type id: str
:param price: price
:type price: float
:param quantity: quantity
:type quantity: int
:return: the article
:rtype: Article
"""
self.name = name;
self.id = id;
self.price = price;
self.quantity = quantity;
return (self);
def __repr__(self):
return (f"Article(name={self.name},id={self.id},price={self.price},quantity={self.quantity})")
def __str__(self):
return (self.__repr__())