# Path: apps/contacts/models.py
# class BaseContact(models.Model):
#     employee = models.ForeignKey('employees.Employee',
#                                  verbose_name=_('employee'),
#                                  related_name='%(class)s_contact_list')
#     is_primary = models.BooleanField(_('is primary'), default=False)
#     is_active = models.BooleanField(_('is active'), default=True)
#     created_at = models.DateTimeField(_('created at'), auto_now_add=True)
# 
#     class Meta:
#         abstract = True


from apps.contacts.models import BaseContact


class ContactMixin(object):
    """
    Would be used for adding contacts functionality to Employee model.
    """

    def get_contacts(self, is_primary=False):
        """
        Returns dict with all contacts.
        Example:
        >> obj.get_contacts()
        << {'email': [], 'skype': []}

        :param is_primary: bool Return only primary contacts.
        :return: dict
        """

# Path: apps/contacts/models.py
# class BaseContact(models.Model):
#     employee = models.ForeignKey('employees.Employee',
#                                  verbose_name=_('employee'),
#                                  related_name='%(class)s_contact_list')
#     is_primary = models.BooleanField(_('is primary'), default=False)
#     is_active = models.BooleanField(_('is active'), default=True)
#     created_at = models.DateTimeField(_('created at'), auto_now_add=True)
# 
#     class Meta:
#         abstract = True


# Path: apps/contacts/mixins.py
from apps.contacts.models import BaseContact



class ContactMixin(object):
    """
    Would be used for adding contacts functionality to Employee model.
    """

    def get_contacts(self, is_primary=False):
        """
        Returns dict with all contacts.
        Example:
        >> obj.get_contacts()
        << {'email': [], 'skype': []}

        :param is_primary: bool Return only primary contacts.
        :return: dict
        """

        subclasses = BaseContact.__subclasses__()