pub struct AuditRecord {
pub id: String,
pub actor: String,
pub action: String,
pub resource_type: String,
pub resource_id: String,
pub metadata: Value,
pub ip: Option<String>,
pub user_agent: Option<String>,
pub fingerprint: Option<String>,
pub tenant_id: Option<String>,
pub created_at: String,
}Expand description
Stored audit event returned by AuditRepo queries.
All fields are flat — ClientInfo is
expanded into ip, user_agent, fingerprint columns.
Fields§
§id: StringUnique identifier (ULID).
actor: StringWho performed the action (user ID, API key, "system", etc.).
action: StringDot-delimited action identifier (e.g. "doc.deleted").
resource_type: StringKind of resource affected (e.g. "document", "user").
resource_id: StringIdentifier of the affected resource.
metadata: ValueArbitrary JSON payload attached at record time; defaults to {}.
ip: Option<String>Client IP address, if provided.
user_agent: Option<String>Client user-agent string, if provided.
fingerprint: Option<String>Client fingerprint, if provided.
tenant_id: Option<String>Tenant identifier for multi-tenant apps.
created_at: StringISO 8601 timestamp of when the event was recorded.
Trait Implementations§
Source§impl Clone for AuditRecord
impl Clone for AuditRecord
Source§fn clone(&self) -> AuditRecord
fn clone(&self) -> AuditRecord
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AuditRecord
impl Debug for AuditRecord
Source§impl FromRow for AuditRecord
impl FromRow for AuditRecord
Auto Trait Implementations§
impl Freeze for AuditRecord
impl RefUnwindSafe for AuditRecord
impl Send for AuditRecord
impl Sync for AuditRecord
impl Unpin for AuditRecord
impl UnsafeUnpin for AuditRecord
impl UnwindSafe for AuditRecord
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more