PhoenixKit.Modules.Entities.FieldType (phoenix_kit v1.7.71)

Copy Markdown View Source

Struct representing an entity field type definition.

Fields

  • name - Field type identifier (e.g., "text", "select")
  • label - Human-readable label (e.g., "Text", "Select Dropdown")
  • description - Short description of the field type
  • category - Category atom (:basic, :numeric, :boolean, :datetime, :choice, :advanced)
  • icon - Heroicon name for rendering
  • requires_options - Whether the field type requires options to be defined
  • default_props - Default properties for new fields of this type

Summary

Functions

Converts a plain map to a %FieldType{} struct.

Types

t()

@type t() :: %PhoenixKit.Modules.Entities.FieldType{
  category: :basic | :numeric | :boolean | :datetime | :choice | :advanced,
  default_props: map(),
  description: String.t() | nil,
  icon: String.t() | nil,
  label: String.t(),
  name: String.t(),
  requires_options: boolean()
}

Functions

from_map(map)

@spec from_map(map()) :: t()

Converts a plain map to a %FieldType{} struct.