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

19 lines
415 B
PHP
Raw Normal View History

2023-01-23 14:37:07 +00:00
<?php
namespace jobs\Entity;
class Job {
public $id;
public $description;
public $salary;
public $closingDate;
public $location;
public $categoryId;
private $catsTable;
public function __construct(\CSY2028\DatabaseTable $catsTable) {
$this->catsTable = $catsTable;
}
public function getCat() {
return $this->catsTable->find('id', $this->categoryId);
}
}