import { BaseRepository } from '@mostajs/orm'; import type { IDialect, QueryOptions } from '@mostajs/orm'; import type { CodeFormat } from '../types/index'; export interface TicketDTO { id: string; ticketNumber: string; client: any; clientAccess: any; activity: any; ticketType: string; sourceClient: any; code: string; codeFormat: CodeFormat; clientName: string; activityName: string; validityMode: string; validUntil: string | null; status: 'active' | 'used' | 'expired' | 'cancelled'; scannedAt: string | null; scannedBy: any; amount: number; currency: string; printCount: number; createdBy: string; createdAt: string; updatedAt: string; } export declare class TicketRepository extends BaseRepository { constructor(dialect: IDialect); /** * Generate next ticket number in Wiegand 24-bit format. * * Format: Ticket = ((Annee % 4) x 32 + (JourAnnee % 32)) x 131072 + Sequence * * Cross-dialect: uses only BaseRepository.upsert() + BaseRepository.increment() * which are implemented by all @mostajs/orm dialects (Mongo, SQLite, Postgres, etc.) * * @param date - Date to encode in ticket (default: today) * @returns Numeric ticket number as string (e.g. "7077889") */ getNextTicketNumber(date?: Date): Promise; /** Create ticket with auto-generated ticketNumber and code */ createWithAutoFields(data: Partial): Promise; /** Find by code value (QR, barcode, etc.) */ findByCode(code: string): Promise; /** Find tickets for a client */ findByClient(clientId: string, options?: QueryOptions): Promise; /** Count tickets for a given clientAccess */ countByAccess(clientAccessId: string): Promise; /** Count tickets grouped by clientAccess (for access grid) */ countsByAccess(accessIds: string[]): Promise<{ accessId: string; count: number; }[]>; /** Mark ticket as used */ markUsed(id: string, scannedBy: string): Promise; } //# sourceMappingURL=ticket.repository.d.ts.map