mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-05-12 14:09:20 -05:00
8ee27e47b4
[ci skip] [skip ci]
43 lines
1.0 KiB
PHP
43 lines
1.0 KiB
PHP
<?php
|
|
|
|
/* @var $factory \Illuminate\Database\Eloquent\Factory */
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\Bot;
|
|
use App\Models\BotTransaction;
|
|
use App\Models\User;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
class BotTransactionFactory extends Factory
|
|
{
|
|
/**
|
|
* The name of the factory's corresponding model.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $model = BotTransaction::class;
|
|
|
|
/**
|
|
* Define the model's default state.
|
|
*
|
|
* @return array
|
|
*/
|
|
public function definition()
|
|
{
|
|
return [
|
|
'type' => $this->faker->word,
|
|
'cost' => $this->faker->randomFloat(),
|
|
'user_id' => function () {
|
|
return User::factory()->create()->id;
|
|
},
|
|
'bot_id' => function () {
|
|
return Bot::factory()->create()->id;
|
|
},
|
|
'to_user' => $this->faker->boolean,
|
|
'to_bot' => $this->faker->boolean,
|
|
'comment' => $this->faker->text,
|
|
];
|
|
}
|
|
}
|