<?php

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

use App\Invoice;
use App\LoopGroupUser;
use Faker\Generator as Faker;

$factory->define(Invoice::class, function (Faker $faker, $attributes) {
    return [
        'code' => rand(10,99).time().rand(10,99),
        'loop_group_user_id'=> factory(LoopGroupUser::class)->create()->id,
        'meta' => [
            "type" => $faker->randomElement(['subscribe', 'increase', 'decrease']),
            "total" => $faker->randomFloat(2),
        ]
    ];
});
