<?php

namespace App\Http\Controllers\User\Api;

use Auth;
use Illuminate\Http\Request;

use App\Http\Modules\User\ContractTemplateModule;

use App\Http\Controllers\User\BaseController;

class ContractTemplateController extends BaseController
{
    public function __construct()
    {
        parent::__construct();
    }

    public function list(Request $request)
    {
    	$contract_template = ContractTemplateModule::list($request);
    	return $contract_template;
    }

    public function show(Request $request, $hash_id)
    {
        $contract_template = ContractTemplateModule::show($request, $hash_id);
        return $contract_template;
    }

    public function store(Request $request)
    {
        $contract_template = ContractTemplateModule::store($request);
        return $contract_template;
    }

    public function update(Request $request, $hash_id)
    {
        $contract_template = ContractTemplateModule::update($request, $hash_id);
        return $contract_template;
    }

    public function delete(Request $request, $hash_id)
    {
        $contract_template = ContractTemplateModule::delete($request, $hash_id);
        return $contract_template;
    }

    public function validCheck(Request $request, $hash_id = '')
    {
        $method = empty($hash_id) ? 'POST' :'PUT';
        $valid = ContractTemplateModule::validCheck($request, $hash_id, $method);
        return $valid;
    }
}
