first
This commit is contained in:
32
database/factories/PositionFactory.php
Normal file
32
database/factories/PositionFactory.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\Position;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends Factory<Position>
|
||||
*/
|
||||
class PositionFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
$code = strtoupper(fake()->unique()->lexify('???'));
|
||||
|
||||
return [
|
||||
'code' => $code,
|
||||
'name' => 'Jawatan '.$code,
|
||||
'scope' => fake()->randomElement(['pusat', 'saluran', 'external']),
|
||||
'is_public_applyable' => false,
|
||||
'is_assignable' => true,
|
||||
'allows_dual_role' => false,
|
||||
'sort_order' => fake()->numberBetween(1, 99),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user