     |> cast(params, [:crash, :component])
   end
 
+  @spec all_for_project(Project.id) :: Ecto.Queryable.t
   def all_for_project(project_id) do
     from c in Crash,
       where: c.project_id == ^project_id
   end
 
+  @spec days(integer) :: Ecto.Queryable.t
   def days(d) do
     ds = d * 60 * 60 * 24
     start = NaiveDateTime.utc_now() |> NaiveDateTime.add(-ds, :second)

defmodule BorsNG.Database.Crash do
  @moduledoc """
  Crash dumps.
  """

  use BorsNG.Database.Model

  @type t :: %Crash{}

  schema "crashes" do
    belongs_to :project, Project

    timestamps()
  end

  @spec changeset(t | Ecto.Changeset.t, map) :: Ecto.Changeset.t
  @doc """
  Builds a changeset based on the `struct` and `params`.
  """
