<?php

/** @var \Illuminate\Database\Eloquent\Factory $factory */

use App\BoxOrder;
use App\Model;
use App\User;
use Faker\Generator as Faker;

$factory->define(BoxOrder::class, function (Faker $faker) {
    return [
        "user_id" => User::all()->random()->first()->id,
        'box_id' => null,
        "discount_id" => null,
        'subtotal' => $faker->randomFloat($nbMaxDecimals = NULL, $min = 0, $max = 500.0),
        'vat' => 21,
        'total' => $faker->randomFloat($nbMaxDecimals = NULL, $min = 0, $max = 500.0),
        'created_at' => $faker->dateTimeBetween('-6 months','now')
    ];
});
