mirror of
https://gitlab.com/uldvstar/exchange-2.0.git
synced 2026-08-19 04:24:16 +00:00
create database seeder for the services for testing environment
This commit is contained in:
@@ -71,6 +71,7 @@ class UpdateSupplierCurrenciesLogic extends AbstractControllerLogic
|
||||
/**
|
||||
* @param Request $request
|
||||
* @return JsonResponse
|
||||
* @throws ResourceNotFoundException
|
||||
* @throws \App\Classes\Exceptions\AccessForbiddenException
|
||||
* @throws \App\Classes\Exceptions\MalformedRequestException
|
||||
* @throws \App\Classes\Exceptions\RequestValidationException
|
||||
@@ -87,17 +88,18 @@ class UpdateSupplierCurrenciesLogic extends AbstractControllerLogic
|
||||
);
|
||||
|
||||
try {
|
||||
|
||||
$constant = $this->fetchesConstant->execute(['supplier_currencies' => $supplierId]);
|
||||
$this->canUpdateConstant->passes($object);
|
||||
$this->updatesConstant->execute($constant, $object);
|
||||
|
||||
} catch (\Exception $exception) {
|
||||
} catch (ResourceNotFoundException $exception){
|
||||
$this->canCreateConstant->passes($object);
|
||||
$segment = $this->fetchesSegment->execute(['type' => SegmentConstants::STANDARD_SEGMENT]);
|
||||
$constant = $this->createsConstant->execute($segment, $object);
|
||||
$this->createsConstant->execute($segment, $object);
|
||||
}
|
||||
|
||||
return $this->resourceResponse(new ConstantResource($constant));
|
||||
return $this->response([]);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ use App\Classes\Modules\Currencies\Services\FetchesCurrency;
|
||||
use App\Classes\ValueObjects\Constants\SegmentConstants;
|
||||
use App\Http\Resources\ConstantResource;
|
||||
use App\Http\Resources\CurrencyResource;
|
||||
use App\Models\SegmentConstant;
|
||||
|
||||
class ConvertsConstantDetailsToResource
|
||||
{
|
||||
@@ -24,13 +25,13 @@ class ConvertsConstantDetailsToResource
|
||||
}
|
||||
|
||||
|
||||
public function execute(ConstantResource $resource){
|
||||
public function execute(SegmentConstant $constant){
|
||||
|
||||
if($resource->reference === SegmentConstants::SUPPLIER_CURRENCIES) {
|
||||
return property_exists($resource->detail, 'id') ? new CurrencyResource($this->fetchesCurrency->execute(['id' => $resource->detail->id])) : '';
|
||||
if($constant->reference === SegmentConstants::SUPPLIER_CURRENCIES) {
|
||||
return property_exists($constant->detail, 'id') ? new CurrencyResource($this->fetchesCurrency->execute(['id' => $constant->detail->id])) : '';
|
||||
}
|
||||
|
||||
return $resource->detail;
|
||||
return $constant->detail;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ class ConstantResource extends JsonResource
|
||||
'id' => $this->id,
|
||||
'name' => $this->name,
|
||||
'reference' => $this->reference,
|
||||
'detail' => (App()->make(ConvertsConstantDetailsToResource::class))->execute($this)
|
||||
'detail' => (App()->make(ConvertsConstantDetailsToResource::class))->execute($this->resource)
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,362 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class BanksTableDevelopmentSeeder extends Seeder
|
||||
{
|
||||
|
||||
/**
|
||||
* Auto generated seed file
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
|
||||
|
||||
\DB::table('banks')->delete();
|
||||
|
||||
\DB::table('banks')->insert(array (
|
||||
0 =>
|
||||
array (
|
||||
'id' => 1,
|
||||
'company_id' => 1,
|
||||
'reference' => NULL,
|
||||
'bank_name' => 'Maybank',
|
||||
'holder_name' => 'CIEF Worldwide Snd Bhd',
|
||||
'account_no' => '6349569837563465',
|
||||
'type' => 1,
|
||||
'default' => 0,
|
||||
'status' => 2,
|
||||
'country_id' => 1,
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-09 07:49:31',
|
||||
'updated_at' => '2021-03-09 07:49:31',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'id' => 2,
|
||||
'company_id' => 5,
|
||||
'reference' => NULL,
|
||||
'bank_name' => 'Bank Islam',
|
||||
'holder_name' => 'VT Nation Trading',
|
||||
'account_no' => '93487659287365',
|
||||
'type' => 1,
|
||||
'default' => 1,
|
||||
'status' => 2,
|
||||
'country_id' => 1,
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-09 07:50:52',
|
||||
'updated_at' => '2021-03-09 08:07:57',
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
'id' => 3,
|
||||
'company_id' => 4,
|
||||
'reference' => 'Toy Supplier',
|
||||
'bank_name' => 'Bank of China',
|
||||
'holder_name' => 'JY Something',
|
||||
'account_no' => '523457623987456923',
|
||||
'type' => 2,
|
||||
'default' => 0,
|
||||
'status' => 2,
|
||||
'country_id' => 2,
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-09 07:55:25',
|
||||
'updated_at' => '2021-03-09 07:55:25',
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
'id' => 4,
|
||||
'company_id' => 2,
|
||||
'reference' => '1688',
|
||||
'bank_name' => '农业银行',
|
||||
'holder_name' => '一叶之秋',
|
||||
'account_no' => '1234567891234567890',
|
||||
'type' => 2,
|
||||
'default' => 0,
|
||||
'status' => 2,
|
||||
'country_id' => 2,
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-09 07:55:40',
|
||||
'updated_at' => '2021-03-09 07:55:40',
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
'id' => 5,
|
||||
'company_id' => 4,
|
||||
'reference' => 'VHS Supplier',
|
||||
'bank_name' => 'Bank of China',
|
||||
'holder_name' => 'VHS Trading Ltd',
|
||||
'account_no' => '523457623987456923',
|
||||
'type' => 2,
|
||||
'default' => 0,
|
||||
'status' => 2,
|
||||
'country_id' => 2,
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-09 07:55:57',
|
||||
'updated_at' => '2021-03-09 07:55:57',
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
'id' => 6,
|
||||
'company_id' => 3,
|
||||
'reference' => 'abc',
|
||||
'bank_name' => 'ICBC',
|
||||
'holder_name' => 'abc def',
|
||||
'account_no' => '12345678',
|
||||
'type' => 2,
|
||||
'default' => 0,
|
||||
'status' => 2,
|
||||
'country_id' => 2,
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-09 07:56:24',
|
||||
'updated_at' => '2021-03-09 07:56:24',
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
'id' => 7,
|
||||
'company_id' => 6,
|
||||
'reference' => 'PURCHASE',
|
||||
'bank_name' => '建设银行',
|
||||
'holder_name' => '李小龙',
|
||||
'account_no' => '12345678901234567890-=1234567890-=234567',
|
||||
'type' => 2,
|
||||
'default' => 0,
|
||||
'status' => 2,
|
||||
'country_id' => 2,
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-09 08:00:47',
|
||||
'updated_at' => '2021-03-09 08:00:47',
|
||||
),
|
||||
7 =>
|
||||
array (
|
||||
'id' => 8,
|
||||
'company_id' => 7,
|
||||
'reference' => 'huhu sdn bhd',
|
||||
'bank_name' => 'maybank',
|
||||
'holder_name' => 'huhu ha ha',
|
||||
'account_no' => '12837491203',
|
||||
'type' => 2,
|
||||
'default' => 0,
|
||||
'status' => 2,
|
||||
'country_id' => 2,
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-09 08:08:42',
|
||||
'updated_at' => '2021-03-09 08:08:42',
|
||||
),
|
||||
8 =>
|
||||
array (
|
||||
'id' => 9,
|
||||
'company_id' => 8,
|
||||
'reference' => NULL,
|
||||
'bank_name' => 'maybank',
|
||||
'holder_name' => 'jewellery ltd',
|
||||
'account_no' => '234567890901',
|
||||
'type' => 2,
|
||||
'default' => 0,
|
||||
'status' => 2,
|
||||
'country_id' => 2,
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-09 08:51:38',
|
||||
'updated_at' => '2021-03-09 08:51:38',
|
||||
),
|
||||
9 =>
|
||||
array (
|
||||
'id' => 10,
|
||||
'company_id' => 9,
|
||||
'reference' => 'from ABC company',
|
||||
'bank_name' => '中国银行',
|
||||
'holder_name' => 'CHENGDU ENTERPRISE',
|
||||
'account_no' => '5469 5406 8456 5462 857',
|
||||
'type' => 2,
|
||||
'default' => 0,
|
||||
'status' => 2,
|
||||
'country_id' => 2,
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-09 09:27:52',
|
||||
'updated_at' => '2021-03-09 09:27:52',
|
||||
),
|
||||
10 =>
|
||||
array (
|
||||
'id' => 11,
|
||||
'company_id' => 1,
|
||||
'reference' => NULL,
|
||||
'bank_name' => 'Public Bank',
|
||||
'holder_name' => 'ZECTEC SDN BHD',
|
||||
'account_no' => '123344568789',
|
||||
'type' => 1,
|
||||
'default' => 0,
|
||||
'status' => 2,
|
||||
'country_id' => 1,
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-09 09:29:46',
|
||||
'updated_at' => '2021-03-09 09:29:46',
|
||||
),
|
||||
11 =>
|
||||
array (
|
||||
'id' => 12,
|
||||
'company_id' => 11,
|
||||
'reference' => '1234',
|
||||
'bank_name' => 'Probashi bank',
|
||||
'holder_name' => 'Hasan',
|
||||
'account_no' => 'test 123456789',
|
||||
'type' => 2,
|
||||
'default' => 0,
|
||||
'status' => 2,
|
||||
'country_id' => 2,
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-09 09:31:53',
|
||||
'updated_at' => '2021-03-09 09:31:53',
|
||||
),
|
||||
12 =>
|
||||
array (
|
||||
'id' => 13,
|
||||
'company_id' => 2,
|
||||
'reference' => 'AMAZON',
|
||||
'bank_name' => 'USA BANK',
|
||||
'holder_name' => 'CHRIS EVANS',
|
||||
'account_no' => '123455667',
|
||||
'type' => 2,
|
||||
'default' => 0,
|
||||
'status' => 2,
|
||||
'country_id' => 2,
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-09 09:31:56',
|
||||
'updated_at' => '2021-03-09 09:31:56',
|
||||
),
|
||||
13 =>
|
||||
array (
|
||||
'id' => 14,
|
||||
'company_id' => 9,
|
||||
'reference' => 'CHENGDU ENTERPRISE',
|
||||
'bank_name' => 'z中国银行',
|
||||
'holder_name' => 'KLKLHJHJ SDN BHD',
|
||||
'account_no' => '5555 6666 8888 7777 555',
|
||||
'type' => 2,
|
||||
'default' => 0,
|
||||
'status' => 2,
|
||||
'country_id' => 2,
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-09 09:58:07',
|
||||
'updated_at' => '2021-03-09 09:58:07',
|
||||
),
|
||||
14 =>
|
||||
array (
|
||||
'id' => 15,
|
||||
'company_id' => 3,
|
||||
'reference' => 'test',
|
||||
'bank_name' => '中国银行深证华强北支行',
|
||||
'holder_name' => '黄飞鸿',
|
||||
'account_no' => '1235123125123',
|
||||
'type' => 2,
|
||||
'default' => 0,
|
||||
'status' => 2,
|
||||
'country_id' => 2,
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-09 10:38:52',
|
||||
'updated_at' => '2021-03-09 10:38:52',
|
||||
),
|
||||
15 =>
|
||||
array (
|
||||
'id' => 16,
|
||||
'company_id' => 13,
|
||||
'reference' => 'Toy Supplier',
|
||||
'bank_name' => 'Bank of china',
|
||||
'holder_name' => 'Lim Jay',
|
||||
'account_no' => '34652938756423',
|
||||
'type' => 2,
|
||||
'default' => 0,
|
||||
'status' => 2,
|
||||
'country_id' => 2,
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-11 01:11:01',
|
||||
'updated_at' => '2021-03-11 01:11:01',
|
||||
),
|
||||
16 =>
|
||||
array (
|
||||
'id' => 17,
|
||||
'company_id' => 14,
|
||||
'reference' => '123123',
|
||||
'bank_name' => '123123',
|
||||
'holder_name' => '123123',
|
||||
'account_no' => '123123',
|
||||
'type' => 2,
|
||||
'default' => 0,
|
||||
'status' => 2,
|
||||
'country_id' => 2,
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-11 05:40:29',
|
||||
'updated_at' => '2021-03-11 05:40:29',
|
||||
),
|
||||
17 =>
|
||||
array (
|
||||
'id' => 18,
|
||||
'company_id' => 14,
|
||||
'reference' => '44444',
|
||||
'bank_name' => '444444',
|
||||
'holder_name' => '44444',
|
||||
'account_no' => '44444',
|
||||
'type' => 2,
|
||||
'default' => 0,
|
||||
'status' => 2,
|
||||
'country_id' => 2,
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-11 05:41:02',
|
||||
'updated_at' => '2021-03-11 05:41:02',
|
||||
),
|
||||
18 =>
|
||||
array (
|
||||
'id' => 19,
|
||||
'company_id' => 15,
|
||||
'reference' => 'Leong',
|
||||
'bank_name' => 'Maybank',
|
||||
'holder_name' => '333333',
|
||||
'account_no' => '888888',
|
||||
'type' => 2,
|
||||
'default' => 0,
|
||||
'status' => 2,
|
||||
'country_id' => 2,
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-11 06:28:11',
|
||||
'updated_at' => '2021-03-11 06:28:11',
|
||||
),
|
||||
19 =>
|
||||
array (
|
||||
'id' => 20,
|
||||
'company_id' => 15,
|
||||
'reference' => 'Leong',
|
||||
'bank_name' => 'Maybank3',
|
||||
'holder_name' => '333333',
|
||||
'account_no' => '888888',
|
||||
'type' => 2,
|
||||
'default' => 0,
|
||||
'status' => 2,
|
||||
'country_id' => 2,
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-11 06:28:24',
|
||||
'updated_at' => '2021-03-11 06:28:24',
|
||||
),
|
||||
20 =>
|
||||
array (
|
||||
'id' => 21,
|
||||
'company_id' => 12,
|
||||
'reference' => NULL,
|
||||
'bank_name' => 'Citibank',
|
||||
'holder_name' => 'ATVantic',
|
||||
'account_no' => '5629374569234',
|
||||
'type' => 1,
|
||||
'default' => 1,
|
||||
'status' => 2,
|
||||
'country_id' => 1,
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-12 03:35:55',
|
||||
'updated_at' => '2021-03-12 03:36:00',
|
||||
),
|
||||
));
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,206 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class CompaniesTableDevelopmentSeeder extends Seeder
|
||||
{
|
||||
|
||||
/**
|
||||
* Auto generated seed file
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
|
||||
|
||||
\DB::table('companies')->delete();
|
||||
|
||||
\DB::table('companies')->insert(array (
|
||||
0 =>
|
||||
array (
|
||||
'id' => 1,
|
||||
'name' => 'CIEF SDN BHD',
|
||||
'reference' => 'CIEF',
|
||||
'type' => 1,
|
||||
'business_type' => 1,
|
||||
'status' => 2,
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-09 07:30:21',
|
||||
'updated_at' => '2021-03-09 07:30:21',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'id' => 2,
|
||||
'name' => 'WONG JHUN YAN',
|
||||
'reference' => '7153CWO',
|
||||
'type' => 0,
|
||||
'business_type' => 2,
|
||||
'status' => 2,
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-09 07:44:31',
|
||||
'updated_at' => '2021-03-09 07:57:39',
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
'id' => 3,
|
||||
'name' => 'Harry Sdn Bhd',
|
||||
'reference' => '1236HSB',
|
||||
'type' => 1,
|
||||
'business_type' => 2,
|
||||
'status' => 2,
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-09 07:45:14',
|
||||
'updated_at' => '2021-03-09 08:15:40',
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
'id' => 4,
|
||||
'name' => 'MediaSkip Enterprise',
|
||||
'reference' => '4295MEN',
|
||||
'type' => 1,
|
||||
'business_type' => 2,
|
||||
'status' => 2,
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-09 07:45:40',
|
||||
'updated_at' => '2021-03-09 07:59:05',
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
'id' => 5,
|
||||
'name' => 'VT Nation Trading Snd Bhd',
|
||||
'reference' => '9220VNB',
|
||||
'type' => 1,
|
||||
'business_type' => 3,
|
||||
'status' => 0,
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-09 07:50:26',
|
||||
'updated_at' => '2021-03-09 07:50:26',
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
'id' => 6,
|
||||
'name' => 'cief',
|
||||
'reference' => '6768CIE',
|
||||
'type' => 1,
|
||||
'business_type' => 2,
|
||||
'status' => 2,
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-09 07:53:55',
|
||||
'updated_at' => '2021-03-09 07:58:27',
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
'id' => 7,
|
||||
'name' => 'Tan Kai Ying',
|
||||
'reference' => '5601CWO',
|
||||
'type' => 0,
|
||||
'business_type' => 2,
|
||||
'status' => 2,
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-09 08:01:50',
|
||||
'updated_at' => '2021-03-09 08:15:44',
|
||||
),
|
||||
7 =>
|
||||
array (
|
||||
'id' => 8,
|
||||
'name' => 'nurfain zulaika',
|
||||
'reference' => '8765CWO',
|
||||
'type' => 0,
|
||||
'business_type' => 2,
|
||||
'status' => 2,
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-09 08:08:15',
|
||||
'updated_at' => '2021-03-09 08:15:35',
|
||||
),
|
||||
8 =>
|
||||
array (
|
||||
'id' => 9,
|
||||
'name' => 'Wong Fang Ren',
|
||||
'reference' => '5681CWO',
|
||||
'type' => 0,
|
||||
'business_type' => 2,
|
||||
'status' => 2,
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-09 08:10:36',
|
||||
'updated_at' => '2021-03-09 08:15:31',
|
||||
),
|
||||
9 =>
|
||||
array (
|
||||
'id' => 10,
|
||||
'name' => 'CIEF Worldwide',
|
||||
'reference' => '7775CWO',
|
||||
'type' => 1,
|
||||
'business_type' => 2,
|
||||
'status' => 0,
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-09 08:25:51',
|
||||
'updated_at' => '2021-03-09 08:25:51',
|
||||
),
|
||||
10 =>
|
||||
array (
|
||||
'id' => 11,
|
||||
'name' => 'Md Hasan Akbar',
|
||||
'reference' => '2549CWO',
|
||||
'type' => 0,
|
||||
'business_type' => 2,
|
||||
'status' => 2,
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-09 09:08:42',
|
||||
'updated_at' => '2021-03-09 09:39:29',
|
||||
),
|
||||
11 =>
|
||||
array (
|
||||
'id' => 12,
|
||||
'name' => 'Atvantic sdn bhd',
|
||||
'reference' => '2244ASB',
|
||||
'type' => 1,
|
||||
'business_type' => 3,
|
||||
'status' => 0,
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-09 09:30:07',
|
||||
'updated_at' => '2021-03-09 09:30:07',
|
||||
),
|
||||
12 =>
|
||||
array (
|
||||
'id' => 13,
|
||||
'name' => 'Toy Trading Snd Bhd',
|
||||
'reference' => '9330TTB',
|
||||
'type' => 1,
|
||||
'business_type' => 2,
|
||||
'status' => 1,
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-11 01:09:55',
|
||||
'updated_at' => '2021-03-11 01:10:22',
|
||||
),
|
||||
13 =>
|
||||
array (
|
||||
'id' => 14,
|
||||
'name' => 'abc123',
|
||||
'reference' => '2986ABC',
|
||||
'type' => 1,
|
||||
'business_type' => 2,
|
||||
'status' => 1,
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-11 05:38:49',
|
||||
'updated_at' => '2021-03-11 05:39:57',
|
||||
),
|
||||
14 =>
|
||||
array (
|
||||
'id' => 15,
|
||||
'name' => 'Leong Chee Siong',
|
||||
'reference' => '1778CWO',
|
||||
'type' => 0,
|
||||
'business_type' => 2,
|
||||
'status' => 1,
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-11 06:23:03',
|
||||
'updated_at' => '2021-03-11 06:24:27',
|
||||
),
|
||||
));
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class CurrenciesTableDevelopmentSeeder extends Seeder
|
||||
{
|
||||
|
||||
/**
|
||||
* Auto generated seed file
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
|
||||
|
||||
\DB::table('currencies')->delete();
|
||||
|
||||
\DB::table('currencies')->insert(array (
|
||||
0 =>
|
||||
array (
|
||||
'id' => 1,
|
||||
'country_id' => 1,
|
||||
'name' => 'Malaysian Ringgit',
|
||||
'short_code' => 'MYR',
|
||||
'symbol' => 'RM',
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-09 07:30:20',
|
||||
'updated_at' => '2021-03-09 07:30:20',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'id' => 2,
|
||||
'country_id' => 2,
|
||||
'name' => 'Yuan Renminbi',
|
||||
'short_code' => 'RMB',
|
||||
'symbol' => '¥',
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-09 07:30:20',
|
||||
'updated_at' => '2021-03-09 07:30:20',
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
'id' => 3,
|
||||
'country_id' => 3,
|
||||
'name' => 'US Dollar',
|
||||
'short_code' => 'USD',
|
||||
'symbol' => NULL,
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-09 07:49:07',
|
||||
'updated_at' => '2021-03-09 07:49:07',
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
'id' => 4,
|
||||
'country_id' => 4,
|
||||
'name' => 'East Caribbean Dollar',
|
||||
'short_code' => 'XCD',
|
||||
'symbol' => NULL,
|
||||
'deleted_at' => '2021-03-09 09:30:35',
|
||||
'created_at' => '2021-03-09 09:30:28',
|
||||
'updated_at' => '2021-03-09 09:30:35',
|
||||
),
|
||||
));
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,169 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class CurrencyRatesTableDevelopmentSeeder extends Seeder
|
||||
{
|
||||
|
||||
/**
|
||||
* Auto generated seed file
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
|
||||
|
||||
\DB::table('currency_rates')->delete();
|
||||
|
||||
\DB::table('currency_rates')->insert(array (
|
||||
0 =>
|
||||
array (
|
||||
'id' => 1,
|
||||
'currency_id' => 2,
|
||||
'selling' => '1.58000',
|
||||
'payment_method_type' => 1,
|
||||
'service_id' => 1,
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-09 07:52:57',
|
||||
'updated_at' => '2021-03-09 09:56:24',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'id' => 2,
|
||||
'currency_id' => 2,
|
||||
'selling' => '1.57000',
|
||||
'payment_method_type' => 2,
|
||||
'service_id' => 1,
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-09 07:52:57',
|
||||
'updated_at' => '2021-03-09 09:56:24',
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
'id' => 3,
|
||||
'currency_id' => 2,
|
||||
'selling' => '1.54000',
|
||||
'payment_method_type' => 3,
|
||||
'service_id' => 1,
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-09 07:52:57',
|
||||
'updated_at' => '2021-03-09 07:52:57',
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
'id' => 4,
|
||||
'currency_id' => 3,
|
||||
'selling' => '4.25000',
|
||||
'payment_method_type' => 1,
|
||||
'service_id' => 1,
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-09 07:52:57',
|
||||
'updated_at' => '2021-03-09 09:56:24',
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
'id' => 5,
|
||||
'currency_id' => 3,
|
||||
'selling' => '4.23000',
|
||||
'payment_method_type' => 2,
|
||||
'service_id' => 1,
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-09 07:52:57',
|
||||
'updated_at' => '2021-03-09 09:56:24',
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
'id' => 6,
|
||||
'currency_id' => 3,
|
||||
'selling' => '0.22000',
|
||||
'payment_method_type' => 3,
|
||||
'service_id' => 1,
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-09 07:52:57',
|
||||
'updated_at' => '2021-03-09 07:52:57',
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
'id' => 7,
|
||||
'currency_id' => 2,
|
||||
'selling' => '1.54000',
|
||||
'payment_method_type' => 1,
|
||||
'service_id' => 4,
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-09 10:09:11',
|
||||
'updated_at' => '2021-03-09 10:09:11',
|
||||
),
|
||||
7 =>
|
||||
array (
|
||||
'id' => 8,
|
||||
'currency_id' => 2,
|
||||
'selling' => '1.53000',
|
||||
'payment_method_type' => 2,
|
||||
'service_id' => 4,
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-09 10:09:11',
|
||||
'updated_at' => '2021-03-09 10:09:11',
|
||||
),
|
||||
8 =>
|
||||
array (
|
||||
'id' => 9,
|
||||
'currency_id' => 3,
|
||||
'selling' => '4.20000',
|
||||
'payment_method_type' => 1,
|
||||
'service_id' => 4,
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-09 10:09:11',
|
||||
'updated_at' => '2021-03-09 10:09:11',
|
||||
),
|
||||
9 =>
|
||||
array (
|
||||
'id' => 10,
|
||||
'currency_id' => 3,
|
||||
'selling' => '4.10000',
|
||||
'payment_method_type' => 2,
|
||||
'service_id' => 4,
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-09 10:09:11',
|
||||
'updated_at' => '2021-03-09 10:09:11',
|
||||
),
|
||||
10 =>
|
||||
array (
|
||||
'id' => 11,
|
||||
'currency_id' => 2,
|
||||
'selling' => '1.60000',
|
||||
'payment_method_type' => 1,
|
||||
'service_id' => 5,
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-11 06:34:23',
|
||||
'updated_at' => '2021-03-11 06:34:23',
|
||||
),
|
||||
11 =>
|
||||
array (
|
||||
'id' => 12,
|
||||
'currency_id' => 2,
|
||||
'selling' => '1.55000',
|
||||
'payment_method_type' => 2,
|
||||
'service_id' => 5,
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-11 06:34:23',
|
||||
'updated_at' => '2021-03-11 06:34:23',
|
||||
),
|
||||
12 =>
|
||||
array (
|
||||
'id' => 13,
|
||||
'currency_id' => 2,
|
||||
'selling' => '1.54000',
|
||||
'payment_method_type' => 3,
|
||||
'service_id' => 5,
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-11 06:34:23',
|
||||
'updated_at' => '2021-03-11 06:34:23',
|
||||
),
|
||||
));
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,12 @@
|
||||
<?php
|
||||
|
||||
use Database\Seeders\BanksTableDevelopmentSeeder;
|
||||
use Database\Seeders\CompaniesTableDevelopmentSeeder;
|
||||
use Database\Seeders\CurrenciesTableDevelopmentSeeder;
|
||||
use Database\Seeders\CurrencyRatesTableDevelopmentSeeder;
|
||||
use Database\Seeders\SegmentConstantsTableDevelopmentSeeder;
|
||||
use Database\Seeders\SegmentsTableDevelopmentSeeder;
|
||||
use Database\Seeders\ServiceTypesTableDevelopmentSeeder;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
@@ -30,6 +37,16 @@ class DatabaseSeeder extends Seeder
|
||||
$this->call(AdminUserTableSeeder::class);
|
||||
$this->call(AdminUserPermissionsTableSeeder::class);
|
||||
|
||||
if(App()->environment('local')){
|
||||
$this->call(BanksTableDevelopmentSeeder::class);
|
||||
$this->call(CompaniesTableDevelopmentSeeder::class);
|
||||
$this->call(CurrenciesTableDevelopmentSeeder::class);
|
||||
$this->call(ServiceTypesTableDevelopmentSeeder::class);
|
||||
$this->call(SegmentsTableDevelopmentSeeder::class);
|
||||
$this->call(SegmentConstantsTableDevelopmentSeeder::class);
|
||||
$this->call(CurrencyRatesTableDevelopmentSeeder::class);
|
||||
}
|
||||
|
||||
DB::commit();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,147 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class SegmentConstantsTableDevelopmentSeeder extends Seeder
|
||||
{
|
||||
|
||||
/**
|
||||
* Auto generated seed file
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
|
||||
|
||||
\DB::table('segment_constants')->delete();
|
||||
|
||||
\DB::table('segment_constants')->insert(array (
|
||||
0 =>
|
||||
array (
|
||||
'id' => 1,
|
||||
'segment_id' => 1,
|
||||
'name' => 'System Primary Currency',
|
||||
'reference' => 'SYSTEM_PRIMARY_CURRENCY',
|
||||
'detail' => '{"id":1}',
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-09 07:30:21',
|
||||
'updated_at' => '2021-03-09 07:30:21',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'id' => 5,
|
||||
'segment_id' => 1,
|
||||
'name' => 'Payment Attempt Duration Limit',
|
||||
'reference' => 'PAYMENT_ATTEMPT_DURATION_LIMIT',
|
||||
'detail' => '{"minutes":750}',
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-09 07:51:13',
|
||||
'updated_at' => '2021-03-11 06:33:08',
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
'id' => 6,
|
||||
'segment_id' => 1,
|
||||
'name' => 'Service Type',
|
||||
'reference' => 'SERVICE_TYPE',
|
||||
'detail' => '{"id":1,"bank_id":1,"service_charge":{"type":"percentage","value":2},"minimum_charge":{"type":"fixed_amount","value":10},"tax":{"type":"percentage","value":0},"po_limit":{"type":"fixed_amount","value":3},"is_active":true,"is_billable":true,"currencies":[{"id":2,"max_limit":{"type":"fixed_amount","value":500000},"min_limit":{"type":"fixed_amount","value":100},"rates":[]},{"id":3,"max_limit":{"type":"fixed_amount","value":10000},"min_limit":{"type":"fixed_amount","value":20},"rates":[]}]}',
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-09 07:52:57',
|
||||
'updated_at' => '2021-03-09 07:53:04',
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
'id' => 17,
|
||||
'segment_id' => 1,
|
||||
'name' => 'Supplier\'s Currencies',
|
||||
'reference' => 'SUPPLIER_CURRENCIES',
|
||||
'detail' => '{"id":"5","currencies":[3,2]}',
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-09 08:14:41',
|
||||
'updated_at' => '2021-03-09 08:14:41',
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
'id' => 18,
|
||||
'segment_id' => 1,
|
||||
'name' => 'Service Type',
|
||||
'reference' => 'SERVICE_TYPE',
|
||||
'detail' => '{"id":2,"bank_id":1,"service_charge":{"type":"percentage","value":1},"minimum_charge":{"type":"fixed_amount","value":20},"tax":{"type":"percentage","value":0},"po_limit":{"type":"fixed_amount","value":1},"is_active":true,"is_billable":true,"currencies":[]}',
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-09 09:35:55',
|
||||
'updated_at' => '2021-03-09 09:40:27',
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
'id' => 19,
|
||||
'segment_id' => 1,
|
||||
'name' => 'Service Type',
|
||||
'reference' => 'SERVICE_TYPE',
|
||||
'detail' => '{"id":3,"bank_id":11,"service_charge":{"type":"percentage","value":1},"minimum_charge":{"type":"fixed_amount","value":20},"tax":{"type":"percentage","value":0},"po_limit":{"type":"fixed_amount","value":1},"is_active":true,"is_billable":true,"currencies":[{"id":2,"max_limit":{"type":"fixed_amount","value":0},"min_limit":{"type":"fixed_amount","value":0},"rates":[]}]}',
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-09 09:36:26',
|
||||
'updated_at' => '2021-03-09 09:36:57',
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
'id' => 22,
|
||||
'segment_id' => 5,
|
||||
'name' => 'Custom Service Type',
|
||||
'reference' => 'CUSTOM_SERVICE_TYPE',
|
||||
'detail' => '{"id":1,"service_charge":{"type":"percentage","value":1},"is_active":true,"is_billable":true,"currencies":[]}',
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-09 09:53:52',
|
||||
'updated_at' => '2021-03-09 10:53:09',
|
||||
),
|
||||
7 =>
|
||||
array (
|
||||
'id' => 23,
|
||||
'segment_id' => 1,
|
||||
'name' => 'Service Type',
|
||||
'reference' => 'SERVICE_TYPE',
|
||||
'detail' => '{"id":4,"bank_id":1,"service_charge":{"type":"percentage","value":3.5},"minimum_charge":{"type":"fixed_amount","value":100},"tax":{"type":"percentage","value":0},"po_limit":{"type":"fixed_amount","value":1},"is_active":true,"is_billable":true,"currencies":[{"id":2,"max_limit":{"type":"fixed_amount","value":500000},"min_limit":{"type":"fixed_amount","value":0.01},"rates":[]},{"id":3,"max_limit":{"type":"fixed_amount","value":0},"min_limit":{"type":"fixed_amount","value":1000},"rates":[]}]}',
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-09 10:09:11',
|
||||
'updated_at' => '2021-03-09 10:51:48',
|
||||
),
|
||||
8 =>
|
||||
array (
|
||||
'id' => 24,
|
||||
'segment_id' => 5,
|
||||
'name' => 'Custom Service Type',
|
||||
'reference' => 'CUSTOM_SERVICE_TYPE',
|
||||
'detail' => '{"id":4,"service_charge":{"type":"percentage","value":3.5},"is_active":true,"is_billable":true,"currencies":[{"id":2,"max_limit":{"type":"fixed_amount","value":500000},"min_limit":{"type":"fixed_amount","value":0.01},"rates":[]},{"id":3,"max_limit":{"type":"fixed_amount","value":200000},"min_limit":{"type":"fixed_amount","value":0.01},"rates":[]}]}',
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-09 10:17:30',
|
||||
'updated_at' => '2021-03-09 10:31:04',
|
||||
),
|
||||
9 =>
|
||||
array (
|
||||
'id' => 25,
|
||||
'segment_id' => 1,
|
||||
'name' => 'Service Type',
|
||||
'reference' => 'SERVICE_TYPE',
|
||||
'detail' => '{"id":5,"bank_id":11,"service_charge":{"type":"percentage","value":3},"minimum_charge":{"type":"fixed_amount","value":100},"tax":{"type":"percentage","value":12},"po_limit":{"type":"fixed_amount","value":1},"is_active":true,"is_billable":true,"currencies":[{"id":2,"max_limit":{"type":"fixed_amount","value":10000},"min_limit":{"type":"fixed_amount","value":5000},"rates":[]}]}',
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-11 06:34:23',
|
||||
'updated_at' => '2021-03-11 06:34:36',
|
||||
),
|
||||
10 =>
|
||||
array (
|
||||
'id' => 42,
|
||||
'segment_id' => 1,
|
||||
'name' => 'Supplier\'s Currencies',
|
||||
'reference' => 'SUPPLIER_CURRENCIES',
|
||||
'detail' => '{"id":"12","currencies":[2]}',
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-12 03:17:10',
|
||||
'updated_at' => '2021-03-12 03:17:39',
|
||||
),
|
||||
));
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class SegmentsTableDevelopmentSeeder extends Seeder
|
||||
{
|
||||
|
||||
/**
|
||||
* Auto generated seed file
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
|
||||
|
||||
\DB::table('segments')->delete();
|
||||
|
||||
\DB::table('segments')->insert(array (
|
||||
0 =>
|
||||
array (
|
||||
'id' => 1,
|
||||
'name' => 'Standard Segment',
|
||||
'type' => 1,
|
||||
'status' => 2,
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => NULL,
|
||||
'updated_at' => NULL,
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'id' => 5,
|
||||
'name' => 'platinium member',
|
||||
'type' => 2,
|
||||
'status' => 2,
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-09 09:52:57',
|
||||
'updated_at' => '2021-03-09 09:52:57',
|
||||
),
|
||||
));
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class ServiceTypesTableDevelopmentSeeder extends Seeder
|
||||
{
|
||||
|
||||
/**
|
||||
* Auto generated seed file
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
|
||||
|
||||
\DB::table('service_types')->delete();
|
||||
|
||||
\DB::table('service_types')->insert(array (
|
||||
0 =>
|
||||
array (
|
||||
'id' => 1,
|
||||
'name' => 'X1 Transfer',
|
||||
'status' => '2',
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-09 07:52:56',
|
||||
'updated_at' => '2021-03-09 09:57:40',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'id' => 2,
|
||||
'name' => 'X1 Transfer (P)',
|
||||
'status' => '5',
|
||||
'deleted_at' => '2021-03-09 09:50:10',
|
||||
'created_at' => '2021-03-09 09:35:55',
|
||||
'updated_at' => '2021-03-09 09:50:10',
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
'id' => 3,
|
||||
'name' => 'x9',
|
||||
'status' => '5',
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-09 09:36:26',
|
||||
'updated_at' => '2021-03-09 09:55:26',
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
'id' => 4,
|
||||
'name' => 'X3 Service',
|
||||
'status' => '2',
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-09 10:09:11',
|
||||
'updated_at' => '2021-03-09 10:09:11',
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
'id' => 5,
|
||||
'name' => 'M3',
|
||||
'status' => '2',
|
||||
'deleted_at' => NULL,
|
||||
'created_at' => '2021-03-11 06:34:23',
|
||||
'updated_at' => '2021-03-11 06:34:23',
|
||||
),
|
||||
));
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -344,7 +344,7 @@
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<div class="col-10">
|
||||
<div class="col">
|
||||
<list-component key="2" section="transferSection" :endpoint="route('api.booking.list')" :options="{per_page: 10, status: 2}">
|
||||
<template slot="list" slot-scope="{data}">
|
||||
<booking-component :data="data"></booking-component>
|
||||
|
||||
Reference in New Issue
Block a user