clqms-be/app/Database/Seeds/LocationSeeder.php
OpenCode Bot 9946978487 chore: refresh CLQMS backend baseline
Re-synced controllers, configs, libraries, seeds, and docs with the latest API expectations and response helpers.
2026-04-08 16:07:19 +07:00

26 lines
1.0 KiB
PHP
Executable File

<?php
namespace App\Database\Seeds;
use CodeIgniter\Database\Seeder;
class LocationSeeder extends Seeder
{
public function run()
{
$now = date('Y-m-d H:i:s');
// location
$data = [
['LocationID' => 1, 'LocCode' => 'QLOC', 'LocFull' => 'Dummy Location', 'LocType' => 'ROOM', 'Description' => 'Location made for dummy testing', 'CreateDate' => "$now" ],
['LocationID' => 2, 'LocCode' => 'DEFLOC', 'LocFull' => 'Default Location', 'LocType' => 'ROOM', 'Description' => 'Default location', 'CreateDate' => "$now" ]
];
$this->db->table('location')->insertBatch($data);
$data = [
['LocationID' => 1, 'Street1' => 'Jalan Nginden', 'Street2' => 'Intan Raya', 'City' => 'Surabaya', 'Province' => 'East Java', 'PostCode' => '60222', 'CreateDate' => "$now"],
['LocationID' => 2, 'Street1' => 'Jalan ', 'Street2' => 'Jalan jalan', 'City' => 'Depok', 'Province' => 'DKI Jakarta', 'PostCode' => '10123', 'CreateDate' => "$now"]
];
$this->db->table('locationaddress')->insertBatch($data);
}
}