src/Entity/SupplierAdjudication.php line 18

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\SupplierAdjudicationRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Gedmo\Timestampable\Traits\TimestampableEntity;
  6. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  7. use Tionvel\WorkflowBundle\Entity\WorkflowProcess;
  8. /**
  9. * @UniqueEntity(fields={"supplier","process"})
  10. */
  11. #[ORM\Entity(repositoryClass: SupplierAdjudicationRepository::class)]
  12. #[ORM\Table(name: '`supplier_adjudication`')]
  13. #[ORM\UniqueConstraint(name: "idx_supplier_process", columns: ["supplier_id","process_id"])]
  14. class SupplierAdjudication
  15. {
  16. use TimestampableEntity;
  17. #[ORM\Id]
  18. #[ORM\GeneratedValue(strategy:"AUTO")]
  19. #[ORM\Column(type: "integer")]
  20. protected ?int $id = null;
  21. #[ORM\ManyToOne(targetEntity:"App\Entity\Supplier", inversedBy: "supplierAdjudication")]
  22. protected $supplier;
  23. #[ORM\ManyToOne(targetEntity:"Tionvel\WorkflowBundle\Entity\WorkflowProcess")]
  24. protected $process;
  25. #[ORM\Column(type: "string")]
  26. protected $uuid;
  27. #[ORM\Column(type: "boolean")]
  28. protected $isWinner;
  29. #[ORM\Column(type: "integer")]
  30. protected $winnerAmount;
  31. /**
  32. * @return int
  33. */
  34. public function getId(): int
  35. {
  36. return $this->id;
  37. }
  38. /**
  39. * @param int $id
  40. */
  41. public function setId(int $id): void
  42. {
  43. $this->id = $id;
  44. }
  45. /**
  46. * @return Supplier
  47. */
  48. public function getSupplier(): Supplier
  49. {
  50. return $this->supplier;
  51. }
  52. /**
  53. * @param Supplier $supplier
  54. */
  55. public function setSupplier(Supplier $supplier): void
  56. {
  57. $this->supplier = $supplier;
  58. }
  59. /**
  60. * @return WorkflowProcess
  61. */
  62. public function getProcess(): WorkflowProcess
  63. {
  64. return $this->process;
  65. }
  66. /**
  67. * @param WorkflowProcess $process
  68. */
  69. public function setProcess(WorkflowProcess $process): void
  70. {
  71. $this->process = $process;
  72. }
  73. /**
  74. * @return string
  75. */
  76. public function getUuid(): string
  77. {
  78. return $this->uuid;
  79. }
  80. /**
  81. * @param string $uuid
  82. */
  83. public function setUuid(string $uuid): void
  84. {
  85. $this->uuid = $uuid;
  86. }
  87. /**
  88. * @return bool
  89. */
  90. public function isWinner(): bool
  91. {
  92. return $this->isWinner;
  93. }
  94. /**
  95. * @param bool $isWinner
  96. */
  97. public function setIsWinner(bool $isWinner): void
  98. {
  99. $this->isWinner = $isWinner;
  100. }
  101. /**
  102. * @return int
  103. */
  104. public function getWinnerAmount(): int
  105. {
  106. return $this->winnerAmount;
  107. }
  108. /**
  109. * @param int $winnerAmount
  110. */
  111. public function setWinnerAmount(int $winnerAmount): void
  112. {
  113. $this->winnerAmount = $winnerAmount;
  114. }
  115. }