# `PhoenixKit.AuditLog.Entry`
[🔗](https://github.com/BeamLabEU/phoenix_kit/blob/v1.7.87/lib/phoenix_kit/audit_log/entry.ex#L1)

Schema for audit log entries.

Tracks administrative actions performed in PhoenixKit, providing a complete
audit trail of sensitive operations.

## Fields
  * `target_user_uuid` - The UUID of the user affected by the action
  * `admin_user_uuid` - The UUID of the admin who performed the action
  * `action` - The type of action performed (e.g., "admin_password_reset")
  * `ip_address` - The IP address from which the action was performed
  * `user_agent` - The user agent string of the client
  * `metadata` - Additional metadata about the action (JSONB)
  * `inserted_at` - Timestamp when the log entry was created

# `t`

```elixir
@type t() :: %PhoenixKit.AuditLog.Entry{
  __meta__: term(),
  action: String.t(),
  admin_user_uuid: UUIDv7.t() | nil,
  inserted_at: DateTime.t() | nil,
  ip_address: String.t() | nil,
  metadata: map() | nil,
  target_user_uuid: UUIDv7.t() | nil,
  user_agent: String.t() | nil,
  uuid: UUIDv7.t() | nil
}
```

# `changeset`

Creates a changeset for audit log entry.

## Required Fields
  * `:target_user_uuid` - UUID of the affected user
  * `:admin_user_uuid` - UUID of the admin performing the action
  * `:action` - Type of action performed

## Optional Fields
  * `:ip_address` - IP address of the admin
  * `:user_agent` - User agent string
  * `:metadata` - Additional metadata (JSONB)

# `valid_actions`

Returns the list of valid action types.

---

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