CSY2028-assignment-2/jobs/Entity/Job.php

22 lines
462 B
PHP
Raw Normal View History

2023-01-23 14:37:07 +00:00
<?php
namespace jobs\Entity;
class Job {
public $id;
2023-01-23 16:08:38 +00:00
public $title;
2023-01-23 14:37:07 +00:00
public $description;
public $salary;
public $closingDate;
public $location;
public $categoryId;
2023-01-25 15:36:45 +00:00
public $clientId;
2023-01-23 14:37:07 +00:00
private $catsTable;
public function __construct(\CSY2028\DatabaseTable $catsTable) {
$this->catsTable = $catsTable;
}
public function getCat() {
2023-01-25 15:52:15 +00:00
return $this->catsTable->find('id', $this->categoryId)[0];
2023-01-23 14:37:07 +00:00
}
2023-01-25 17:14:23 +00:00
}
?>