import { Injectable } from '@nestjs/common';
import { FeedbackRepository } from './feedback.repository';
import { CreateFeedbackDto } from './dto/create-feedback.dto';

@Injectable()
export class FeedbackService {
  constructor(private readonly feedbackRepository: FeedbackRepository) {}

  async create(dto: CreateFeedbackDto) {
    return this.feedbackRepository.create(dto);
  }

  async findAll() {
    return this.feedbackRepository.findAll();
  }

  async findByUserId(userId: string) {
    return this.feedbackRepository.findByUserId(userId);
  }

  async updateStatus(id: string, status: string) {
    return this.feedbackRepository.updateStatus(id, status);
  }

  async getStats() {
    return this.feedbackRepository.getStats();
  }
}
