# Path: models.py
# ENVIRONMENT = os.getenv('ENVIRONMENT', 'dev')
# class BaseModel(Model):
#     class Meta:
# class Item(BaseModel):
# class Picture(BaseModel):
# class User(BaseModel, UserMixin):
# class Address(BaseModel):
# class Order(BaseModel):
#     class Meta:
# class OrderItem(BaseModel):
# class Favorite(BaseModel):
#     def save(self, *args, **kwargs):
#     def json_list(cls, objs_list):
#     def json(self, include_data=[]):
#     def validate_input(cls, data, partial=False):
#     def search(cls, query, dataset, limit=-1,
#                attributes=None, weights=None,
#                threshold=search.config.THRESHOLD):
#     def __str__(self):
#     def is_favorite(self, item):
# def on_delete_item_handler(model_class, instance):
#     def filename(self):
#     def __str__(self):
# def on_delete_picture_handler(model_class, instance):
#     def exists(email):
#     def hash_password(password):
#     def verify_password(self, password):
#     def add_favorite(user, item):
#     def delete_favorite(self, obj):
#     def order_items(self):
#     def empty_order(self):
#     def create_order(user, address, items):
#     def update_items(self, items, update_total=True, new_address=None):
#     def edit_items_quantity(self, items):
#     def delete_items(self, items):
#     def create_items(self, items):
#     def add_item(self, item, quantity=1):
#     def remove_item(self, item, quantity=1):
#     def add_item(self, quantity=1):
#     def remove_item(self, quantity=1):
#     def _calculate_subtotal(self):


from colorama import init, Fore, Style
from models import (User, Item, Order, OrderItem,
                    Address, Picture, database, Favorite)
import sys
        if table == 'user':
            User.drop_table()
        if table == 'orderitem':
            OrderItem.drop_table()
        if table == 'address':
            Address.drop_table()
        if table == 'picture':
            Picture.drop_table()
        if table == 'favorite':
            Favorite.drop_table()


def create_tables():
    User.create_table(fail_silently=True)
    Item.create_table(fail_silently=True)
    Address.create_table(fail_silently=True)
    Order.create_table(fail_silently=True)
    OrderItem.create_table(fail_silently=True)
    Picture.create_table(fail_silently=True)
    Favorite.create_table(fail_silently=True)


def good_bye(word, default='has'):
    print(Fore.BLUE + Style.BRIGHT +
          '*-* Your database {1} been {0}. *-*'.format(word, default))
    print(Fore.CYAN + Style.BRIGHT + '*_* Have a nice day! *_*')
    sys.exit()


def create_db():

# Path: models.py
# ENVIRONMENT = os.getenv('ENVIRONMENT', 'dev')
# class BaseModel(Model):
#     class Meta:
# class Item(BaseModel):
# class Picture(BaseModel):
# class User(BaseModel, UserMixin):
# class Address(BaseModel):
# class Order(BaseModel):
#     class Meta:
# class OrderItem(BaseModel):
# class Favorite(BaseModel):
#     def save(self, *args, **kwargs):
#     def json_list(cls, objs_list):
#     def json(self, include_data=[]):
#     def validate_input(cls, data, partial=False):
#     def search(cls, query, dataset, limit=-1,
#                attributes=None, weights=None,
#                threshold=search.config.THRESHOLD):
#     def __str__(self):
#     def is_favorite(self, item):
# def on_delete_item_handler(model_class, instance):
#     def filename(self):
#     def __str__(self):
# def on_delete_picture_handler(model_class, instance):
#     def exists(email):
#     def hash_password(password):
#     def verify_password(self, password):
#     def add_favorite(user, item):
#     def delete_favorite(self, obj):
#     def order_items(self):
#     def empty_order(self):
#     def create_order(user, address, items):
#     def update_items(self, items, update_total=True, new_address=None):
#     def edit_items_quantity(self, items):
#     def delete_items(self, items):
#     def create_items(self, items):
#     def add_item(self, item, quantity=1):
#     def remove_item(self, item, quantity=1):
#     def add_item(self, quantity=1):
#     def remove_item(self, quantity=1):
#     def _calculate_subtotal(self):


# Path: scripts/init_db.py
from colorama import init, Fore, Style
from models import (User, Item, Order, OrderItem,
                    Address, Picture, database, Favorite)
import sys

        if table == 'user':
            User.drop_table()
        if table == 'orderitem':
            OrderItem.drop_table()
        if table == 'address':
            Address.drop_table()
        if table == 'picture':
            Picture.drop_table()
        if table == 'favorite':
            Favorite.drop_table()


def create_tables():
    User.create_table(fail_silently=True)
    Item.create_table(fail_silently=True)
    Address.create_table(fail_silently=True)
    Order.create_table(fail_silently=True)
    OrderItem.create_table(fail_silently=True)
    Picture.create_table(fail_silently=True)
    Favorite.create_table(fail_silently=True)


def good_bye(word, default='has'):
    print(Fore.BLUE + Style.BRIGHT +
          '*-* Your database {1} been {0}. *-*'.format(word, default))
    print(Fore.CYAN + Style.BRIGHT + '*_* Have a nice day! *_*')
    sys.exit()


def create_db():

    if database.is_closed():