<?php

use Faker\Generator as Faker;

$factory->define(App\Models\Shop\ShopTax::class, function (Faker $faker) {

    $factor = $faker->randomElement([\App\Models\Shop\ShopTax::TASA, \App\Models\Shop\ShopTax::CUOTA, \App\Models\Shop\ShopTax::EXENTO]);

    return [
        'created_uid' => \App\Models\Auth\User::all()->random()->id,
        'updated_uid' => \App\Models\Auth\User::all()->random()->id,
        'name' => $faker->sentence,
        'code' => $faker->unique()->numberBetween($min = 100, $max = 999),
        'rate' => 16.0,
        'factor' => $factor,
        'sort_order' => 0,
        'status' => $faker->randomElement([1,0]),
        'local_taxes' => 0,
        'type' => 'T',
    ];
});
