<?php

namespace Database\Seeders\New;

use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\File;

class InventoriesTableSeeder extends Seeder
{
    public function run()
    {
        // $datas = json_decode(File::get('database/seeders/new/data/warehouses.json'));
        // $table = 'inventories';

        // DB::table($table)->truncate();

        // foreach ($datas as $data) {
        //     DB::table($table)->insertOrIgnore([

        // "id": 2,
        // "code": "maruf_5469008",
        // "name": "Maruf",
        // "address": "5858 Billie Plains Apt. 231\nDaxmouth, NH 94147-9694",
        // "phone": "99362440390",
        // "is_blocked": true,
        // "seller_id": 2,
        // "created_at": "2025-01-10 07:59:05",
        // "updated_at": "2025-01-10 07:59:05",
        // "is_main": false
        //     ]);
        // }

        // DB::statement("
        //     SELECT setval('{$table}_id_seq', (SELECT MAX(id) from {$table}))
        // ");
    }
}
