from {{cookiecutter.app_name}}.models import db
from {{cookiecutter.app_name}} import models

from faker import Factory as Fake
from factory.alchemy import SQLAlchemyModelFactory
import factory

import logging

#Suppress factory-boy debug data
factory_log = logging.getLogger("factory")
factory_log.setLevel(logging.WARNING)

faker = Fake.create()


class Cat(SQLAlchemyModelFactory):
    FACTORY_FOR = models.Cat
    FACTORY_SESSION = db.session

    id = factory.LazyAttribute(lambda x: faker.unix_time())
    born_at = factory.LazyAttribute(lambda x: faker.unix_time())

    name = factory.LazyAttribute(lambda x: faker.first_name())
