Add ref_jo association to job order #24

This commit is contained in:
Ramon Gutierrez 2018-02-26 22:41:28 +08:00
parent 730f18c813
commit 172e09c2ef

View file

@ -179,6 +179,13 @@ class JobOrder
*/ */
protected $tickets; protected $tickets;
// reference job order
/**
* @ORM\OneToOne(targetEntity="JobOrder")
* @ORM\JoinColumn(name="ref_jo_id", referencedColumnName="id")
*/
protected $ref_jo;
public function __construct() public function __construct()
{ {
$this->date_create = new DateTime(); $this->date_create = new DateTime();
@ -446,4 +453,15 @@ class JobOrder
{ {
return $this->tickets; return $this->tickets;
} }
public function setReferenceJO(JobOrder $ref_jo)
{
$this->ref_jo = $ref_jo;
return $this;
}
public function getReferenceJO()
{
return $this->ref_jo;
}
} }