diff --git a/application/controllers/api/v1/person/Person.php b/application/controllers/api/v1/person/Person.php index ea708f8e5..7fcec6231 100644 --- a/application/controllers/api/v1/person/Person.php +++ b/application/controllers/api/v1/person/Person.php @@ -60,7 +60,8 @@ class Person extends APIv1_Controller } else { - $this->response(); + $fields = $this->PersonModel->getFields(); + $this->response($fields, REST_Controller::HTTP_OK); } } diff --git a/application/models/person/Person_model.php b/application/models/person/Person_model.php index 1a9192a88..7a8f0978d 100644 --- a/application/models/person/Person_model.php +++ b/application/models/person/Person_model.php @@ -11,11 +11,51 @@ class Person_model extends DB_Model $this->dbTable = 'public.tbl_person'; $this->pk = 'person_id'; } + + public function getFields() + { + $fields = array( + //Tabellenspalten + "person_id" => NULL, + "sprache" => NULL, + "anrede" => NULL, + "titelpost" => NULL, + "titelpre" => NULL, + "nachname" => NULL, + "vorname" => NULL, + "vornamen" => NULL, + "gebdatum" => NULL, + "gebort" => NULL, + "gebzeit" => NULL, + "foto" => NULL, + "anmerkungen" => NULL, + "homepage" => NULL, + "svnr" => NULL, + "ersatzkennzeichen" => NULL, + "familienstand" => NULL, + "anzahlkinder" => NULL, + "aktiv"=>TRUE, + "insertamum" => NULL, + "insertvon" => NULL, + "updateamum" => NULL, + "updatevon" => NULL, + "geschlecht" => "u", + "staatsbuergerschaft" => NULL, + "geburtsnation" => NULL, + "ext_id" => NULL, + "kurzbeschreibung"> NULL, + "zugangscode" => NULL, + "foto_sperre" => FALSE, + "matr_nr"=> NULL + ); + + return $this->_success($fields); + } /** * */ - /*public function checkBewerbung($email, $studiensemester_kurzbz = NULL) + public function checkBewerbung($email, $studiensemester_kurzbz = NULL) { $this->db->distinct(); @@ -51,5 +91,5 @@ class Person_model extends DB_Model ; } return $this->db->get()->result_array(); - }*/ + } } \ No newline at end of file