import { Injectable } from '@nestjs/common';
import { PrismaService } from '../../infrastructure/database/prisma.service';

@Injectable()
export class ReadingEventService {
  constructor(private readonly prisma: PrismaService) {}

  async findBySession(clientSessionId: string) {
    return this.prisma.readingEvent.findMany({
      where: { clientSessionId },
      orderBy: { clientTimestampMs: 'asc' },
    });
  }
}
