Files
portal/database/seeders/SegmentConstantsTableSeeder.php
T

135 lines
4.7 KiB
PHP

<?php
namespace Database\Seeders;
use App\Classes\ValueObjects\Constants\SegmentConstants;
use App\Classes\ValueObjects\Constants\WarehouseReferences;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
class SegmentConstantsTableSeeder extends Seeder
{
public function run()
{
DB::beginTransaction();
DB::table('segment_constants')->insert([
[
'id' => 1,
'segment_id' => 1,
'reference' => SegmentConstants::BASE_PRICE,
'value' => json_encode([
'2022-05-01'=> '0.00',
'2022-05-02'=> '0.00',
]),
],
[
'id' => 2,
'segment_id' => 1,
'reference' => SegmentConstants::WAREHOUSE_RATE,
'value' => json_encode([
'7' =>[
'amount' => '0.00',
],
'6' =>[
'amount' => '0.00',
],
]),
],
[
'id' => 3,
'segment_id' => 1,
'reference' => SegmentConstants::STATE_RATE,
'value' => json_encode([
'1' =>[
'center' => '10.00',
'outstation' => '2.00'
],
'2' =>[
'center' => '10.00',
'outstation' => '2.00'
],
'3' =>[
'center' => '10.00',
'outstation' => '2.00'
],
'4' =>[
'center' => '10.00',
'outstation' => '2.00'
],
'5' =>[
'center' => '10.00',
'outstation' => '2.00'
],
'6' =>[
'center' => '10.00',
'outstation' => '2.00'
],
'7' =>[
'center' => '10.00',
'outstation' => '2.00'
],
'8' =>[
'center' => '10.00',
'outstation' => '2.00'
],
'9' =>[
'center' => '10.00',
'outstation' => '2.00'
],
'10' =>[
'center' => '10.00',
'outstation' => '2.00'
],
'11' =>[
'center' => '10.00',
'outstation' => '2.00'
],
'12' =>[
'center' => '10.00',
'outstation' => '2.00'
],
'13' =>[
'center' => '10.00',
'outstation' => '2.00'
],
'14' =>[
'center' => '10.00',
'outstation' => '2.00'
],
'15' =>[
'center' => '10.00',
'outstation' => '2.00'
],
'16' =>[
'center' => '10.00',
'outstation' => '2.00'
]
]),
],
[
'id' => 4,
'segment_id' => 1,
'reference' => SegmentConstants::CENTER_POSTCODE,
'value' => json_encode(['80050','80100','80150','80200','80250','80300','80350','80400','80500','80506','80508','80516','80519','80534','80536','80542','80546','80558','80560','80564','80568','80578','80584','80586','80590','80592','80594','80596','80600','80604','80608','80620','80622','80628','80644','80648','80662','80664','80668','80670','80672','80673','80676','80700','80710','80720','80730','80900','80902','80904','80906','80908','80988','80990','81000','81100','81200','81300','81310']),
],
[
'id' => 5,
'segment_id' => 1,
'reference' => SegmentConstants::OUTSTATION_POSTCODE,
'value' => json_encode(['80000']),
],
[
'id' => 6,
'segment_id' => 2,
'reference' => SegmentConstants::CUSTOMER_RATE,
'value' => json_encode([
'id'=> 1,
'price' => 15,
]),
],
]);
DB::commit();
}
}