# `PhoenixAI.Store.Conversation`
[🔗](https://github.com/franciscpd/phoenix-ai-store/blob/v0.1.0/lib/phoenix_ai/store/conversation.ex#L1)

A conversation owned by `PhoenixAI.Store`, extending `PhoenixAI.Conversation`
with persistence-specific fields such as `user_id`, `title`, `tags`, `model`,
timestamps, and soft-delete support.

# `t`

```elixir
@type t() :: %PhoenixAI.Store.Conversation{
  deleted_at: DateTime.t() | nil,
  id: String.t() | nil,
  inserted_at: DateTime.t() | nil,
  messages: [PhoenixAI.Store.Message.t()],
  metadata: map(),
  model: String.t() | nil,
  tags: [String.t()],
  title: String.t() | nil,
  updated_at: DateTime.t() | nil,
  user_id: String.t() | nil
}
```

# `from_phoenix_ai`

```elixir
@spec from_phoenix_ai(
  PhoenixAI.Conversation.t(),
  keyword()
) :: t()
```

Converts a `%PhoenixAI.Conversation{}` to a `%PhoenixAI.Store.Conversation{}`.

Accepts an optional keyword list to populate store-specific fields:

  * `:user_id` - the owning user's ID
  * `:title` - conversation title
  * `:tags` - list of string tags (defaults to `[]`)
  * `:model` - the AI model identifier

Messages are converted via `PhoenixAI.Store.Message.from_phoenix_ai/1`.

# `to_phoenix_ai`

```elixir
@spec to_phoenix_ai(t()) :: PhoenixAI.Conversation.t()
```

Converts a `%PhoenixAI.Store.Conversation{}` to a `%PhoenixAI.Conversation{}`.

Messages are converted via `PhoenixAI.Store.Message.to_phoenix_ai/1`.
Store-specific fields (`user_id`, `title`, `tags`, `model`, timestamps)
are dropped.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
