<?php

namespace App\Repositries;

use App\Http\Traits\NotificationTrait;
use App\Models\AdminNotification;

class NotificationRepository
{
    use NotificationTrait;
    public $mainRepositry;
    public $model;
    public function __construct(MainRepository $mainRepositry, AdminNotification $model)
    {
        $this->mainRepositry = $mainRepositry;
        $this->model = $model;
    }
    public function index($per_page = null)
    {
        return $notifications = $this->mainRepositry->index($this->model, $per_page);
    }


    public function store($data)
    {

        $notification = $this->createNotification($data);
        return $notification;
    }

    public function destroy($id)
    {
        return $this->mainRepositry->destroy($this->model, $id);
    }
}
