export const MFA_CHALLENGE_REPOSITORY = Symbol('MFA_CHALLENGE_REPOSITORY');

export interface MfaChallengeRecord {
  id: string;
  userId: string;
  type: string;
  attemptCount: number;
  maxAttempts: number;
  isVerified: boolean;
  expiresAt: Date;
  createdAt: Date;
}

export interface IMfaChallengeRepository {
  create(record: Omit<MfaChallengeRecord, 'createdAt'>): Promise<MfaChallengeRecord>;
  findById(id: string): Promise<MfaChallengeRecord | null>;
  incrementAttempts(id: string): Promise<void>;
  markVerified(id: string): Promise<void>;
  deleteExpired(): Promise<number>;
  deleteByUserId(userId: string): Promise<number>;
}
