Add invoice entity
This commit is contained in:
parent
e041623e9d
commit
0206b1e45a
2 changed files with 60 additions and 0 deletions
48
src/Entity/Invoice.php
Normal file
48
src/Entity/Invoice.php
Normal file
|
|
@ -0,0 +1,48 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App;
|
||||||
|
|
||||||
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
use DateTime;
|
||||||
|
|
||||||
|
class Invoice
|
||||||
|
{
|
||||||
|
// unique id
|
||||||
|
/**
|
||||||
|
* @ORM\Id
|
||||||
|
* @ORM\Column(type="integer")
|
||||||
|
* @ORM\GeneratedValue(strategy="AUTO")
|
||||||
|
*/
|
||||||
|
protected $id;
|
||||||
|
|
||||||
|
// date invoice was created
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="datetime")
|
||||||
|
*/
|
||||||
|
protected $date_create;
|
||||||
|
|
||||||
|
// date that the invoice was paid
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="datetime", nullable=true)
|
||||||
|
*/
|
||||||
|
protected $date_paid;
|
||||||
|
|
||||||
|
// date that the invoice was cancelled
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="datetime", nullable=true)
|
||||||
|
*/
|
||||||
|
protected $date_cancel;
|
||||||
|
|
||||||
|
// user that created the invoice
|
||||||
|
/**
|
||||||
|
* @ORM\ManyToOne(targetEntity="User", inversedBy="invoice")
|
||||||
|
* @ORM\JoinColumn(name="user_id", referencedColumnName="id")
|
||||||
|
*/
|
||||||
|
protected $created_by;
|
||||||
|
|
||||||
|
// invoice items
|
||||||
|
protected $invoice_items;
|
||||||
|
|
||||||
|
// status
|
||||||
|
protected $status;
|
||||||
|
}
|
||||||
|
|
@ -41,6 +41,12 @@ class JobOrder
|
||||||
*/
|
*/
|
||||||
protected $date_fulfill;
|
protected $date_fulfill;
|
||||||
|
|
||||||
|
// date that the job order was cancelled
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="datetime", nullable=true)
|
||||||
|
*/
|
||||||
|
protected $date_cancel;
|
||||||
|
|
||||||
// coordinates of the customer vehicle that needs service
|
// coordinates of the customer vehicle that needs service
|
||||||
/**
|
/**
|
||||||
* @ORM\Column(type="point")
|
* @ORM\Column(type="point")
|
||||||
|
|
@ -100,6 +106,12 @@ class JobOrder
|
||||||
*/
|
*/
|
||||||
protected $source;
|
protected $source;
|
||||||
|
|
||||||
|
// status of the job order
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="string", length=10)
|
||||||
|
*/
|
||||||
|
protected $status;
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->date_create = new DateTime();
|
$this->date_create = new DateTime();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue