<?php

namespace App\Services;

use App\Repositories\TicketCommentRepo;

class TicketCommentService
{
  private TicketCommentRepo $repo;

  public function __construct()
  {
    $this->repo = new TicketCommentRepo();
  }

  public function findByTicketId(int $ticketId): array
  {
    return $this->repo->findByTicketId($ticketId);
  }

  public function create(
    int $ticketId,
    int $userId,
    string $komentar,
  ): void {
    $this->repo->create(
      $ticketId,
      $userId,
      $komentar
    );
  }
}
