69 lines
2.1 KiB
PHP
69 lines
2.1 KiB
PHP
<?php
|
|
|
|
namespace Modules\CetakLabel\Database\Seeders;
|
|
|
|
use App\Models\Job;
|
|
use App\Models\SpecialCode;
|
|
use App\Models\SubDirectorat;
|
|
use App\Models\SubJob;
|
|
use App\Models\SubSubJob;
|
|
use Faker\Generator;
|
|
use Illuminate\Database\Seeder;
|
|
use Modules\CetakLabel\Entities\Directorat;
|
|
|
|
class CetakLabelSeeder extends Seeder
|
|
{
|
|
/**
|
|
* Run the database seeds.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function run(Generator $faker)
|
|
{
|
|
$direktorat = Directorat::create([
|
|
'kode' => '01',
|
|
'name' => 'Direktorat Jenderal Perhubungan Darat',
|
|
]);
|
|
|
|
$subdirektorat = SubDirectorat::create([
|
|
'kode' => '01',
|
|
'name' => 'Subdirektorat Jenderal Perhubungan Darat',
|
|
'directorat_id' => $direktorat->id,
|
|
]);
|
|
|
|
$job = Job::create([
|
|
'kode' => '01',
|
|
'name' => 'Kepala Subdirektorat Jenderal Perhubungan Darat',
|
|
'sub_directorat_id' => $subdirektorat->id,
|
|
'directorat_id' => $direktorat->id,
|
|
]);
|
|
|
|
$subjob = SubJob::create([
|
|
'kode' => '01',
|
|
'name' => 'Kepala Subdirektorat Jenderal Perhubungan Darat',
|
|
'job_id' => $job->id,
|
|
'sub_directorat_id' => $subdirektorat->id,
|
|
'directorat_id' => $direktorat->id,
|
|
]);
|
|
|
|
$subsubjob = SubSubJob::create([
|
|
'kode' => '01',
|
|
'name' => 'Kepala Subdirektorat Jenderal Perhubungan Darat',
|
|
'sub_job_id' => $subjob->id,
|
|
'job_id' => $job->id,
|
|
'sub_directorat_id' => $subdirektorat->id,
|
|
'directorat_id' => $direktorat->id,
|
|
]);
|
|
|
|
$SpecialCode = SpecialCode::create([
|
|
'kode' => '00',
|
|
'name' => 'Archive'
|
|
]);
|
|
|
|
$SpecialCode = SpecialCode::create([
|
|
'kode' => '98',
|
|
'name' => 'Softcopy'
|
|
]);
|
|
}
|
|
}
|