code: func fkName(mode FkMode, fkMap map[string]*ForeignKey, fk *ForeignKey) string {
  	switch mode {
  	case FkModeParent:
  		return fk.RefType.Name
  	case FkModeField:
  		return fk.RefType.Name + "By" + fk.Field.Name
  	case FkModeKey:
  		return fk.RefType.Name + "By" + snaker.SnakeToCamelIdentifier(fk.ForeignKey.ForeignKeyName)
  	}
  
  	// mode is FkModeSmart
  	// inspect all foreign keys and use FkModeField if conflict found
  	for _, f := range fkMap {
  		if fk != f && fk.Type.Name == f.Type.Name && fk.RefType.Name == f.RefType.Name {
  			return fkName(FkModeField, fkMap, fk)
  		}
  	}
  
  	// no conflict, so use FkModeParent
  	return fkName(FkModeParent, fkMap, fk)
  }
docs: // fkName returns the name for the foreign key.