# `PhoenixKitCatalogue.Catalogue.Manufacturers`
[🔗](https://github.com/BeamLabEU/phoenix_kit_catalogue/blob/0.1.14/lib/phoenix_kit_catalogue/catalogue/manufacturers.ex#L1)

Manufacturers — company directory used as the source of items.

Hard-deletes only (manufacturers are reference data, not user content).
Status field is `"active"` / `"inactive"`; inactive manufacturers
remain in the DB but are filtered from item dropdowns.

Public surface is re-exported from `PhoenixKitCatalogue.Catalogue` via
`defdelegate`, so callers can keep using the canonical context module.

# `change_manufacturer`

```elixir
@spec change_manufacturer(PhoenixKitCatalogue.Schemas.Manufacturer.t(), map()) ::
  Ecto.Changeset.t(PhoenixKitCatalogue.Schemas.Manufacturer.t())
```

Returns a changeset for tracking manufacturer changes.

# `create_manufacturer`

```elixir
@spec create_manufacturer(
  map(),
  keyword()
) ::
  {:ok, PhoenixKitCatalogue.Schemas.Manufacturer.t()}
  | {:error, Ecto.Changeset.t(PhoenixKitCatalogue.Schemas.Manufacturer.t())}
```

Creates a manufacturer.

## Required attributes

  * `:name` — manufacturer name (1-255 chars)

## Optional attributes

  * `:description`, `:website`, `:contact_info`, `:logo_url`, `:notes`
  * `:status` — `"active"` (default) or `"inactive"`
  * `:data` — flexible JSON map

# `delete_manufacturer`

```elixir
@spec delete_manufacturer(
  PhoenixKitCatalogue.Schemas.Manufacturer.t(),
  keyword()
) ::
  {:ok, PhoenixKitCatalogue.Schemas.Manufacturer.t()}
  | {:error, Ecto.Changeset.t(PhoenixKitCatalogue.Schemas.Manufacturer.t())}
```

Hard-deletes a manufacturer from the database.

# `get_manufacturer`

```elixir
@spec get_manufacturer(Ecto.UUID.t()) ::
  PhoenixKitCatalogue.Schemas.Manufacturer.t() | nil
```

Fetches a manufacturer by UUID. Returns `nil` if not found.

# `get_manufacturer!`

```elixir
@spec get_manufacturer!(Ecto.UUID.t()) :: PhoenixKitCatalogue.Schemas.Manufacturer.t()
```

Fetches a manufacturer by UUID. Raises `Ecto.NoResultsError` if not found.

# `list_manufacturers`

```elixir
@spec list_manufacturers(keyword()) :: [PhoenixKitCatalogue.Schemas.Manufacturer.t()]
```

Lists all manufacturers, ordered by name.

## Options

  * `:status` — filter by status (e.g. `"active"`, `"inactive"`).
    When nil (default), returns all manufacturers.

# `update_manufacturer`

```elixir
@spec update_manufacturer(
  PhoenixKitCatalogue.Schemas.Manufacturer.t(),
  map(),
  keyword()
) ::
  {:ok, PhoenixKitCatalogue.Schemas.Manufacturer.t()}
  | {:error, Ecto.Changeset.t(PhoenixKitCatalogue.Schemas.Manufacturer.t())}
```

Updates a manufacturer with the given attributes.

---

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