code: func EntityTableName(entity interface{}) string {
  	var tableName, schemaName string
  	if nameProvider, ok := entity.(TableName); ok {
  		tableName = nameProvider.TableName()
  	}
  
  	if tableName == "" {
  		tableName = reflect.Indirect(reflect.ValueOf(entity)).Type().Name()
  	}
  
  	if schemaNameProvider, ok := entity.(SchemaName); ok {
  		schemaName = schemaNameProvider.SchemaName()
  	}
  
  	if schemaName == "" {
  		return tableName
  	}
  
  	return schemaName + "." + tableName
  }
docs: // EntityTableName returns the table name, possibly prefixed with the schema
  // name, associated with the <entity>.
  // The function tries to cast <entity> to TableName and SchemaName in order to
  // obtain the table name and the schema name, respectively.
  // If table name cannot be obtained, the struct name is used instead.
  // If schema name cannot be obtained, it is simply omitted from the result.