# Path: pynYNAB/schema/types.py
# class AccountTypes(Enum):
#     undef = 'undef'
#     Checking = 'Checking'
#     Savings = 'Savings'
#     CreditCard = 'CreditCard'
#     Cash = 'Cash'
#     LineOfCredit = 'LineOfCredit'
#     PayPal = 'PayPal'
#     MerchantAccount = 'MerchantAccount'
#     InvestmentAccount = 'InvestmentAccount'
#     Mortgage = 'Mortgage'
#     OtherAsset = 'OtherAsset'
#     OtherLiability = 'OtherLiability'
# 
# class ColorFlagType(Enum):
#     Red = flag('red')
#     Orange = flag('orange')
#     Yellow = flag('yellow')
#     Green = flag('green')
#     Blue = flag('blue')
#     Purple = flag('purple')
# 
# class AmountType(types.TypeDecorator):
#     impl = types.Integer
# 
#     def load_dialect_impl(self, dialect):
#         return dialect.type_descriptor(types.Integer)
# 
#     def process_bind_param(self, value, dialect):
#         return int(value * 1000) if value is not None else None
# 
#     def process_result_value(self, value, dialect):
#         return float(value) / 1000 if value is not None else None


from sqlalchemy import Boolean
from sqlalchemy import Column
from sqlalchemy import Date
from sqlalchemy import Enum
from sqlalchemy import ForeignKey
from sqlalchemy import Integer
from sqlalchemy import String
from sqlalchemy.ext.declarative import declared_attr
from sqlalchemy.orm import relationship
from pynYNAB.schema.Entity import Entity, Base
from pynYNAB.schema.types import AccountTypes, ColorFlagType, AmountType
    target_balance_month = Column(String)
    type = Column(String)


class PayeeLocation(Base, BudgetEntity):
    entities_payee_id = Column(ForeignKey('payee.id'))
    entities_payee = relationship('Payee', foreign_keys=entities_payee_id)
    latitude = Column(String)
    longitude = Column(String)


class AccountCalculation(Base, BudgetEntity):
    cleared_balance = Column(AmountType)
    entities_account_id = Column(ForeignKey('account.id'))
    entities_account = relationship('Account', foreign_keys=entities_account_id)
    error_count = Column(String)
    info_count = Column(String)
    transaction_count = Column(String)
    uncleared_balance = Column(AmountType)
    warning_count = Column(String)


class MonthlyAccountCalculation(Base, BudgetEntity):
    cleared_balance = Column(AmountType)
    entities_account_id = Column(ForeignKey('account.id'))
    entities_account = relationship('Account', foreign_keys=entities_account_id)
    error_count = Column(String)
    info_count = Column(String)
    month = Column(String)
    transaction_count = Column(String)

# Path: pynYNAB/schema/types.py
# class AccountTypes(Enum):
#     undef = 'undef'
#     Checking = 'Checking'
#     Savings = 'Savings'
#     CreditCard = 'CreditCard'
#     Cash = 'Cash'
#     LineOfCredit = 'LineOfCredit'
#     PayPal = 'PayPal'
#     MerchantAccount = 'MerchantAccount'
#     InvestmentAccount = 'InvestmentAccount'
#     Mortgage = 'Mortgage'
#     OtherAsset = 'OtherAsset'
#     OtherLiability = 'OtherLiability'
# 
# class ColorFlagType(Enum):
#     Red = flag('red')
#     Orange = flag('orange')
#     Yellow = flag('yellow')
#     Green = flag('green')
#     Blue = flag('blue')
#     Purple = flag('purple')
# 
# class AmountType(types.TypeDecorator):
#     impl = types.Integer
# 
#     def load_dialect_impl(self, dialect):
#         return dialect.type_descriptor(types.Integer)
# 
#     def process_bind_param(self, value, dialect):
#         return int(value * 1000) if value is not None else None
# 
#     def process_result_value(self, value, dialect):
#         return float(value) / 1000 if value is not None else None


# Path: pynYNAB/schema/budget.py
from sqlalchemy import Boolean
from sqlalchemy import Column
from sqlalchemy import Date
from sqlalchemy import Enum
from sqlalchemy import ForeignKey
from sqlalchemy import Integer
from sqlalchemy import String
from sqlalchemy.ext.declarative import declared_attr
from sqlalchemy.orm import relationship
from pynYNAB.schema.Entity import Entity, Base
from pynYNAB.schema.types import AccountTypes, ColorFlagType, AmountType

    target_balance_month = Column(String)
    type = Column(String)


class PayeeLocation(Base, BudgetEntity):
    entities_payee_id = Column(ForeignKey('payee.id'))
    entities_payee = relationship('Payee', foreign_keys=entities_payee_id)
    latitude = Column(String)
    longitude = Column(String)


class AccountCalculation(Base, BudgetEntity):
    cleared_balance = Column(AmountType)
    entities_account_id = Column(ForeignKey('account.id'))
    entities_account = relationship('Account', foreign_keys=entities_account_id)
    error_count = Column(String)
    info_count = Column(String)
    transaction_count = Column(String)
    uncleared_balance = Column(AmountType)
    warning_count = Column(String)


class MonthlyAccountCalculation(Base, BudgetEntity):
    cleared_balance = Column(AmountType)
    entities_account_id = Column(ForeignKey('account.id'))
    entities_account = relationship('Account', foreign_keys=entities_account_id)
    error_count = Column(String)
    info_count = Column(String)
    month = Column(String)
    transaction_count = Column(String)

    uncleared_balance = Column(AmountType)