# `PhoenixKitCatalogue.Schemas.ItemSupplierInfo`
[🔗](https://github.com/BeamLabEU/phoenix_kit_catalogue/blob/0.12.3/lib/phoenix_kit_catalogue/schemas/item_supplier_info.ex#L1)

Junction table row linking a catalogue item to a supplier.

Each row stores a snapshot of the supplier's name at write time so the
record remains readable even when the supplier is later renamed or deleted.
A partial unique index enforces at most one primary row per item.

There is intentionally NO uniqueness on `(item_uuid, supplier_uuid)`:
multiple rows per supplier are allowed so future price revisions can
coexist via `valid_from`/`valid_to` windows (planned purchase-price
history). The only uniqueness is the partial index on `is_primary`.

# `t`

```elixir
@type t() :: %PhoenixKitCatalogue.Schemas.ItemSupplierInfo{
  __meta__: term(),
  currency: term(),
  inserted_at: term(),
  is_primary: term(),
  item: term(),
  item_uuid: term(),
  lead_time_days: term(),
  metadata: term(),
  min_order_qty: term(),
  position: term(),
  supplier_name_snapshot: term(),
  supplier_sku: term(),
  supplier_source: term(),
  supplier_uuid: term(),
  unit_cost: term(),
  updated_at: term(),
  uuid: term(),
  valid_from: term(),
  valid_to: term()
}
```

# `changeset`

```elixir
@spec changeset(t() | Ecto.Changeset.t(t()), map()) :: Ecto.Changeset.t(t())
```

---

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