@classmethod
def get_object_info(cls, where_clause=None):
    """Get model and field information about the model class."""
    related_model_info = {}
    for fkf in cls._meta.refs:
        rel_mod = fkf.rel_model
        if rel_mod.__class__.__name__ != cls.__name__:
            table = rel_mod._meta.table_name
            pkey = rel_mod._meta.primary_key.name
            related_model_info[fkf.name] = {'db_column': fkf.column_name,
                'db_table': table, 'primary_key': pkey}
    where_clause = where_clause if where_clause else {}
    field_types = {}
    for field_name, field in cls._meta.fields.items():
        field_types[field_name] = str(field.field_type)
    js_object = {'callable_name': cls.__module__.split('.').pop().lower(),
        'last_changed_date': cls.last_change_date(), 'primary_keys': cls.
        get_primary_keys(), 'field_list': cls._meta.sorted_field_names,
        'field_types': field_types, 'foreign_keys': cls.cls_foreignkeys(),
        'related_models': related_model_info, 'related_names': cls.
        cls_revforeignkeys(), 'record_count': cls.select().where(cls.
        where_clause(where_clause)).count()}
    return js_object
