Rename 'id' to 'pk' to avoid name collision with builtins
Rename 'type' to 'cred_type' to avoid name collision with builtins