src/AdminBundle/Entity/ClientInvoices.php line 14

Open in your IDE?
  1. <?php
  2. namespace AdminBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5. * ClientInvoices
  6. *
  7. */
  8. #[ORM\Table(name: 'client_invoices')]
  9. #[ORM\Entity(repositoryClass: \AdminBundle\Repository\ClientInvoicesRepository::class)]
  10. class ClientInvoices extends BaseEntity
  11. {
  12. const PAYMENT_PENDING = 0;
  13. const PAYMENT_PAID = 1;
  14. public static $invoiceApproval = array(
  15. self::PAYMENT_PENDING => 'Payment Pending',
  16. self::PAYMENT_PAID => 'Paid',
  17. );
  18. /**
  19. * @var integer
  20. */
  21. #[ORM\Column(name: 'id', type: 'integer', nullable: false)]
  22. #[ORM\Id]
  23. #[ORM\GeneratedValue(strategy: 'IDENTITY')]
  24. protected $id;
  25. /**
  26. * @var float
  27. */
  28. #[ORM\Column(name: 'invoice_amount', type: 'float', scale: 2)]
  29. protected $invoiceAmount;
  30. /**
  31. * @var \DateTime
  32. */
  33. #[ORM\Column(name: 'invoice_date', type: 'datetime')]
  34. protected $invoiceDate;
  35. /**
  36. * @var string
  37. */
  38. #[ORM\Column(name: 'pdf_file', type: 'string', length: 255, nullable: true)]
  39. protected $pdfFile;
  40. /**
  41. * @var \DateTime
  42. */
  43. #[ORM\Column(name: 'pdf_gen_date', type: 'datetime', nullable: true)]
  44. protected $pdfGenDate;
  45. /**
  46. * @var \DateTime
  47. */
  48. #[ORM\Column(name: 'sent_date', type: 'datetime', nullable: true)]
  49. protected $sentDate;
  50. /**
  51. * @var boolean
  52. */
  53. #[ORM\Column(name: 'status', type: 'boolean')]
  54. protected $status = self::PAYMENT_PENDING;
  55. /**
  56. * @var Booking
  57. */
  58. #[ORM\JoinColumn(name: 'booking', referencedColumnName: 'id')]
  59. #[ORM\OneToOne(targetEntity: \AdminBundle\Entity\Booking::class, inversedBy: 'clientInvoice')]
  60. protected $booking;
  61. /**
  62. * @var Account
  63. */
  64. #[ORM\JoinColumn(name: 'client', referencedColumnName: 'id', nullable: true)]
  65. #[ORM\ManyToOne(targetEntity: \AdminBundle\Entity\Account::class, inversedBy: 'clientInvoices')]
  66. protected $client;
  67. /**
  68. * @var Company
  69. */
  70. #[ORM\JoinColumn(name: 'company', referencedColumnName: 'id', nullable: true)]
  71. #[ORM\ManyToOne(targetEntity: \AdminBundle\Entity\Company::class, inversedBy: 'clientInvoices')]
  72. protected $company;
  73. /**
  74. * @return int
  75. */
  76. public function getId()
  77. {
  78. return $this->id;
  79. }
  80. /**
  81. * @return string
  82. */
  83. public function getInvoiceAmount()
  84. {
  85. return $this->invoiceAmount;
  86. }
  87. /**
  88. * @param string $invoiceAmount
  89. */
  90. public function setInvoiceAmount($invoiceAmount)
  91. {
  92. $this->invoiceAmount = $invoiceAmount;
  93. }
  94. /**
  95. * @return \DateTime
  96. */
  97. public function getInvoiceDate()
  98. {
  99. return $this->invoiceDate;
  100. }
  101. /**
  102. * @param \DateTime $invoiceDate
  103. */
  104. public function setInvoiceDate($invoiceDate)
  105. {
  106. $this->invoiceDate = $invoiceDate;
  107. }
  108. /**
  109. * @return string
  110. */
  111. public function getPdfFile()
  112. {
  113. return $this->pdfFile;
  114. }
  115. /**
  116. * @param string $pdfFile
  117. */
  118. public function setPdfFile($pdfFile)
  119. {
  120. $this->pdfFile = $pdfFile;
  121. }
  122. /**
  123. * @return \DateTime
  124. */
  125. public function getPdfGenDate()
  126. {
  127. return $this->pdfGenDate;
  128. }
  129. /**
  130. * @param \DateTime $pdfGenDate
  131. */
  132. public function setPdfGenDate($pdfGenDate)
  133. {
  134. $this->pdfGenDate = $pdfGenDate;
  135. }
  136. /**
  137. * @return \DateTime
  138. */
  139. public function getSentDate()
  140. {
  141. return $this->sentDate;
  142. }
  143. /**
  144. * @param \DateTime $sentDate
  145. */
  146. public function setSentDate($sentDate)
  147. {
  148. $this->sentDate = $sentDate;
  149. }
  150. /**
  151. * @return Booking
  152. */
  153. public function getBooking()
  154. {
  155. return $this->booking;
  156. }
  157. /**
  158. * @param Booking $booking
  159. */
  160. public function setBooking($booking)
  161. {
  162. $this->booking = $booking;
  163. }
  164. /**
  165. * @return Account
  166. */
  167. public function getClient()
  168. {
  169. return $this->client;
  170. }
  171. /**
  172. * @param Account $clientUser
  173. */
  174. public function setClient($clientUser)
  175. {
  176. $this->client = $clientUser;
  177. }
  178. /**
  179. * @return bool
  180. */
  181. public function isStatus()
  182. {
  183. return $this->status;
  184. }
  185. /**
  186. * @param bool $status
  187. */
  188. public function setStatus($status)
  189. {
  190. $this->status = $status;
  191. }
  192. /**
  193. * @return Company
  194. */
  195. public function getCompany()
  196. {
  197. return $this->company;
  198. }
  199. /**
  200. * @param Company $company
  201. */
  202. public function setCompany($company)
  203. {
  204. $this->company = $company;
  205. }
  206. }