import { JournalEntry, JournalType } from '../entities/journal-entry.entity';

export const JOURNAL_ENTRY_REPOSITORY = Symbol('IJournalEntryRepository');

export interface IJournalEntryRepository {
  save(entry: JournalEntry): Promise<JournalEntry>;
  create(data: Partial<JournalEntry>): JournalEntry;
  /** Aggregate: sum of amounts by entry type */
  getSumByType(type: JournalType): Promise<string>;
  /** QueryBuilder-based: monthly revenue by type (last 12 months) */
  getMonthlyRevenueByType(type: JournalType): Promise<Array<{ month: string; revenue: string }>>;
}
