PhoenixKitCRM.Schemas.Interaction (PhoenixKitCRM v0.2.4)

Copy Markdown View Source

A logged interaction ("client called, we discussed X") — the core of the CRM v1 interaction tracker. A structured log entry (type + when + body), anchored to a subject Contact, with N resolvable involved parties.

Summary

Types

t()

@type t() :: %PhoenixKitCRM.Schemas.Interaction{
  __meta__: term(),
  body: String.t() | nil,
  contact:
    PhoenixKitCRM.Schemas.Contact.t() | Ecto.Association.NotLoaded.t() | nil,
  contact_uuid: UUIDv7.t() | nil,
  inserted_at: DateTime.t() | nil,
  interaction_type: String.t() | nil,
  metadata: map(),
  occurred_at: DateTime.t() | nil,
  owner_user:
    PhoenixKit.Users.Auth.User.t() | Ecto.Association.NotLoaded.t() | nil,
  owner_user_uuid: UUIDv7.t() | nil,
  parties:
    [PhoenixKitCRM.Schemas.InteractionParty.t()]
    | Ecto.Association.NotLoaded.t(),
  subject: String.t() | nil,
  updated_at: DateTime.t() | nil,
  uuid: UUIDv7.t() | nil
}

Functions

changeset(interaction, attrs)

@spec changeset(t() | Ecto.Changeset.t(t()), map()) :: Ecto.Changeset.t(t())

type_label(other)

@spec type_label(String.t()) :: String.t()

types()

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