<?php


namespace App\Http\Controllers\PRODUCT;

use App\Http\Controllers\Controller;
use App\Models\PRODUCT\Unit;
use Illuminate\Http\Request;
use App\Traits\CrudTrait;

class UnitController extends Controller
{
    use CrudTrait;

    protected string $modelClass = Unit::class;
    protected string $dataType = 'object';
    //this will get the Leave rows and load it after every scan
    public function index(Request $request)
    {
        return $this->getData($request);
    }

    public function store(Request $request)
    {
        return $this->storeData($request);
    }

    public function update(Request $request)
    {
        return $this->updateData($request);
    }

    public function bulkUpdate(Request $request)
    {
        return $this->multiUpdate($request);
    }


    public function destroy(Request $request)
    {
        return $this->destroyData($request);
    }

    public function bulkDestory(Request $request)
    {
        return $this->bulkDelete($request);
    }

    public function clone(Request $request)
    {
        return $this->cloneData($request);
    }

    public function export(Request $request)
    {
        return $this->exportData($request);
    }

    public function import(Request $request)
    {
        return $this->importData($request);
    }

    public function upload(Request $request)
    {
        return $this->uploadFile($request);
    }

    public function download(Request $request)
    {
        return $this->downloadFile($request);
    }
}
