- Consolidate ValueSet routes from multiple nested groups to flat structure - Delete deprecated ValueSet\ namespaced controllers (ValueSetController, ValueSetDefController) - Remove ValueSetSeeder and ValueSetCountrySeeder from DBSeeder - Simplify seeders (LocationSeeder, OrganizationSeeder, PatientSeeder, TestSeeder) to use literal string values instead of ValueSet lookups - Add new ValueSetController and ValueSetDefController in root namespace - Update test files for new controller structure The key changes are: 1. Routes: Consolidated from nested ValueSet\ namespace routes to flat ValueSetController routes with /items sub-endpoints 2. Controllers: Deleted old app/Controllers/ValueSet/ directory, created new root-level controllers 3. Seeders: Removed ValueSet dependencies, using literal values like 'ROOM', '1', 'TEST' instead of [12]['ROOM'] etc. 4. Tests: Updated tests to match new controller structure
26 lines
1.0 KiB
PHP
26 lines
1.0 KiB
PHP
<?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);
|
|
}
|
|
}
|