121 lines
2.5KB

  1. <?php
  2. namespace Lc\ShopBundle\Model;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Lc\ShopBundle\Model\AbstractEntity;
  5. /**
  6. * @ORM\MappedSuperclass
  7. */
  8. abstract class Unit extends AbstractEntity
  9. {
  10. /**
  11. * @ORM\Column(type="string", length=32)
  12. */
  13. protected $unit;
  14. /**
  15. * @ORM\Column(type="string", length=32)
  16. */
  17. protected $wording;
  18. /**
  19. * @ORM\Column(type="string", length=32)
  20. */
  21. protected $wordingUnit;
  22. /**
  23. * @ORM\Column(type="string", length=32)
  24. */
  25. protected $wordingShort;
  26. /**
  27. * @ORM\Column(type="integer")
  28. */
  29. protected $coefficient;
  30. /**
  31. * @ORM\ManyToOne(targetEntity="App\Entity\Unit")
  32. * @ORM\JoinColumn(nullable=true)
  33. */
  34. protected $unitReference;
  35. public function __toString()
  36. {
  37. return $this->getWording() ;
  38. }
  39. public function getUnit(): ?string
  40. {
  41. return $this->unit;
  42. }
  43. public function setUnit(string $unit): self
  44. {
  45. $this->unit = $unit;
  46. return $this;
  47. }
  48. public function getWording(): ?string
  49. {
  50. return $this->wording;
  51. }
  52. public function setWording(string $wording): self
  53. {
  54. $this->wording = $wording;
  55. return $this;
  56. }
  57. public function getWordingUnit(): ?string
  58. {
  59. return $this->wordingUnit;
  60. }
  61. public function setWordingUnit(string $wordingUnit): self
  62. {
  63. $this->wordingUnit = $wordingUnit;
  64. return $this;
  65. }
  66. public function getWordingShort(): ?string
  67. {
  68. return $this->wordingShort;
  69. }
  70. public function setWordingShort(string $wordingShort): self
  71. {
  72. $this->wordingShort = $wordingShort;
  73. return $this;
  74. }
  75. public function getCoefficient(): ?int
  76. {
  77. return $this->coefficient;
  78. }
  79. public function setCoefficient(int $coefficient): self
  80. {
  81. $this->coefficient = $coefficient;
  82. return $this;
  83. }
  84. public function getUnitReference(): ?self
  85. {
  86. return $this->unitReference;
  87. }
  88. public function setUnitReference(?self $unitReference): self
  89. {
  90. $this->unitReference = $unitReference;
  91. return $this;
  92. }
  93. }