Schema for audit log entries.
Tracks administrative actions performed in PhoenixKit, providing a complete audit trail of sensitive operations.
Fields
target_user_id- The ID of the user affected by the actionadmin_user_id- The ID of the admin who performed the actionaction- The type of action performed (e.g., "admin_password_reset")ip_address- The IP address from which the action was performeduser_agent- The user agent string of the clientmetadata- Additional metadata about the action (JSONB)inserted_at- Timestamp when the log entry was created
Summary
Types
@type t() :: %PhoenixKit.AuditLog.Entry{ __meta__: term(), action: String.t(), admin_user_id: integer(), admin_user_uuid: UUIDv7.t() | nil, id: integer() | nil, inserted_at: DateTime.t() | nil, ip_address: String.t() | nil, metadata: map() | nil, target_user_id: integer(), target_user_uuid: UUIDv7.t() | nil, user_agent: String.t() | nil, uuid: UUIDv7.t() | nil }
Functions
Creates a changeset for audit log entry.
Required Fields
:target_user_id- ID of the affected user:admin_user_id- ID 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)
Returns the list of valid action types.