* 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
18 lines
435 B
TypeScript
18 lines
435 B
TypeScript
export type AuditActorType = "USER" | "GUEST" | "ATTENDEE" | "SYSTEM";
|
|
|
|
type AuditActor = {
|
|
id: string;
|
|
type: AuditActorType;
|
|
userUuid: string | null;
|
|
attendeeId: number | null;
|
|
email: string | null;
|
|
phone: string | null;
|
|
name: string | null;
|
|
createdAt: Date;
|
|
}
|
|
export interface IAuditActorRepository {
|
|
findByUserUuid(userUuid: string): Promise<AuditActor | null>;
|
|
findSystemActorOrThrow(): Promise<AuditActor>;
|
|
}
|
|
|