   def get_version(model, id) when is_atom(model) and is_integer(id),
     do: get_version(model, id, [])
 
-  @spec get_version(record :: Ecto.Schema.t(), options :: []) :: Version.t() | nil
+  @spec get_version(record :: Ecto.Schema.t(), options :: keyword | []) :: Version.t() | nil
   def get_version(record, options) when is_map(record) do
     item_type = record.__struct__ |> Module.split() |> List.last()
 

  def get_versions(model, id) when is_atom(model) and is_integer(id),
    do: get_versions(model, id, [])

  @spec get_versions(record :: Ecto.Schema.t(), options :: []) :: [Version.t()]
  def get_versions(record, options) when is_map(record) do
    item_type = record.__struct__ |> Module.split() |> List.last()


    |> PaperTrail.RepoClient.repo().one
  end

  @spec get_version(model :: module, id :: pos_integer, options :: keyword | []) :: Version.t() | nil
  def get_version(model, id, options) do
    item_type = model |> Module.split() |> List.last()
    last(version_query(item_type, id, options)) |> PaperTrail.RepoClient.repo().one
