<?php

namespace Modules\Dummy\Database\Seeders\Modules\Inventory\Versions\V2_3_0;

use Illuminate\Database\Seeder;

class StockManagementsTableSeeder extends Seeder
{
    public function run()
    {

        \DB::table('stock_managements')->delete();

        \DB::table('stock_managements')->insert([
            0 => [
                'id' => 1,
                'location_id' => 1,
                'product_id' => 1157,
                'quantity' => '60.00000000',
                'type' => 'stock_in_initial',
                'date' => randomDateBefore(90),
                'note' => null,
                'status' => 'approve',
            ],
            1 => [
                'id' => 2,
                'location_id' => 1,
                'product_id' => 1169,
                'quantity' => '85.00000000',
                'type' => 'stock_in_initial',
                'date' => randomDateBefore(90),
                'note' => null,
                'status' => 'approve',
            ],
            2 => [
                'id' => 3,
                'location_id' => 1,
                'product_id' => 1170,
                'quantity' => '120.00000000',
                'type' => 'stock_in_initial',
                'date' => randomDateBefore(90),
                'note' => null,
                'status' => 'approve',
            ],
            3 => [
                'id' => 4,
                'location_id' => 1,
                'product_id' => 1173,
                'quantity' => '97.00000000',
                'type' => 'stock_in_initial',
                'date' => randomDateBefore(90),
                'note' => null,
                'status' => 'approve',
            ],
            4 => [
                'id' => 5,
                'location_id' => 1,
                'product_id' => 1255,
                'quantity' => '112.00000000',
                'type' => 'stock_in_initial',
                'date' => randomDateBefore(90),
                'note' => null,
                'status' => 'approve',
            ],
            5 => [
                'id' => 6,
                'location_id' => 1,
                'product_id' => 1180,
                'quantity' => '225.00000000',
                'type' => 'stock_in_initial',
                'date' => randomDateBefore(90),
                'note' => null,
                'status' => 'approve',
            ],
            6 => [
                'id' => 7,
                'location_id' => 1,
                'product_id' => 1186,
                'quantity' => '123.00000000',
                'type' => 'stock_in_initial',
                'date' => randomDateBefore(90),
                'note' => null,
                'status' => 'approve',
            ],
            7 => [
                'id' => 8,
                'location_id' => 1,
                'product_id' => 1236,
                'quantity' => '170.00000000',
                'type' => 'stock_in_initial',
                'date' => randomDateBefore(90),
                'note' => null,
                'status' => 'approve',
            ],
            8 => [
                'id' => 9,
                'location_id' => 1,
                'product_id' => 1237,
                'quantity' => '167.00000000',
                'type' => 'stock_in_initial',
                'date' => randomDateBefore(90),
                'note' => null,
                'status' => 'approve',
            ],
            9 => [
                'id' => 10,
                'location_id' => 1,
                'product_id' => 1238,
                'quantity' => '332.00000000',
                'type' => 'stock_in_initial',
                'date' => randomDateBefore(90),
                'note' => null,
                'status' => 'approve',
            ],
            10 => [
                'id' => 11,
                'location_id' => 1,
                'product_id' => 1239,
                'quantity' => '79.00000000',
                'type' => 'stock_in_initial',
                'date' => randomDateBefore(90),
                'note' => null,
                'status' => 'approve',
            ],
            11 => [
                'id' => 12,
                'location_id' => 2,
                'product_id' => 1205,
                'quantity' => '232.00000000',
                'type' => 'stock_in_initial',
                'date' => randomDateBefore(90),
                'note' => null,
                'status' => 'approve',
            ],
            12 => [
                'id' => 13,
                'location_id' => 2,
                'product_id' => 1204,
                'quantity' => '59.00000000',
                'type' => 'stock_in_initial',
                'date' => randomDateBefore(90),
                'note' => null,
                'status' => 'approve',
            ],
            13 => [
                'id' => 14,
                'location_id' => 2,
                'product_id' => 1200,
                'quantity' => '66.00000000',
                'type' => 'stock_in_initial',
                'date' => randomDateBefore(90),
                'note' => null,
                'status' => 'approve',
            ],
            /*14 => [
                'id' => 15,
                'location_id' => 3,
                'product_id' => 1199,
                'quantity' => '114.00000000',
                'type' => 'purchase',
                'date' => randomDateBefore(90),
                'note' => null,
                'status' => 'approve',
            ],
            15 => [
                'id' => 16,
                'location_id' => 3,
                'product_id' => 1198,
                'quantity' => '134.00000000',
                'type' => 'purchase',
                'date' => randomDateBefore(90),
                'note' => null,
                'status' => 'approve',
            ],
            16 => [
                'id' => 17,
                'location_id' => 3,
                'product_id' => 1197,
                'quantity' => '120.00000000',
                'type' => 'purchase',
                'date' => randomDateBefore(90),
                'note' => null,
                'status' => 'approve',
            ],
            17 => [
                'id' => 18,
                'location_id' => 1,
                'product_id' => 1173,
                'quantity' => '11.00000000',
                'type' => 'purchase',
                'date' => randomDateBefore(90),
                'note' => null,
                'status' => 'approve',
            ],
            18 => [
                'id' => 19,
                'location_id' => 1,
                'product_id' => 1236,
                'quantity' => '12.00000000',
                'type' => 'purchase',
                'date' => randomDateBefore(90),
                'note' => null,
                'status' => 'approve',
            ],
            19 => [
                'id' => 20,
                'location_id' => 1,
                'product_id' => 1242,
                'quantity' => '20.00000000',
                'type' => 'purchase',
                'date' => randomDateBefore(90),
                'note' => null,
                'status' => 'approve',
            ],*/
            14 => [
                'id' => 15,
                'location_id' => 1,
                'product_id' => 1255,
                'quantity' => '-2.00000000',
                'type' => 'transfer',
                'date' => randomDateBefore(90),
                'note' => null,
                'status' => 'approve',
            ],
            15 => [
                'id' => 16,
                'location_id' => 1,
                'product_id' => 1238,
                'quantity' => '-3.00000000',
                'type' => 'transfer',
                'date' => randomDateBefore(90),
                'note' => null,
                'status' => 'approve',
            ],
            16 => [
                'id' => 17,
                'location_id' => 5,
                'product_id' => 1255,
                'quantity' => '2.00000000',
                'type' => 'transfer',
                'date' => randomDateBefore(90),
                'note' => null,
                'status' => 'approve',
            ],
            17 => [
                'id' => 18,
                'location_id' => 5,
                'product_id' => 1238,
                'quantity' => '3.00000000',
                'type' => 'transfer',
                'date' => randomDateBefore(90),
                'note' => null,
                'status' => 'approve',
            ],
            18 => [
                'id' => 19,
                'location_id' => 1,
                'product_id' => 1236,
                'quantity' => '-3.00000000',
                'type' => 'transfer',
                'date' => randomDateBefore(90),
                'note' => null,
                'status' => 'approve',
            ],
            19 => [
                'id' => 20,
                'location_id' => 1,
                'product_id' => 1238,
                'quantity' => '-2.00000000',
                'type' => 'transfer',
                'date' => randomDateBefore(90),
                'note' => null,
                'status' => 'approve',
            ],
            20 => [
                'id' => 21,
                'location_id' => 3,
                'product_id' => 1199,
                'quantity' => '130.00000000',
                'type' => 'purchase',
                'date' => randomDateBefore(90),
                'note' => null,
                'status' => 'approve',
            ],
            21 => [
                'id' => 22,
                'location_id' => 3,
                'product_id' => 1198,
                'quantity' => '121.00000000',
                'type' => 'purchase',
                'date' => randomDateBefore(90),
                'note' => null,
                'status' => 'approve',
            ],
            22 => [
                'id' => 23,
                'location_id' => 3,
                'product_id' => 1197,
                'quantity' => '120.00000000',
                'type' => 'purchase',
                'date' => randomDateBefore(90),
                'note' => null,
                'status' => 'approve',
            ],
            23 => [
                'id' => 24,
                'location_id' => 1,
                'product_id' => 1236,
                'quantity' => '22.00000000',
                'type' => 'purchase',
                'date' => randomDateBefore(90),
                'note' => null,
                'status' => 'approve',
            ],
            24 => [
                'id' => 25,
                'location_id' => 1,
                'product_id' => 1242,
                'quantity' => '20.00000000',
                'type' => 'purchase',
                'date' => randomDateBefore(90),
                'note' => null,
                'status' => 'approve',
            ],
            25 => [
                'id' => 26,
                'location_id' => 1,
                'product_id' => 1169,
                'quantity' => '33.00000000',
                'type' => 'purchase',
                'date' => randomDateBefore(90),
                'note' => null,
                'status' => 'approve',
            ],
            26 => [
                'id' => 27,
                'location_id' => 7,
                'product_id' => 1205,
                'quantity' => '14.00000000',
                'type' => 'stock_in_initial',
                'date' => randomDateBefore(90),
                'note' => null,
                'status' => 'approve',
            ],
            27 => [
                'id' => 28,
                'location_id' => 7,
                'product_id' => 1204,
                'quantity' => '20.00000000',
                'type' => 'stock_in_initial',
                'date' => randomDateBefore(90),
                'note' => null,
                'status' => 'approve',
            ],
            28 => [
                'id' => 29,
                'location_id' => 2,
                'product_id' => 1205,
                'quantity' => '-2',
                'type' => 'adjust',
                'date' => randomDateBefore(90),
                'note' => null,
                'status' => 'approve',
            ],
        ]);

    }
}
