Link tickets to job order #21
This commit is contained in:
parent
4aee9f8cde
commit
7b39419710
2 changed files with 29 additions and 0 deletions
|
|
@ -173,6 +173,12 @@ class JobOrder
|
||||||
*/
|
*/
|
||||||
protected $cancel_reason;
|
protected $cancel_reason;
|
||||||
|
|
||||||
|
// tickets associated with job order
|
||||||
|
/**
|
||||||
|
* @ORM\OneToMany(targetEntity="Ticket", mappedBy="job_order")
|
||||||
|
*/
|
||||||
|
protected $tickets;
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->date_create = new DateTime();
|
$this->date_create = new DateTime();
|
||||||
|
|
@ -435,4 +441,9 @@ class JobOrder
|
||||||
{
|
{
|
||||||
return $this->cancel_reason;
|
return $this->cancel_reason;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getTickets()
|
||||||
|
{
|
||||||
|
return $this->tickets;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -103,6 +103,13 @@ class Ticket
|
||||||
*/
|
*/
|
||||||
protected $customer;
|
protected $customer;
|
||||||
|
|
||||||
|
// job order associated with the ticket (optional)
|
||||||
|
/**
|
||||||
|
* @ORM\ManyToOne(targetEntity="JobOrder", inversedBy="tickets")
|
||||||
|
* @ORM\JoinColumn(name="job_order_id", referencedColumnName="id", nullable=true)
|
||||||
|
*/
|
||||||
|
protected $job_order;
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->date_create = new DateTime();
|
$this->date_create = new DateTime();
|
||||||
|
|
@ -260,4 +267,15 @@ class Ticket
|
||||||
{
|
{
|
||||||
return $this->customer;
|
return $this->customer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function setJobOrder(JobOrder $job_order)
|
||||||
|
{
|
||||||
|
$this->job_order = $job_order;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getJobOrder()
|
||||||
|
{
|
||||||
|
return $this->job_order;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue