You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
621 B
19 lines
621 B
<?php
|
|
|
|
/** @var Factory $factory */
|
|
|
|
use App\Cost;
|
|
use Carbon\Carbon;
|
|
use Faker\Generator as Faker;
|
|
|
|
$factory->define(Cost::class, function (Faker $faker) {
|
|
return [
|
|
'business_id' => random_int(1,5000),
|
|
'type' => $type = $faker->boolean() ? 'users' : 'files',
|
|
'month' => jdate(Carbon::now()->subDays(random_int(0,90)))->format("Y-m-01"),
|
|
'amount' => random_int(1,1000),
|
|
'fee' => $type === 'users' ? enum("business.fee.user") : enum("business.fee.file"),
|
|
'duration' => random_int(1,60),
|
|
'created_at' => Carbon::now()->subMinutes(random_int(1, 1000)),
|
|
];
|
|
});
|