43 lines
806 B
TypeScript
43 lines
806 B
TypeScript
/**
|
|
* Audit Log Types
|
|
* For tracking data changes in the system
|
|
*/
|
|
|
|
export interface AuditLogEntry {
|
|
id: number;
|
|
table_name: string;
|
|
record_id: string;
|
|
action: 'CREATE' | 'UPDATE' | 'DELETE';
|
|
old_values: Record<string, any> | null;
|
|
new_values: Record<string, any> | null;
|
|
changed_fields: string[];
|
|
created_at: string;
|
|
}
|
|
|
|
export interface AuditLogPagination {
|
|
total: number;
|
|
limit: number;
|
|
offset: number;
|
|
hasMore: boolean;
|
|
}
|
|
|
|
export interface AuditLogResponse {
|
|
success: boolean;
|
|
data: AuditLogEntry[];
|
|
pagination: AuditLogPagination;
|
|
}
|
|
|
|
export interface AuditLogCountResponse {
|
|
success: boolean;
|
|
count: number;
|
|
}
|
|
|
|
export interface AuditLogParams {
|
|
table?: string;
|
|
recordId?: string;
|
|
startDate?: string;
|
|
endDate?: string;
|
|
limit?: number;
|
|
offset?: number;
|
|
}
|