src/Entity/ExpenseType.php line 19

Open in your IDE?
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: parcel
  5. * Date: 10/19/18
  6. * Time: 12:49 PM
  7. */
  8. namespace App\Entity;
  9. use Doctrine\ORM\Mapping as ORM;
  10. use JMS\Serializer\Annotation as Serializer;
  11. /**
  12. * @ORM\Entity
  13. * @ORM\Table(name="expense_type")
  14. */
  15. class ExpenseType {
  16. /**
  17. * @ORM\Id
  18. * @ORM\GeneratedValue(strategy="IDENTITY")
  19. * @ORM\Column(type="integer")
  20. */
  21. private $id;
  22. /**
  23. * @ORM\Column(type="string")
  24. */
  25. private $expenseName;
  26. /**
  27. * @ORM\Column(type="boolean")
  28. */
  29. private $isAutomatic;
  30. /**
  31. * @var \App\Entity\AutomaticExpense
  32. * @Serializer\Type("App\Entity\AutomaticExpense")
  33. * @ORM\ManyToOne(targetEntity="App\Entity\AutomaticExpense")
  34. * @ORM\JoinColumns({
  35. * @ORM\JoinColumn(name="automatic_expense_id", referencedColumnName="id", nullable=true)
  36. * })
  37. */
  38. private $autoExpense;
  39. /**
  40. * @ORM\Column(type="boolean")
  41. */
  42. private $isWayBill;
  43. /**
  44. * @ORM\Column(type="boolean")
  45. */
  46. private $isActive;
  47. /**
  48. * @ORM\Column(type="datetime")
  49. */
  50. private $createdAt;
  51. /**
  52. * @var \App\Entity\User
  53. * @Serializer\Type("App\Entity\User")
  54. * @ORM\ManyToOne(targetEntity="App\Entity\User")
  55. * @ORM\JoinColumns({
  56. * @ORM\JoinColumn(name="created_by", referencedColumnName="id")
  57. * })
  58. */
  59. private $createdBy;
  60. /**
  61. * @return mixed
  62. */
  63. public function getId()
  64. {
  65. return $this->id;
  66. }
  67. /**
  68. * @param mixed $id
  69. */
  70. public function setId($id)
  71. {
  72. $this->id = $id;
  73. }
  74. /**
  75. * @return mixed
  76. */
  77. public function getExpenseName()
  78. {
  79. return $this->expenseName;
  80. }
  81. /**
  82. * @param mixed $expenseName
  83. */
  84. public function setExpenseName($expenseName)
  85. {
  86. $this->expenseName = $expenseName;
  87. }
  88. /**
  89. * @return mixed
  90. */
  91. public function getisAutomatic()
  92. {
  93. return $this->isAutomatic;
  94. }
  95. /**
  96. * @param mixed $isAutomatic
  97. */
  98. public function setIsAutomatic($isAutomatic)
  99. {
  100. $this->isAutomatic = $isAutomatic;
  101. }
  102. /**
  103. * @return AutomaticExpense
  104. */
  105. public function getAutoExpense()
  106. {
  107. return $this->autoExpense;
  108. }
  109. /**
  110. * @param AutomaticExpense $autoExpense
  111. */
  112. public function setAutoExpense($autoExpense)
  113. {
  114. $this->autoExpense = $autoExpense;
  115. }
  116. /**
  117. * @return mixed
  118. */
  119. public function getisWayBill()
  120. {
  121. return $this->isWayBill;
  122. }
  123. /**
  124. * @param mixed $isWayBill
  125. */
  126. public function setIsWayBill($isWayBill)
  127. {
  128. $this->isWayBill = $isWayBill;
  129. }
  130. /**
  131. * @return mixed
  132. */
  133. public function getisActive()
  134. {
  135. return $this->isActive;
  136. }
  137. /**
  138. * @param mixed $isActive
  139. */
  140. public function setIsActive($isActive)
  141. {
  142. $this->isActive = $isActive;
  143. }
  144. /**
  145. * @return mixed
  146. */
  147. public function getCreatedAt()
  148. {
  149. return $this->createdAt;
  150. }
  151. /**
  152. * @param mixed $createdAt
  153. */
  154. public function setCreatedAt($createdAt)
  155. {
  156. $this->createdAt = $createdAt;
  157. }
  158. /**
  159. * @return User
  160. */
  161. public function getCreatedBy()
  162. {
  163. return $this->createdBy;
  164. }
  165. /**
  166. * @param User $createdBy
  167. */
  168. public function setCreatedBy($createdBy)
  169. {
  170. $this->createdBy = $createdBy;
  171. }
  172. public function __toString()
  173. {
  174. // TODO: Implement __toString() method.
  175. return $this->expenseName;
  176. }
  177. }