Exemplo n.º 1
0
    def __init__(self, **kwargs):
        """Init attributes of product objects.

        Args:
            **kwargs (dict): Variable number of arguments

        Attributes:
            self._barre_code (int): attribute that represent barre_code column
                in DB
            self._name (str): attribute that represent name column in DB
            self._nutrition_grade (str): attribute that represent
                nutrition_grade column in DB
            self._brand (str): attribute that represent brand column in DB
            self._store (str): attribute that represent store column in DB
            self._ingredients (str): attribute that represent ingredients
                column in DB
            self._quantity (str): attribute that represent quantity column
                in DB

        """
        Model.__init__(self)
        self._liaison_table = model.category.Category

        self._id = kwargs.get('id')
        self._barre_code = kwargs.get('barre_code')
        self._name = kwargs.get('name')
        self._nutrition_grade = kwargs.get('nutrition_grade')
        self._brand = kwargs.get('brand')
        self._store = kwargs.get('store')
        self._ingredients = kwargs.get('ingredients')
        self._quantity = kwargs.get('quantity')
Exemplo n.º 2
0
    def __init__(self, **kwargs):
        """Init attributes of category objects.

        Args:
            **kwargs (dict): Variable number of arguments

        Attributes:
            self._id_cat (int): attribute that represent id column in DB
            self._name (str): attribute that represent name column in DB

        """
        Model.__init__(self)
        self._duplicate_key = True
        self._liaison_table = model.product.Product

        self._id = kwargs.get('id')
        self._name = kwargs.get('name')
Exemplo n.º 3
0
    def __init__(self, **kwargs):
        """Init attributes of substitution objects.

        Args:
            **kwargs (dict): Variable number of arguments

        Attributes:
            self._id_to_substitute (int): attribute that represent
                id_to_substitute column in DB
            self._id_substitute (int): attribute that represent
                id_substitute column in DB

        """
        Model.__init__(self)
        self._ignore = True

        self._id = kwargs.get('id')
        self._id_to_substitute = kwargs.get('id_to_substitute')
        self._id_substitute = kwargs.get('id_substitute')
Exemplo n.º 4
0
 def __init__(self, **kwd):
     Model.__init__(self, **kwd)
Exemplo n.º 5
0
 def __init__(self):
     Model.__init__(self)
     self._order = None
Exemplo n.º 6
0
 def __init__(self, max_steps):
     Model.__init__(self, Logger.MODEL_ID, max_steps)