mirror of
https://github.com/abhinavxd/libredesk.git
synced 2025-11-02 13:03:35 +00:00
- single table stores acitivites against entities, actors, timestamps, ip addresses and activity description. - admin page to view, sort and filter activity logs. - new `activity_logs:manage` permission
26 lines
467 B
SQL
26 lines
467 B
SQL
-- name: get-all-activities
|
|
SELECT
|
|
COUNT(*) OVER() as total,
|
|
id,
|
|
created_at,
|
|
updated_at,
|
|
activity_type,
|
|
activity_description,
|
|
actor_id,
|
|
target_model_type,
|
|
target_model_id,
|
|
ip
|
|
FROM
|
|
activity_logs WHERE 1=1
|
|
|
|
-- name: insert-activity
|
|
INSERT INTO activity_logs (
|
|
activity_type,
|
|
activity_description,
|
|
actor_id,
|
|
target_model_type,
|
|
target_model_id,
|
|
ip
|
|
) VALUES (
|
|
$1, $2, $3, $4, $5, $6
|
|
); |