WealthFit.AccountGoal (Peacemaker v3.3.5-rc.7) View Source

Ecto Schema for managing the associations between Goals (currently strings reflecting prismic ids) and Accounts

Link to this section Summary

Functions

Queries for an AccountGoal

Removes all current associated goals and replaces them with the given list of goals.

Link to this section Functions

Link to this function

changeset(schema \\ %WealthFit.AccountGoal{}, attrs)

View Source

Queries for an AccountGoal

Specs

set_goals(Peacemaker.Account.t(), [String.t()]) ::
  [String.t()] | {:error, :too_much}

Removes all current associated goals and replaces them with the given list of goals.

Each item in the list must be a prismic id. At most, each account can only select up to 5 goals.