from butter.product import Product


class PantryItem(Product):
    def __init__(self, mode, pantry_name, sku, name=None):
        super().__init__(sku, name)
        self.mode = mode
        self.pantry_name = pantry_name

    @staticmethod
    def from_product(product, pantry, mode):
        return PantryItem(mode, pantry, product.sku, product.name)
