Added entities
This commit is contained in:
parent
412ccfd4fd
commit
d8fa24e186
|
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
namespace jobs\Entity;
|
||||
class Applicant {
|
||||
public $id;
|
||||
public $name;
|
||||
public $email;
|
||||
public $details;
|
||||
public $cv;
|
||||
public $jobId;
|
||||
private $jobsTable;
|
||||
|
||||
public function __construct(\CSY2028\DatabaseTable $jobsTable) {
|
||||
$this->jobsTable = $jobsTable;
|
||||
}
|
||||
|
||||
public function getJob() {
|
||||
return $this->jobsTable->find('id', $this->jobId)[0];
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<?php
|
||||
namespace jobs\Entity;
|
||||
class Category {
|
||||
public $id;
|
||||
public $name;
|
||||
}
|
||||
?>
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
<?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);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue