<?php

namespace App\Services;

use App\Repositories\PackRepositoryInterface;

class PackService
{
    protected PackRepository $PackRepository;

    public function __construct(PackRepositoryInterface $PackRepository)
    {
        $this->PackRepository = $PackRepository;
    }

    /**
     * Get's a record by it's ID
     *
     * @param int
     */
    public function get($id): collection
    {
        return $this->PackRepository->get($id);
    }

    /**
     * Get's all records.
     *
     * @return mixed
     */
    public function all()
    {
        return $this->PackRepository->all();
    }

    /**
     * Deletes a record.
     *
     * @param int
     */
    public function delete($id)
    {
        return $this->PackRepository->delete($id);
    }

    /**
     * Updates a post.
     *
     * @param int
     * @param array
     */
    public function update($id, array $data)
    {
        $this->PackRepository->update($id, $data);
    }
}
