// GDPR Compliance Types

export interface UserConsent {
  id: string;
  user_id: string;
  consent_type: 'terms' | 'privacy' | 'marketing' | 'analytics';
  consent_given: boolean;
  consent_date: string;
  ip_address?: string;
  user_agent?: string;
  consent_version?: string;
  created_at: string;
  updated_at: string;
}

export interface AuditLog {
  id: string;
  user_id?: string;
  action: 'create' | 'update' | 'delete' | 'view' | 'export' | 'login' | 'logout';
  resource_type: string;
  resource_id?: string;
  old_data?: Record<string, any>;
  new_data?: Record<string, any>;
  ip_address?: string;
  user_agent?: string;
  created_at: string;
}

export interface DataExportRequest {
  id: string;
  user_id: string;
  status: 'pending' | 'processing' | 'completed' | 'failed';
  export_data?: Record<string, any>;
  requested_at: string;
  completed_at?: string;
  expires_at?: string;
  created_at: string;
  updated_at: string;
}

export interface AccountDeletionRequest {
  id: string;
  user_id: string;
  reason?: string;
  status: 'pending' | 'approved' | 'completed' | 'cancelled';
  requested_at: string;
  scheduled_deletion_at?: string;
  completed_at?: string;
  created_at: string;
  updated_at: string;
}

export interface ConsentFormData {
  terms: boolean;
  privacy: boolean;
  marketing?: boolean;
  analytics?: boolean;
}
