mirror of
https://github.com/hanzoai/calendar.git
synced 2026-10-30 14:46:43 +00:00
* 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
24 lines
362 B
SQL
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;
|