   @doc """
   Gets the current model record/struct of a version
   """
+  @spec get_current_model(version :: Version.t()) :: Ecto.Schema.t() | nil
   def get_current_model(version) do
     PaperTrail.RepoClient.repo().get(
       ("Elixir." <> version.item_type) |> String.to_existing_atom(),

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

  @spec get_versions(model :: module, id :: pos_integer, options :: []) :: Ecto.Query.t()
  def get_versions(model, id, options) do
    item_type = model |> Module.split() |> List.last()
    version_query(item_type, id, options) |> PaperTrail.RepoClient.repo().all

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

  @spec get_version(model :: module, id :: pos_integer, options :: []) :: 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
