add dummy data for organization
This commit is contained in:
parent
1cab4d6578
commit
a1f6b1df61
@ -9,9 +9,9 @@ class CreateCRMOrgTable extends Migration {
|
||||
|
||||
$this->forge->addField([
|
||||
'AccountID' => ['type' => 'INT', 'unsigned' => true, 'auto_increment' => true],
|
||||
'ParentAccount' => ['type' => 'INT', 'null' => true],
|
||||
'Parent' => ['type' => 'INT', 'null' => true],
|
||||
'AccountName' => ['type' => 'VARCHAR', 'constraint' => 10, 'null' => false],
|
||||
'Inital' => ['type' => 'VARCHAR', 'constraint' => 100, 'null' => false],
|
||||
'Initial' => ['type' => 'VARCHAR', 'constraint' => 100, 'null' => false],
|
||||
'Street_1' => ['type' => 'VARCHAR', 'constraint' => 150, 'null' => true],
|
||||
'Street_2' => ['type' => 'VARCHAR', 'constraint' => 150, 'null' => true],
|
||||
'Street_3' => ['type' => 'VARCHAR', 'constraint' => 150, 'null' => true],
|
||||
|
||||
@ -36,7 +36,6 @@ class Organization extends Migration {
|
||||
'Type' => ['type' => 'tinyint', 'null'=> true],
|
||||
'LinkTo' => ['type' => 'int', 'null'=> true],
|
||||
'Enable' => ['type' => 'bit', 'null'=> true],
|
||||
'EquipmentID' => ['type' => 'varchar', 'constraint'=>'10', 'null'=> true],
|
||||
'CreateDate' => ['type'=>'DATETIME', 'null' => true],
|
||||
'EndDate' => ['type'=>'DATETIME', 'null' => true]
|
||||
]);
|
||||
|
||||
@ -10,4 +10,4 @@ class DBSeeder extends Seeder {
|
||||
$this->call('DummySeeder');
|
||||
$this->call('CounterSeeder');
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -94,5 +94,32 @@ class DummySeeder extends Seeder {
|
||||
['ConCode' => '900','ConName' => 'Packing Pengiriman', 'ConDesc' =>'Specimen Transport Packaging', 'Additive' => "71", 'ConClass' => '81', 'CreateDate'=> "$now"],
|
||||
];
|
||||
$this->db->table('containerdef')->insertBatch($data);
|
||||
|
||||
// Organization
|
||||
$data = [
|
||||
[ 'AccountID' => 1, 'Parent' => null, 'AccountName' => 'Dummy Account', 'Initial'=>'QAC', 'Street_1'=>'Dummy Address', 'City'=>'Siti', 'Province'=>'Prop',
|
||||
'Zip'=>'505', 'Country'=>'Arab', 'AreaCode'=>'', 'EmailAddress1'=>'dummy@summit.co.id', 'Phone'=>'092029', 'Fax'=>'092029', 'CreateDate' => "$now" ]
|
||||
];
|
||||
$this->db->table('account')->insertBatch($data);
|
||||
|
||||
$data = [
|
||||
[ 'SiteID' => 1, 'SiteCode' => 'QSIT', 'SiteName' => 'Dummy Site', 'AccountID'=>1, 'SiteTypeID'=>null, 'Parent'=>null, 'SiteClassID'=>null, 'ME'=>null, 'CreateDate' => "$now" ]
|
||||
];
|
||||
$this->db->table('site')->insertBatch($data);
|
||||
|
||||
$data = [
|
||||
[ 'DisciplineID' => 1, 'DisciplineCode' => 'QDIS', 'DisciplineName' => 'Dummy Discipline', 'CreateDate' => "$now" ],
|
||||
];
|
||||
$this->db->table('discipline')->insertBatch($data);
|
||||
|
||||
$data = [
|
||||
[ 'DepartmentID' => 1, 'DisciplineID' => 1, 'SiteID' => 1, 'DepartmentCode'=> 'QDEP', 'DepartmentName'=>'Dummy Department', 'CreateDate' => "$now" ],
|
||||
];
|
||||
$this->db->table('department')->insertBatch($data);
|
||||
|
||||
$data = [
|
||||
[ 'WorkstationID' => 1, 'DepartmentID' => 1, 'WorkstationCode' => 'QWST', 'WorkstationName'=>'Dummy Workstation', 'Type'=>null, 'LinkTo'=> null, 'Enable'=>1,'CreateDate' => "$now" ],
|
||||
];
|
||||
$this->db->table('workstation')->insertBatch($data);
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user