feat(audit): recorder with pg implementation and ip parsing

This commit is contained in:
2026-04-28 22:53:22 +08:00
parent 0b323b91ee
commit f42b88e57d
3 changed files with 129 additions and 9 deletions
+3 -2
View File
@@ -1,2 +1,3 @@
-- name: Ping :one
SELECT 1::int AS ok;
-- name: InsertAuditLog :exec
INSERT INTO audit_logs (user_id, action, target_type, target_id, ip, metadata)
VALUES ($1, $2, $3, $4, $5, $6);