       use Phoenix.Channel<%= if ecto do %>
 
       alias <%= application_module %>.Repo
-      import Ecto.Model
+      import Ecto
       import Ecto.Query, only: [from: 1, from: 2]<% end %>
       import <%= application_module %>.Gettext
     end

<%= if ecto do %>
  def model do
    quote do
      use Ecto.Model

      import Ecto.Changeset
      import Ecto.Query, only: [from: 1, from: 2]<%= if adapter_config[:binary_id] do %>

      use Phoenix.Controller<%= if namespaced? do %>, namespace: <%= application_module %><% end %>
<%= if ecto do %>
      alias <%= application_module %>.Repo
      import Ecto
      import Ecto.Query, only: [from: 1, from: 2]
<% end %>
      import <%= application_module %>.Router.Helpers
