View Source Memorex.Domain.Card (Memorex v0.2.4)

A Memorex.Domain.Card is the entity in Memorex which is reviewed/drilled by MemorexWeb.ReviewLive. A Memorex.Domain.Card belongs to a Memorex.Domain.Note. The Memorex.Domain.Card contains only drilling-related info; the actual flashcard content is contained in the Memorex.Domain.Note.

Link to this section Summary

Link to this section Types

@type answer_choice() :: :again | :hard | :good | :easy
@type card_status() :: :active | :suspended | :buried
@type card_type() :: :new | :learn | :review | :relearn
@type t() :: %Memorex.Domain.Card{
  __meta__: term(),
  card_logs: term(),
  card_status: card_status(),
  card_type: card_type(),
  current_step: non_neg_integer(),
  deck: term(),
  due: DateTime.t(),
  ease_factor: float(),
  id: | nil,
  inserted_at: DateTime.t(),
  interval: Timex.Duration.t(),
  interval_prior_to_lapse: Timex.Duration.t(),
  lapses: non_neg_integer(),
  note: term(),
  note_answer_index: non_neg_integer(),
  note_question_index: non_neg_integer(),
  reps: non_neg_integer(),
  updated_at: DateTime.t()

Link to this section Functions

@spec answer(t()) :: String.t()
@spec answer_choices() :: [answer_choice()]
@spec card_statuses() :: [card_status()]
@spec card_types() :: [card_type()]
Link to this function

changeset(card, params \\ %{})

View Source
@spec changeset(Ecto.Changeset.t() | t(), map()) :: Ecto.Changeset.t()
Link to this function


View Source
@spec increment_reps(Ecto.Changeset.t()) :: Ecto.Changeset.t()
@spec is_image_card?(t()) :: boolean()
@spec question(t()) :: String.t()
Link to this function

set_due_field_in_changeset(changeset, time)

View Source
@spec set_due_field_in_changeset(Ecto.Changeset.t() | t(), DateTime.t()) ::