Files
Hariom BalharaandGitHub c04402e7ee feat: [Booking Audit Stack - 1] Add Booking Audit System foundation (database schema and repositories) (#24838)
* feat: Implement Booking Audit System with database architecture and repository interfaces

- Added `ARCHITECTURE.md` detailing the design and structure of the Booking Audit System, including core tables `AuditActor` and `BookingAudit`.
- Created repository interfaces `IAuditActorRepository` and `IBookingAuditRepository` for managing audit actor and booking audit records.
- Implemented `PrismaAuditActorRepository` and `PrismaBookingAuditRepository` for database interactions.
- Defined enums for `BookingAuditType`, `BookingAuditAction`, and `AuditActorType` in the Prisma schema.
- Added migration scripts to create necessary database tables and enums for the audit system.

This commit establishes a robust framework for tracking booking-related actions, ensuring compliance and data integrity.

* feat(audit): add system actor migration
2025-11-19 08:21:34 -03:00

24 lines
362 B
SQL

-- Insert system actor with predefined UUID
-- This actor is used for system-initiated booking actions
INSERT INTO "AuditActor" (
id,
type,
"userUuid",
"attendeeId",
email,
phone,
name,
"createdAt"
)
VALUES (
'00000000-0000-0000-0000-000000000000',
'system',
NULL,
NULL,
NULL,
NULL,
'System',
NOW()
)
ON CONFLICT (id) DO NOTHING;