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

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

  findGeneral() {
    return this.prisma.parentGuideEntry.findMany({
      where: { scope: 'general' },
      orderBy: { order: 'asc' },
    });
  }

  findForChapter(chapterId: string) {
    return this.prisma.parentGuideEntry.findMany({
      where: { scope: 'chapter', chapterId },
      orderBy: { order: 'asc' },
    });
  }
}
