|
|
|
@ -15,24 +15,106 @@ class PetiSeeder extends Seeder
|
|
|
|
|
public function run() |
|
|
|
|
{ |
|
|
|
|
// Generate 5 dummy data |
|
|
|
|
for ($i = 0; $i < 5; $i++) { |
|
|
|
|
DB::table('petis')->insert([ |
|
|
|
|
// for ($i = 0; $i < 5; $i++) { |
|
|
|
|
// DB::table('petis')->insert([ |
|
|
|
|
// 'tipe_peti_id' => $this->getRandomId('type_petis'), |
|
|
|
|
// 'warna' => 'Warna', |
|
|
|
|
// 'fix_lot' => 'Dummy Fix Lot ' . ($i + 1), |
|
|
|
|
// 'packing_no' => rand(1, 100), |
|
|
|
|
// 'customer_id' => $this->getRandomId('customers'), |
|
|
|
|
// 'jumlah' => rand(1, 10), |
|
|
|
|
// 'date_pembuatan' => now(), |
|
|
|
|
// 'warehouse_id' => $this->getRandomId('m_warehouses'), |
|
|
|
|
// 'kondisipeti_id' => $this->getRandomId('kondisi_petis'), |
|
|
|
|
// 'status' => 'AKTIF', |
|
|
|
|
// 'created_at' => now(), |
|
|
|
|
// 'updated_at' => now(), |
|
|
|
|
// 'created_by' => 'Seeder', |
|
|
|
|
// 'updated_by' => 'Seeder', |
|
|
|
|
// ]); |
|
|
|
|
// } |
|
|
|
|
DB::table('petis')->insert([ |
|
|
|
|
[ |
|
|
|
|
'tipe_peti_id' => $this->getRandomId('type_petis'), |
|
|
|
|
'warna' => 'Dummy Warna ' . ($i + 1), |
|
|
|
|
'fix_lot' => 'Dummy Fix Lot ' . ($i + 1), |
|
|
|
|
'packing_no' => rand(1, 100), |
|
|
|
|
'warna' => 'Warna', |
|
|
|
|
'fix_lot' => 'Dummy Fix Lot 1', |
|
|
|
|
'packing_no' => 1, |
|
|
|
|
'customer_id' => $this->getRandomId('customers'), |
|
|
|
|
'jumlah' => rand(1, 10), |
|
|
|
|
'jumlah' => 1, |
|
|
|
|
'date_pembuatan' => now(), |
|
|
|
|
'warehouse_id' => $this->getRandomId('m_warehouses'), |
|
|
|
|
'warehouse_id' => 1, |
|
|
|
|
'kondisipeti_id' => $this->getRandomId('kondisi_petis'), |
|
|
|
|
'status' => 'AKTIF', |
|
|
|
|
'created_at' => now(), |
|
|
|
|
'updated_at' => now(), |
|
|
|
|
'created_by' => 'Seeder', |
|
|
|
|
'updated_by' => 'Seeder', |
|
|
|
|
]); |
|
|
|
|
} |
|
|
|
|
], |
|
|
|
|
[ |
|
|
|
|
'tipe_peti_id' => $this->getRandomId('type_petis'), |
|
|
|
|
'warna' => 'Warna', |
|
|
|
|
'fix_lot' => 'Dummy Fix Lot 2', |
|
|
|
|
'packing_no' => 2, |
|
|
|
|
'customer_id' => $this->getRandomId('customers'), |
|
|
|
|
'jumlah' => 2, |
|
|
|
|
'date_pembuatan' => now(), |
|
|
|
|
'warehouse_id' => 2, |
|
|
|
|
'kondisipeti_id' => $this->getRandomId('kondisi_petis'), |
|
|
|
|
'status' => 'AKTIF', |
|
|
|
|
'created_at' => now(), |
|
|
|
|
'updated_at' => now(), |
|
|
|
|
'created_by' => 'Seeder', |
|
|
|
|
'updated_by' => 'Seeder', |
|
|
|
|
], |
|
|
|
|
[ |
|
|
|
|
'tipe_peti_id' => $this->getRandomId('type_petis'), |
|
|
|
|
'warna' => 'Warna', |
|
|
|
|
'fix_lot' => 'Dummy Fix Lot 3', |
|
|
|
|
'packing_no' => 3, |
|
|
|
|
'customer_id' => $this->getRandomId('customers'), |
|
|
|
|
'jumlah' => 3, |
|
|
|
|
'date_pembuatan' => now(), |
|
|
|
|
'warehouse_id' => 3, |
|
|
|
|
'kondisipeti_id' => $this->getRandomId('kondisi_petis'), |
|
|
|
|
'status' => 'AKTIF', |
|
|
|
|
'created_at' => now(), |
|
|
|
|
'updated_at' => now(), |
|
|
|
|
'created_by' => 'Seeder', |
|
|
|
|
'updated_by' => 'Seeder', |
|
|
|
|
], |
|
|
|
|
[ |
|
|
|
|
'tipe_peti_id' => $this->getRandomId('type_petis'), |
|
|
|
|
'warna' => 'Warna', |
|
|
|
|
'fix_lot' => 'Dummy Fix Lot 4', |
|
|
|
|
'packing_no' => 4, |
|
|
|
|
'customer_id' => $this->getRandomId('customers'), |
|
|
|
|
'jumlah' => 4, |
|
|
|
|
'date_pembuatan' => now(), |
|
|
|
|
'warehouse_id' => 4, |
|
|
|
|
'kondisipeti_id' => $this->getRandomId('kondisi_petis'), |
|
|
|
|
'status' => 'AKTIF', |
|
|
|
|
'created_at' => now(), |
|
|
|
|
'updated_at' => now(), |
|
|
|
|
'created_by' => 'Seeder', |
|
|
|
|
'updated_by' => 'Seeder', |
|
|
|
|
], |
|
|
|
|
[ |
|
|
|
|
'tipe_peti_id' => $this->getRandomId('type_petis'), |
|
|
|
|
'warna' => 'Warna', |
|
|
|
|
'fix_lot' => 'Dummy Fix Lot 5', |
|
|
|
|
'packing_no' => 5, |
|
|
|
|
'customer_id' => $this->getRandomId('customers'), |
|
|
|
|
'jumlah' => 5, |
|
|
|
|
'date_pembuatan' => now(), |
|
|
|
|
'warehouse_id' => 1, |
|
|
|
|
'kondisipeti_id' => $this->getRandomId('kondisi_petis'), |
|
|
|
|
'status' => 'AKTIF', |
|
|
|
|
'created_at' => now(), |
|
|
|
|
'updated_at' => now(), |
|
|
|
|
'created_by' => 'Seeder', |
|
|
|
|
'updated_by' => 'Seeder', |
|
|
|
|
], |
|
|
|
|
]); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|