id = $data['id']; } if(isset($data['school_no'])){ $this->school_no = $data['school_no']; } if(isset($data['owener_id'])) { $this->owener_id = $data['owener_id']; } if(isset($data['name'])) { $this->owener_name = $data['name']; } if(isset($data['email'])){ $this->owener_email = $data['email']; } if(isset($data['visible'])) { $this->visible = $data['visible']; } if(isset($data['verify'])) { $this->verify = $data['verify']; } if(isset($data['is_trash'])) { $this->is_trash = $data['is_trash']; } if(isset($data['date_mod'])) { $this->date_mod = $data['date_mod']; } if(isset($data['website'])) { $this->job_description = $data['job_description']; $this->website = $data['website']; } if(isset($data['experience'])){ $this->category = $data['category']; $this->experience = $data['experience']; $this->salary_text = $data['salary_text']; $this->salary_mon_min = $data['salary_mon_min']; $this->salary_mon_max = $data['salary_mon_max']; // $this->salary_year_max = $data['salary_year_max']; } if(isset($data['job_type_id'])){ $this->job_type_id = $data['job_type_id']; $this->experience_id = $data['experience_id']; $this->category_id = $data['category_id']; } if(isset($data['job_title'])){ $this->job_title = $data['job_title']; $this->company = $data['company']; $this->place = $data['place']; $this->job_type = isset($data['job_type']) ? $data['job_type'] : ''; } if(isset($data['date_expired'])){ $this->date_expired = $data['date_expired']; } if(isset($data['date_sysautoemailnotify4expired'])){ $this->date_sysautoemailnotify4expired = $data['date_sysautoemailnotify4expired']; } if(isset($data['date_post'])){ $this->date_post = $data['date_post']; } if(isset($data['logo_path'])){ $this->logo_path = $data['logo_path']; } if(isset($data['logo_url'])){ $this->logo_url = $data['logo_url']; } if(isset($data['company_depart'])){ $this->company_depart = $data['company_depart']; } if(isset($data['more_notify_emails'])){ $this->more_notify_emails = $data['more_notify_emails']; } if(isset($data['browse_count'])){ $this->browse_count = $data['browse_count']; } if(isset($data['submit_count'])){ $this->submit_count = $data['submit_count']; } if(isset($data['jobnum_in_company'])){ $this->jobnum_in_company = $data['jobnum_in_company']; } } public function getJobnumInCompany(){ return $this->jobnum_in_company; } public function getId() { return $this->id; } public function getJobTitle() { return $this->job_title; } public function getCompany() { return $this->company; } public function getPlace() { return $this->place; } public function getJobType() { return $this->job_type; } public function getExperience() { return $this->experience; } public function getCategory() { return $this->category; } public function getJobDescription() { return $this->job_description; } public function getWebsite() { return $this->website; } public function get_salary_text() { return $this->salary_text; } public function get_salary_mon_min() { return $this->salary_mon_min; } public function get_salary_mon_max() { return $this->salary_mon_max; } public function get_owener_id() { return $this->owener_id; } public function get_owener_name() { return $this->owener_name; } public function get_owener_email() { return $this->owener_email; } public function get_owener_school_no() { return $this->school_no; } public function getJobTypeId() { return $this->job_type_id; } public function getExperienceId() { return $this->experience_id; } public function getCategoryId() { return $this->category_id; } public function getVisible() { return $this->visible; } public function getVerify() { return $this->verify; } public function getIsTrash() { return $this->is_trash; } public function getBrowseCount() { return $this->browse_count; } public function getSubmitCount() { return $this->submit_count; } public function applyCount(){ // TODO: delete this function AND move to JobsMapper $sql = "SELECT count(*) FROM application WHERE job_id = ".$this->id; $stmt = $this->db->prepare($sql); $result = $stmt->execute(); return $result; } public function getDateMod(){ return $this->date_mod; } public function getDatePost(){ return $this->date_post; } public function getDateExpired(){ // $date=date_create($this->date_expired); return $this->date_expired; // return date_format($date,"Y/m/d"); } public function getDateSysAutoEmailNotify4Expired(){ return $this->date_sysautoemailnotify4expired; } public function getLogoPath($use_at_web=false){ $ret = $this->logo_path; if($use_at_web){ $ret = WEB_URL.'job_logo_crop/' . $ret; } return$ret; } public function getLogoUrl(){ return $this->logo_url; } public function getCompanyDepart(){ return $this->company_depart; } public function getMoreNotifyEmails(){ return $this->more_notify_emails; } }