# `StaticContext.Type`
[🔗](https://github.com/exfoundry/static_context/blob/v0.1.0/lib/static_context/type.ex#L1)

Parameterized Ecto type for `StaticContext` lookup modules.

Stores the entry id as a string in the database.
Loads the full struct via `module.get!/1` on read.
Casts from a string id or an already-resolved struct.

## Usage in a schema

    field :mine_state_id, :string
    field :mine_state, StaticContext.Type, module: MineStates, source: :mine_state_id

The `_id` field holds the raw string (used in changesets, forms, and DB storage).
The virtual field holds the resolved struct (read-only, populated on DB load).

---

*Consult [api-reference.md](api-reference.md) for complete listing*
