43 lines
1.2 KiB
PHP
43 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace Database\Seeders;
|
|
|
|
use App\Models\Department;
|
|
use App\Models\Position;
|
|
use Illuminate\Database\Seeder;
|
|
|
|
class MasterDataSeeder extends Seeder
|
|
{
|
|
public function run(): void
|
|
{
|
|
// === DEPARTMENTS ===
|
|
$depts = [
|
|
['name' => 'Information Technology', 'description' => 'Bagian IT & Development'],
|
|
['name' => 'Human Resources', 'description' => 'Bagian Kepegawaian'],
|
|
['name' => 'Finance', 'description' => 'Bagian Keuangan & Akuntansi'],
|
|
['name' => 'Marketing', 'description' => 'Bagian Pemasaran & Komunikasi'],
|
|
['name' => 'Operations', 'description' => 'Bagian Operasional & Logistik'],
|
|
];
|
|
|
|
foreach ($depts as $dept) {
|
|
Department::create($dept);
|
|
}
|
|
|
|
// === POSITIONS ===
|
|
$positions = [
|
|
'Manager',
|
|
'Senior Developer',
|
|
'Junior Developer',
|
|
'Staff Admin',
|
|
'HR Specialist',
|
|
'Finance Analyst',
|
|
'Marketing Staff',
|
|
'Operations Staff',
|
|
];
|
|
|
|
foreach ($positions as $pos) {
|
|
Position::create(['name' => $pos]);
|
|
}
|
|
|
|
}
|
|
} |