Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

UnitModel.php 2.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <?php
  2. namespace Lc\CaracoleBundle\Model\Common;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Lc\SovBundle\Doctrine\Pattern\AbstractLightEntity;
  5. /**
  6. * @ORM\MappedSuperclass
  7. */
  8. abstract class UnitModel extends AbstractLightEntity
  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="Lc\CaracoleBundle\Model\Common\UnitInterface")
  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. }