A skill that can be assigned to staff people.
A flat, translatable taxonomy entry (no parent — unlike Team, which
belongs to a Department). Names are globally unique, case-insensitively
(a lower(name) expression index in the DB). See Department for the
translations shape and read-path semantics — Skill uses the same pattern.
People are assigned skills many-to-many via PhoenixKitStaff.Schemas.PersonSkill,
which carries the per-assignment proficiency level.
Summary
Types
A single proficiency level on a skill. id is a stable short identifier that
PersonSkill.proficiency_levels references; translations maps a locale to a
translated name (flat lang => name, primary fallback to name).
Functions
The level map for id, or nil.
Generates a stable short (8-hex) level id.
The skill's level ids, in order.
Levels as [{localized_name, id}] for <select>/chip options in lang.
The skill's level maps (always a list).
Translated name for a level id in lang (primary name fallback).
Returns nil for an unknown id so callers can drop stray ids without
crashing — never raises.
DB-column field names that participate in the translations JSONB.
Types
A single proficiency level on a skill. id is a stable short identifier that
PersonSkill.proficiency_levels references; translations maps a locale to a
translated name (flat lang => name, primary fallback to name).
@type t() :: %PhoenixKitStaff.Schemas.Skill{ __meta__: term(), allow_multiple_levels: boolean(), description: String.t() | nil, inserted_at: DateTime.t() | nil, levels: [level()], name: String.t() | nil, person_skills: [PhoenixKitStaff.Schemas.PersonSkill.t()] | Ecto.Association.NotLoaded.t(), translations: translations_map(), updated_at: DateTime.t() | nil, uuid: UUIDv7.t() | nil }
Functions
@spec changeset(t() | Ecto.Changeset.t(t()), map()) :: Ecto.Changeset.t(t())
The level map for id, or nil.
@spec gen_level_id() :: String.t()
Generates a stable short (8-hex) level id.
The skill's level ids, in order.
Levels as [{localized_name, id}] for <select>/chip options in lang.
The skill's level maps (always a list).
Translated name for a level id in lang (primary name fallback).
Returns nil for an unknown id so callers can drop stray ids without
crashing — never raises.
@spec translatable_fields() :: [String.t()]
DB-column field names that participate in the translations JSONB.