<?php

namespace Database\Seeders;

use Illuminate\Support\Str;
use Illuminate\Support\Carbon;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;

class ProtocoloSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $descricoes = [
            "Commodo sit at vulputate faucibus velit senectus sem etiam, tincidunt potenti ornare aliquam fames
            aenean platea interdum, sollicitudin tempus velit dictum curabitur ut vivamus. per donec facilisis
            porttitor posuere nostra, cubilia integer duis neque quisque, tristique suspendisse urna odio. a magna
            etiam tortor at etiam aliquam elit tristique mattis pharetra, vehicula tellus purus euismod convallis
            etiam quam erat habitant lacus porttitor, condimentum mollis in curabitur sem proin nulla dolor
            porttitor. congue platea tempor aptent pretium turpis sed vivamus aenean, nam massa et commodo litora
            class mattis neque, morbi feugiat egestas cursus lacinia nunc fames. ",
            "Cubilia vehicula dapibus viverra fringilla amet aenean aptent cras placerat ornare sociosqu libero dui
            litora, cursus vulputate imperdiet scelerisque proin at erat consectetur pharetra massa in aliquet tellus.
            purus magna ipsum nostra ultricies adipiscing ut, conubia rutrum dictumst dui rutrum urna, elit eros placerat
            dictum sollicitudin. ",
            "Inceptos est senectus himenaeos nullam maecenas etiam eros quisque arcu, convallis diam neque mi nulla
            tempus scelerisque ut viverra sociosqu, primis pharetra netus quis at ut ante ultricies. ac pharetra ut
            varius sit ultricies turpis primis mi odio, quisque porta erat nunc eget fusce semper tempor, justo mollis
            quam eu est quisque vel aliquam. mi laoreet varius rhoncus ultricies tempus, nam tristique arcu sem placerat
            mauris, quisque ultricies consectetur cursus. platea vestibulum nibh tristique platea senectus vivamus,
            feugiat donec a conubia ac quis curabitur, viverra adipiscing laoreet vulputate posuere. platea ligula justo
            nisi massa justo donec pharetra leo aenean nam tellus, arcu proin ante scelerisque ornare suscipit eleifend
            elit mattis tempor, sit vehicula eleifend vitae nisl feugiat a interdum purus ac.",
            "Eu orci auctor consectetur dictumst commodo iaculis est lacus habitant tempus, malesuada lorem dolor himenaeos
            tristique commodo erat maecenas.",
            "Volutpat in consectetur tortor conubia orci felis proin dolor, amet elit quam conubia mi rutrum
            vehicula duis torquent, quisque himenaeos dictum sodales orci sodales fusce. curae ut potenti aliquam
            interdum viverra sem consectetur pulvinar in curabitur imperdiet dapibus quis, convallis taciti
            habitasse rhoncus faucibus metus cursus porttitor sit euismod bibendum."
        ];

        $arrayTipo = ["informação",
        "denúncia",
        "serviço",
        "d\u00favida",
        "reclama\u00e7\u00e3o",
        "elogio",
        "sugest\u00e3o",
         "recurso"];

        $arrayStatus = [
            "aberta",
            "encaminhada"/*,
            "atrasada",
            "fechada"*/
        ];

        $arrayIds= [4, 5];

        DB::table('protocolos')->insert([
            [
                'codigo' => Str::random(10),
                'tipo' => $arrayTipo[rand(0, 3)],
                'descricao' => $descricoes[rand(0, 4)],
                'status' => $arrayStatus[rand(0, 1)],
                'idUser' => $arrayIds[rand(0, 1)],
                'created_at' => Carbon::now()->subMonths(rand(0, 10)),
                'idSetor' => rand(1, 19)
            ],
            [
                'codigo' => Str::random(10),
                'tipo' => $arrayTipo[rand(0, 3)],
                'descricao' => $descricoes[rand(0, 4)],
                'status' => $arrayStatus[rand(0, 1)],
                'idUser' => $arrayIds[rand(0, 1)],
                'created_at' => Carbon::now()->subMonths(rand(0, 10)),
                'idSetor' => rand(1, 19)
            ],
            [
                'codigo' => Str::random(10),
                'tipo' => $arrayTipo[rand(0, 3)],
                'descricao' => $descricoes[rand(0, 4)],
                'status' => $arrayStatus[rand(0, 1)],
                'idUser' => $arrayIds[rand(0, 1)],
                'created_at' => Carbon::now()->subMonths(rand(0, 10)),
                'idSetor' => rand(1, 19)
            ],
            [
                'codigo' => Str::random(10),
                'tipo' => $arrayTipo[rand(0, 3)],
                'descricao' => $descricoes[rand(0, 4)],
                'status' => $arrayStatus[rand(0, 1)],
                'idUser' => $arrayIds[rand(0, 1)],
                'created_at' => Carbon::now()->subMonths(rand(0, 10)),
                'idSetor' => rand(1, 19)
            ],
            [
                'codigo' => Str::random(10),
                'tipo' => $arrayTipo[rand(0, 3)],
                'descricao' => $descricoes[rand(0, 4)],
                'status' => $arrayStatus[rand(0, 1)],
                'idUser' => $arrayIds[rand(0, 1)],
                'created_at' => Carbon::now()->subMonths(rand(0, 10)),
                'idSetor' => rand(1, 19)
            ],
            [
                'codigo' => Str::random(10),
                'tipo' => $arrayTipo[rand(0, 3)],
                'descricao' => $descricoes[rand(0, 4)],
                'status' => $arrayStatus[rand(0, 1)],
                'idUser' => $arrayIds[rand(0, 1)],
                'created_at' => Carbon::now()->subMonths(rand(0, 10)),
                'idSetor' => rand(1, 19)
            ],
            [
                'codigo' => Str::random(10),
                'tipo' => $arrayTipo[rand(0, 3)],
                'descricao' => $descricoes[rand(0, 4)],
                'status' => $arrayStatus[rand(0, 1)],
                'idUser' => $arrayIds[rand(0, 1)],
                'created_at' => Carbon::now()->subMonths(rand(0, 10)),
                'idSetor' => rand(1, 19)
            ],
            [
                'codigo' => Str::random(10),
                'tipo' => $arrayTipo[rand(0, 3)],
                'descricao' => $descricoes[rand(0, 4)],
                'status' => $arrayStatus[rand(0, 1)],
                'idUser' => $arrayIds[rand(0, 1)],
                'created_at' => Carbon::now()->subMonths(rand(0, 10)),
                'idSetor' => rand(1, 19)
            ],
            [
                'codigo' => Str::random(10),
                'tipo' => $arrayTipo[rand(0, 3)],
                'descricao' => $descricoes[rand(0, 4)],
                'status' => $arrayStatus[rand(0, 1)],
                'idUser' => $arrayIds[rand(0, 1)],
                'created_at' => Carbon::now()->subMonths(rand(0, 10)),
                'idSetor' => rand(1, 19)
            ],
            [
                'codigo' => Str::random(10),
                'tipo' => $arrayTipo[rand(0, 3)],
                'descricao' => $descricoes[rand(0, 4)],
                'status' => $arrayStatus[rand(0, 1)],
                'idUser' => $arrayIds[rand(0, 1)],
                'created_at' => Carbon::now()->subMonths(rand(0, 10)),
                'idSetor' => rand(1, 19)
            ],
            [
                'codigo' => Str::random(10),
                'tipo' => $arrayTipo[rand(0, 3)],
                'descricao' => $descricoes[rand(0, 4)],
                'status' => $arrayStatus[rand(0, 1)],
                'idUser' => $arrayIds[rand(0, 1)],
                'created_at' => Carbon::now()->subMonths(rand(0, 10)),
                'idSetor' => rand(1, 19)
            ],
            [
                'codigo' => Str::random(10),
                'tipo' => $arrayTipo[rand(0, 3)],
                'descricao' => $descricoes[rand(0, 4)],
                'status' => $arrayStatus[rand(0, 1)],
                'idUser' => $arrayIds[rand(0, 1)],
                'created_at' => Carbon::now()->subMonths(rand(0, 10)),
                'idSetor' => rand(1, 19)
            ],
            [
                'codigo' => Str::random(10),
                'tipo' => $arrayTipo[rand(0, 3)],
                'descricao' => $descricoes[rand(0, 4)],
                'status' => $arrayStatus[rand(0, 1)],
                'idUser' => $arrayIds[rand(0, 1)],
                'created_at' => Carbon::now()->subMonths(rand(0, 10)),
                'idSetor' => rand(1, 19)
            ],
            [
                'codigo' => Str::random(10),
                'tipo' => $arrayTipo[rand(0, 3)],
                'descricao' => $descricoes[rand(0, 4)],
                'status' => $arrayStatus[rand(0, 1)],
                'idUser' => $arrayIds[rand(0, 1)],
                'created_at' => Carbon::now()->subMonths(rand(0, 10)),
                'idSetor' => rand(1, 19)
            ],
            [
                'codigo' => Str::random(10),
                'tipo' => $arrayTipo[rand(0, 3)],
                'descricao' => $descricoes[rand(0, 4)],
                'status' => $arrayStatus[rand(0, 1)],
                'idUser' => $arrayIds[rand(0, 1)],
                'created_at' => Carbon::now()->subMonths(rand(0, 10)),
                'idSetor' => rand(1, 19)
            ],
            [
                'codigo' => Str::random(10),
                'tipo' => $arrayTipo[rand(0, 3)],
                'descricao' => $descricoes[rand(0, 4)],
                'status' => $arrayStatus[rand(0, 1)],
                'idUser' => $arrayIds[rand(0, 1)],
                'created_at' => Carbon::now()->subMonths(rand(0, 10)),
                'idSetor' => rand(1, 19)
            ],
        ]);
    }
}
