exchange/database/factories/ExportFactory.php

43 lines
1.3 KiB
PHP

<?php
namespace Database\Factories;
use App\Models\Group;
use App\Models\Export;
use App\Models\Category;
use Illuminate\Database\Eloquent\Factories\Factory;
class ExportFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = Export::class;
/**
* Define the model's default state.
*
* @return array
*/
public function definition()
{
return [
'group_id' => optional(Group::inRandomOrder()->first())->id,
'category_id' => optional(Category::inRandomOrder()->first())->id,
'title' => $this->faker->text(300),
'unit' => $this->faker->randomElement(['kg', 'tonna']),
'amount' => $this->faker->randomNumber(2),
'price' => $this->faker->randomNumber(4),
'payment' => $this->faker->randomElement(['öňünden tölemek']),
'send' => $this->faker->randomElement(['FOB', 'DAP', 'FCA', 'EXW']),
'currency' => $this->faker->randomElement(['tmt', 'usd']),
'point' => $this->faker->city(),
'country' => $this->faker->country(),
'seller' => $this->faker->numberBetween(100, 200),
'place' => $this->faker->country(),
];
}
}