CoderRing.Code (CoderRing v0.2.3) View Source

Schema for a code, pending use.

Link to this section Summary

Types

t()
  • :id - Unique integer ID for the code.
  • :name - Name of the code type.
  • :position - Primary key and auto-incrementing integer.
  • :value - A pre-generated code.

Functions

Changeset for creating a new code.

Changeset for updating an existing code.

Link to this section Types

Specs

t() :: %CoderRing.Code{
  __meta__: term(),
  id: non_neg_integer(),
  name: String.t(),
  position: non_neg_integer(),
  value: String.t()
}
  • :id - Unique integer ID for the code.
  • :name - Name of the code type.
  • :position - Primary key and auto-incrementing integer.
  • :value - A pre-generated code.

Link to this section Functions

Link to this function

changeset(code_or_changeset, params)

View Source

Specs

changeset(t() | Ecto.Changeset.t(), map()) :: Ecto.Changeset.t()

Changeset for creating a new code.

Link to this function

update_changeset(code_or_changeset, params \\ %{})

View Source

Specs

update_changeset(t() | Ecto.Changeset.t(), map()) :: Ecto.Changeset.t()

Changeset for updating an existing code.