PhoenixKitCatalogue.Schemas.Attribute (PhoenixKitCatalogue v0.18.0)

Copy Markdown View Source

Schema for attributes within an attribute group ("Color", "Trim").

key is a stable slug unique within its group — the durable identity that translations can never change. It is generated by the context from the primary-language name at creation and never cast on update.

kind semantics come from the product design: "fixed" = a single value shown on the product card; "multi" = a list of options, one of which is chosen downstream (per order line, in the parent app).

Summary

Types

t()

@type t() :: %PhoenixKitCatalogue.Schemas.Attribute{
  __meta__: term(),
  data: term(),
  group: term(),
  group_uuid: term(),
  inserted_at: term(),
  key: term(),
  kind: term(),
  name: term(),
  position: term(),
  status: term(),
  updated_at: term(),
  uuid: term(),
  values: term()
}

Functions

allowed_kinds()

@spec allowed_kinds() :: [String.t()]

create_changeset(attribute, attrs)

update_changeset(attribute, attrs)