make person_id and company_id optional on job

master
Matt Huntington 8 years ago
parent 67389e1c5e
commit 06f7fa2e7f

@ -3,14 +3,16 @@ include_once __DIR__ . '/../database/db.php';
class Job { class Job {
public $id; public $id;
public $person_id;
public $job_type; public $job_type;
public $company_id;
public function __construct($id, $person_id, $job_type, $company_id) { public function __construct($id, $person_id, $job_type, $company_id) {
$this->id = $id; $this->id = $id;
$this->person_id = $person_id; if($person_id){
$this->person_id = $person_id;
}
$this->job_type = $job_type; $this->job_type = $job_type;
$this->company_id = $company_id; if($company_id){
$this->company_id = $company_id;
}
} }
} }

Loading…
Cancel
Save