<?php

namespace App\Http\Controllers\User\Api;

use Auth;
use Illuminate\Http\Request;

use App\Http\Modules\User\ContractEntityModule;

use App\Http\Controllers\User\BaseController;

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

    public function list(Request $request)
    {
    	$contract = ContractEntityModule::list($request);
    	return $contract;
    }

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

    public function store(Request $request)
    {
        $contract = ContractEntityModule::store($request);
        return $contract;
    }

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

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

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