Current section

Files

Jump to
pageantry lib pageantry field_relation.ex
Raw

lib/pageantry/field_relation.ex

defmodule Pageantry.FieldRelation do
@moduledoc """
Relation definition for sorting/filtering.
## Fields
* `association`
: Association name in this schema (eg `:org`).
* `relation`
: Nested relation, if this relation is an intermediate step to another
related schema.
* `schema`
: Associated schema, if overriding specified association.
"""
@enforce_keys [:association]
defstruct [:association, :relation, :schema]
@type t :: %__MODULE__{association: atom, relation: __MODULE__.t(), schema: Ecto.Schema.t()}
end