PhoenixKitCRM.UserRoleViewConfig (PhoenixKitCRM v0.2.0)

Copy Markdown View Source

Schema for per-user, per-scope CRM view configuration.

Stores user preferences (e.g. visible columns) keyed by user UUID and scope. Scope is either "organizations" or "role:<uuid>".

Summary

Functions

Changeset for user role view config.

Types

t()

@type t() :: %PhoenixKitCRM.UserRoleViewConfig{
  __meta__: term(),
  inserted_at: DateTime.t(),
  scope: String.t(),
  updated_at: DateTime.t(),
  user_uuid: binary(),
  uuid: binary(),
  view_config: map()
}

Functions

changeset(config, attrs)

Changeset for user role view config.

Examples

iex> changeset(%UserRoleViewConfig{}, %{user_uuid: uuid, scope: "organizations", view_config: %{}})
%Ecto.Changeset{valid?: true}