migrate to gtea from bistbucket
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\HRM\Database\Factories;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Modules\HRM\Models\Employee;
|
||||
|
||||
class EmployeeFactory extends Factory
|
||||
{
|
||||
protected $model = Employee::class;
|
||||
|
||||
public function definition(): array
|
||||
{
|
||||
$roles = ['chef', 'waiter', 'manager', 'staff', 'admin'];
|
||||
|
||||
return [
|
||||
'restaurant_id' => rand(1, 5),
|
||||
'first_name' => $this->faker->firstName(),
|
||||
'last_name' => $this->faker->lastName(),
|
||||
'email' => $this->faker->unique()->safeEmail(),
|
||||
'phone' => $this->faker->unique()->phoneNumber(),
|
||||
'avatar' => null,
|
||||
'joining_date' => $this->faker->date(),
|
||||
'role' => $roles[array_rand($roles)],
|
||||
'status' => 1,
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user