mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 20:43:56 +00:00
43 lines
1.0 KiB
PHP
43 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace Database\Seeders;
|
|
|
|
use App\Classes\ValueObjects\Constants\KVPKey;
|
|
use Illuminate\Database\Seeder;
|
|
use App\Models\KeyValuePair;
|
|
|
|
|
|
class KeyValuePairSeeder extends Seeder
|
|
{
|
|
public function run()
|
|
{
|
|
$data = [
|
|
[
|
|
'key' => KVPKey::UI_PAYMENTS_COMPLETE_CURRENCY_ORDERS_IS_LOCKED,
|
|
'value' => 0,
|
|
],
|
|
[
|
|
'key' => KVPKey::UI_PAYMENTS_OPEN_CURRENCY_ORDERS_IS_LOCKED,
|
|
'value' => 0,
|
|
],
|
|
[
|
|
'key' => KVPKey::UI_SUPPLIER_PAID_CURRENCY_ORDER_TAB_IS_LOCKED,
|
|
'value' => 0,
|
|
],
|
|
];
|
|
|
|
foreach ($data as $item) {
|
|
KeyValuePair::updateOrCreate(
|
|
[
|
|
'owner_type' => null,
|
|
'owner_id' => null,
|
|
'key' => $item['key'],
|
|
],
|
|
[
|
|
'value' => $item['value'],
|
|
]
|
|
);
|
|
}
|
|
}
|
|
}
|