24 lines
833 B
PHP
24 lines
833 B
PHP
<?php
|
||
function getKeyColumns($table) {
|
||
$keyColumnsMap = [
|
||
"line_lists" => ["line", "fluid_code"],
|
||
"supports" => ["id"],
|
||
"paint_matrices" => ["line", "fluid_code"],
|
||
"nde_matrices" => ["line", "fluid", "type_of_joint"],
|
||
"document_revisions" => ["drawing_no", "zone"],
|
||
"m_t_o_s" => ["line", "component_code_id"],
|
||
"test_packages" => ["test_package_number"],
|
||
"test_pack_base_statuses" => ["test_package_no"],
|
||
"punch_lists" => ["test_package", "punch_list_no"],
|
||
"weld_logs" => ["iso", "joint"]
|
||
];
|
||
|
||
// log_test_types() tabloları için özel kontrol
|
||
if (in_array($table, log_test_types())) {
|
||
return ["iso", "joint", "welding_date"];
|
||
}
|
||
|
||
// Tablo için tanımlı sütunları döndür
|
||
return $keyColumnsMap[$table] ?? [];
|
||
}
|
||
?>
|