export const getEntityIdKey = (
  type:
    | 'entities'
    | 'entity_fields'
    | 'entity_lists'
    | 'entity_list_fields'
    | 'entity_joinings'
    | '_entity_types'
    | 'entity_values'
    | '_users'
    | '_data_changes'
    | '_sessions'
    | '_documents'
) =>
  type === 'entities'
    ? 'entity_id'
    : type === 'entity_fields'
    ? 'entity_field_id'
    : type === 'entity_lists'
    ? 'entity_list_id'
    : type === 'entity_list_fields'
    ? 'entity_list_field_id'
    : type === 'entity_joinings'
    ? 'entity_joining_id'
    : type === 'entity_values'
    ? 'entity_values_id'
    : type === '_entity_types'
    ? 'entity_type_id'
    : type === '_users'
    ? 'user_id'
    : type === '_data_changes'
    ? 'data_change_id'
    : type === '_sessions'
    ? 'session_id'
    : type === '_documents'
    ? 'document_id'
    : null
