Expand description
Database-backed audit log table and base store.
Aster products share the same audit log storage shape: an actor id, stable action wire value, target entity metadata, optional detail JSON, request metadata, and creation timestamp. Products still own typed action enums, detail schemas, presentation, retention policy, and authorization. This module keeps the common SeaORM table contract, index builders, and simple write/count/delete helpers in one place.
Structs§
- Active
Model - Generated by sea-orm-macros
- Audit
LogCreate - Product-neutral request to insert one audit log row.
- Audit
LogCursor Slice - Result of an audit log cursor query.
- Audit
LogDb Store - SeaORM-backed audit log store.
- Audit
LogQuery - Product-neutral cursor query for audit logs sorted by
(created_at, id)descending. - Column
Iter - An iterator over the variants of Column
- Entity
- Generated by sea-orm-macros
- Model
- SeaORM model for
audit_logswith product-neutral string action values. - Primary
KeyIter - An iterator over the variants of PrimaryKey
- Relation
Iter - An iterator over the variants of Relation
Enums§
- Column
- Generated by sea-orm-macros
- Primary
Key - Generated by sea-orm-macros
- Relation
- Audit log relations.
Constants§
- AUDIT_
LOGS_ TABLE - Audit log table name.
- AUDIT_
LOG_ ACTION_ COLUMN - Stable action wire value column.
- AUDIT_
LOG_ ACTION_ CREATED_ ID_ INDEX - Index name for action cursor scans.
- AUDIT_
LOG_ ACTION_ CREATED_ USER_ INDEX - Index name for action/time/user activity aggregation.
- AUDIT_
LOG_ ACTION_ INDEX - Index name for action filtering.
- AUDIT_
LOG_ CREATED_ AT_ COLUMN - Row creation timestamp column.
- AUDIT_
LOG_ CREATED_ AT_ INDEX - Index name for created-at scans.
- AUDIT_
LOG_ CREATED_ ID_ INDEX - Index name for cursor scans by created-at/id.
- AUDIT_
LOG_ DETAILS_ COLUMN - Optional product-owned JSON detail column.
- AUDIT_
LOG_ ENTITY_ ID_ COLUMN - Optional target entity id column.
- AUDIT_
LOG_ ENTITY_ NAME_ COLUMN - Optional target entity display name column.
- AUDIT_
LOG_ ENTITY_ TYPE_ COLUMN - Target entity type column.
- AUDIT_
LOG_ ENTITY_ TYPE_ CREATED_ ID_ INDEX - Index name for entity-type cursor scans.
- AUDIT_
LOG_ ID_ COLUMN - Stable row id column.
- AUDIT_
LOG_ IP_ ADDRESS_ COLUMN - Optional client IP column.
- AUDIT_
LOG_ USER_ AGENT_ COLUMN - Optional user-agent column.
- AUDIT_
LOG_ USER_ CREATED_ ID_ INDEX - Index name for user cursor scans.
- AUDIT_
LOG_ USER_ ID_ COLUMN - Actor user id column. System events use
0. - AUDIT_
LOG_ USER_ ID_ INDEX - Index name for user filtering.
Functions§
- count_
audit_ logs_ created_ between - Counts audit log rows created in
[start, end). - count_
audit_ logs_ created_ between_ with_ actions - Counts audit log rows for any of the supplied action wire values in
[start, end). - count_
distinct_ audit_ log_ users_ created_ between_ with_ actions - Counts distinct positive user ids for any supplied action wire value in
[start, end). - create_
audit_ log_ requests - Inserts many validated audit log create requests.
- create_
audit_ log_ row - Inserts one audit log row using any SeaORM connection or transaction.
- create_
audit_ log_ rows - Inserts many audit log active models.
- create_
audit_ logs_ action_ created_ id_ index - Builds the action/created-at/id cursor index.
- create_
audit_ logs_ action_ created_ user_ index - Builds the action/created/user activity index.
- create_
audit_ logs_ action_ index - Builds the action index.
- create_
audit_ logs_ base_ indexes - Returns the base index builders used by the current shared schema.
- create_
audit_ logs_ created_ at_ index - Builds the created-at index.
- create_
audit_ logs_ created_ id_ index - Builds the created-at/id cursor index.
- create_
audit_ logs_ entity_ type_ created_ id_ index - Builds the entity-type/created-at/id cursor index.
- create_
audit_ logs_ query_ indexes - Returns the optional activity/query index builders used by admin views.
- create_
audit_ logs_ table - Builds the shared
audit_logstable creation statement. - create_
audit_ logs_ user_ created_ id_ index - Builds the user/created-at/id cursor index.
- create_
audit_ logs_ user_ id_ index - Builds the user id index.
- delete_
audit_ logs_ before - Deletes audit log rows created before the supplied cutoff.
- drop_
audit_ logs_ table - Builds the shared
audit_logstable drop statement. - find_
audit_ logs_ with_ filters_ cursor - Finds audit logs with shared cursor filtering.