Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

97 lines
2.1KB

  1. <?php
  2. namespace Lc\CaracoleBundle\Model\Distribution;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Lc\CaracoleBundle\Doctrine\Extension\PayoffTrait;
  5. use Lc\CaracoleBundle\Model\Order\OrderPaymentInterface;
  6. use Lc\CaracoleBundle\Model\Order\OrderRefundInterface;
  7. use Lc\CaracoleBundle\Doctrine\Extension\PayoffInterface;
  8. use Lc\CaracoleBundle\Model\Section\SectionInterface;
  9. use Lc\CaracoleBundle\Model\User\UserMerchantInterface;
  10. use Gedmo\Mapping\Annotation as Gedmo;
  11. use Lc\SovBundle\Doctrine\EntityInterface;
  12. use Lc\SovBundle\Doctrine\Extension\BlameableNullableTrait;
  13. use Lc\SovBundle\Doctrine\Pattern\AbstractLightEntity;
  14. /**
  15. * @ORM\MappedSuperclass()
  16. */
  17. abstract class DistributionModel implements DistributionInterface, EntityInterface
  18. {
  19. /**
  20. * @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Section\SectionInterface")
  21. * @ORM\JoinColumn(nullable=false)
  22. */
  23. protected $section;
  24. /**
  25. * @ORM\Column(type="integer")
  26. */
  27. protected $cycleNumber;
  28. /**
  29. * @ORM\Column(type="integer")
  30. */
  31. protected $year;
  32. /**
  33. * @ORM\Column(type="string", length=32)
  34. */
  35. protected $cycleType;
  36. public function __toString()
  37. {
  38. return $this->getCycleNumber().'/'.$this->getYear();
  39. }
  40. public function getSection(): ?SectionInterface
  41. {
  42. return $this->section;
  43. }
  44. public function setSection(?SectionInterface $section): self
  45. {
  46. $this->section = $section;
  47. return $this;
  48. }
  49. public function getCycleNumber(): ?int
  50. {
  51. return $this->cycleNumber;
  52. }
  53. public function setCycleNumber(int $cycleNumber): self
  54. {
  55. $this->cycleNumber = $cycleNumber;
  56. return $this;
  57. }
  58. public function getYear(): ?int
  59. {
  60. return $this->year;
  61. }
  62. public function setYear(int $year): self
  63. {
  64. $this->year = $year;
  65. return $this;
  66. }
  67. public function getCycleType(): ?string
  68. {
  69. return $this->cycleType;
  70. }
  71. public function setCycleType(string $cycleType): self
  72. {
  73. $this->cycleType = $cycleType;
  74. return $this;
  75. }
  76. }