added company company type into admin module
This commit is contained in:
@ -7,6 +7,6 @@ interface AppreciationInterface
|
||||
public function findAll();
|
||||
public function getAppreciationById($appreciationId);
|
||||
public function delete($appreciationId);
|
||||
public function create(array $AppreciationDetails);
|
||||
public function create(array $appreciationDetails);
|
||||
public function update($appreciationId, array $newDetails);
|
||||
}
|
||||
|
12
Modules/Admin/app/Repositories/CompanyInterface.php
Normal file
12
Modules/Admin/app/Repositories/CompanyInterface.php
Normal file
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\Repositories;
|
||||
|
||||
interface CompanyInterface
|
||||
{
|
||||
public function findAll();
|
||||
public function getCompanyById($companyId);
|
||||
public function delete($companyId);
|
||||
public function create(array $companyDetails);
|
||||
public function update($companyId, array $newDetails);
|
||||
}
|
35
Modules/Admin/app/Repositories/CompanyRepository.php
Normal file
35
Modules/Admin/app/Repositories/CompanyRepository.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\Repositories;
|
||||
|
||||
use Modules\Admin\Models\Company;
|
||||
|
||||
|
||||
class CompanyRepository implements CompanyInterface
|
||||
{
|
||||
public function findAll()
|
||||
{
|
||||
return Company::get();
|
||||
}
|
||||
|
||||
public function getCompanyById($companyId)
|
||||
{
|
||||
return Company::findOrFail($companyId);
|
||||
}
|
||||
|
||||
public function delete($companyId)
|
||||
{
|
||||
Company::destroy($companyId);
|
||||
}
|
||||
|
||||
public function create(array $companyDetails)
|
||||
{
|
||||
return Company::create($companyDetails);
|
||||
}
|
||||
|
||||
public function update($companyId, array $newDetails)
|
||||
{
|
||||
return Company::where('company_id', $companyId)->update($newDetails);
|
||||
}
|
||||
|
||||
}
|
12
Modules/Admin/app/Repositories/CompanyTypeInterface.php
Normal file
12
Modules/Admin/app/Repositories/CompanyTypeInterface.php
Normal file
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\Repositories;
|
||||
|
||||
interface CompanyTypeInterface
|
||||
{
|
||||
public function findAll();
|
||||
public function getCompanyTypeById($companyTypeId);
|
||||
public function delete($companyTypeId);
|
||||
public function create(array $companyTypeDetails);
|
||||
public function update($companyTypeId, array $newDetails);
|
||||
}
|
35
Modules/Admin/app/Repositories/CompanyTypeRepository.php
Normal file
35
Modules/Admin/app/Repositories/CompanyTypeRepository.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\Repositories;
|
||||
|
||||
use Modules\Admin\Models\CompanyType;
|
||||
|
||||
|
||||
class CompanyTypeRepository implements CompanyTypeInterface
|
||||
{
|
||||
public function findAll()
|
||||
{
|
||||
return CompanyType::get();
|
||||
}
|
||||
|
||||
public function getCompanyTypeById($companyTypeId)
|
||||
{
|
||||
return CompanyType::findOrFail($companyTypeId);
|
||||
}
|
||||
|
||||
public function delete($companyTypeId)
|
||||
{
|
||||
CompanyType::destroy($companyTypeId);
|
||||
}
|
||||
|
||||
public function create(array $companyTypeDetails)
|
||||
{
|
||||
return CompanyType::create($companyTypeDetails);
|
||||
}
|
||||
|
||||
public function update($companyTypeId, array $newDetails)
|
||||
{
|
||||
return CompanyType::where('companyType_id', $companyTypeId)->update($newDetails);
|
||||
}
|
||||
|
||||
}
|
12
Modules/Admin/app/Repositories/ComplaintInterface.php
Normal file
12
Modules/Admin/app/Repositories/ComplaintInterface.php
Normal file
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\Repositories;
|
||||
|
||||
interface ComplaintInterface
|
||||
{
|
||||
public function findAll();
|
||||
public function getComplaintById($complaintId);
|
||||
public function delete($complaintId);
|
||||
public function create(array $complaintDetails);
|
||||
public function update($complaintId, array $newDetails);
|
||||
}
|
35
Modules/Admin/app/Repositories/ComplaintRepository.php
Normal file
35
Modules/Admin/app/Repositories/ComplaintRepository.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\Repositories;
|
||||
|
||||
use Modules\Admin\Models\Complaint;
|
||||
|
||||
|
||||
class ComplaintRepository implements ComplaintInterface
|
||||
{
|
||||
public function findAll()
|
||||
{
|
||||
return Complaint::get();
|
||||
}
|
||||
|
||||
public function getComplaintById($complaintId)
|
||||
{
|
||||
return Complaint::findOrFail($complaintId);
|
||||
}
|
||||
|
||||
public function delete($complaintId)
|
||||
{
|
||||
Complaint::destroy($complaintId);
|
||||
}
|
||||
|
||||
public function create(array $complaintDetails)
|
||||
{
|
||||
return Complaint::create($complaintDetails);
|
||||
}
|
||||
|
||||
public function update($complaintId, array $newDetails)
|
||||
{
|
||||
return Complaint::where('complaint_id', $complaintId)->update($newDetails);
|
||||
}
|
||||
|
||||
}
|
@ -7,6 +7,6 @@ interface PromotionDemotionInterface
|
||||
public function findAll();
|
||||
public function getPromotionDemotionById($promotionDemotionId);
|
||||
public function delete($promotionDemotionId);
|
||||
public function create(array $PromotionDemotionDetails);
|
||||
public function create(array $promotionDemotionDetails);
|
||||
public function update($promotionDemotionId, array $newDetails);
|
||||
}
|
||||
|
@ -7,6 +7,6 @@ interface ResignationInterface
|
||||
public function findAll();
|
||||
public function getResignationById($resignationId);
|
||||
public function delete($resignationId);
|
||||
public function create(array $ResignationDetails);
|
||||
public function create(array $resignationDetails);
|
||||
public function update($resignationId, array $newDetails);
|
||||
}
|
||||
|
12
Modules/Admin/app/Repositories/TransferInterface.php
Normal file
12
Modules/Admin/app/Repositories/TransferInterface.php
Normal file
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\Repositories;
|
||||
|
||||
interface TransferInterface
|
||||
{
|
||||
public function findAll();
|
||||
public function getTransferById($transferId);
|
||||
public function delete($transferId);
|
||||
public function create(array $transferDetails);
|
||||
public function update($transferId, array $newDetails);
|
||||
}
|
35
Modules/Admin/app/Repositories/TransferRepository.php
Normal file
35
Modules/Admin/app/Repositories/TransferRepository.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\Repositories;
|
||||
|
||||
use Modules\Admin\Models\Transfer;
|
||||
|
||||
|
||||
class TransferRepository implements TransferInterface
|
||||
{
|
||||
public function findAll()
|
||||
{
|
||||
return Transfer::get();
|
||||
}
|
||||
|
||||
public function getTransferById($transferId)
|
||||
{
|
||||
return Transfer::findOrFail($transferId);
|
||||
}
|
||||
|
||||
public function delete($transferId)
|
||||
{
|
||||
Transfer::destroy($transferId);
|
||||
}
|
||||
|
||||
public function create(array $transferDetails)
|
||||
{
|
||||
return Transfer::create($transferDetails);
|
||||
}
|
||||
|
||||
public function update($transferId, array $newDetails)
|
||||
{
|
||||
return Transfer::where('transfer_id', $transferId)->update($newDetails);
|
||||
}
|
||||
|
||||
}
|
12
Modules/Admin/app/Repositories/WarningInterface.php
Normal file
12
Modules/Admin/app/Repositories/WarningInterface.php
Normal file
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\Repositories;
|
||||
|
||||
interface WarningInterface
|
||||
{
|
||||
public function findAll();
|
||||
public function getWarningById($warningId);
|
||||
public function delete($warningId);
|
||||
public function create(array $warningDetails);
|
||||
public function update($warningId, array $newDetails);
|
||||
}
|
35
Modules/Admin/app/Repositories/WarningRepository.php
Normal file
35
Modules/Admin/app/Repositories/WarningRepository.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\Repositories;
|
||||
|
||||
use Modules\Admin\Models\Warning;
|
||||
|
||||
|
||||
class WarningRepository implements WarningInterface
|
||||
{
|
||||
public function findAll()
|
||||
{
|
||||
return Warning::get();
|
||||
}
|
||||
|
||||
public function getWarningById($warningId)
|
||||
{
|
||||
return Warning::findOrFail($warningId);
|
||||
}
|
||||
|
||||
public function delete($warningId)
|
||||
{
|
||||
Warning::destroy($warningId);
|
||||
}
|
||||
|
||||
public function create(array $warningDetails)
|
||||
{
|
||||
return Warning::create($warningDetails);
|
||||
}
|
||||
|
||||
public function update($warningId, array $newDetails)
|
||||
{
|
||||
return Warning::where('warning_id', $warningId)->update($newDetails);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user