vendor/croisiland/common-bundle/src/Entity/Price/ServiceChargeType.php line 25

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace Croisiland\CommonBundle\Entity\Price;
  4. use Crea\ParameterBundle\Entity\Parameter;
  5. use Crea\ToolsBundle\Entity\LifecycleUserIdentifierTrait;
  6. use Croisiland\CommonBundle\Entity\Company\Company;
  7. use Croisiland\CommonBundle\Repository\Price\ServiceChargeTypeRepository;
  8. use Doctrine\ORM\Mapping as ORM;
  9. use Doctrine\ORM\Mapping\UniqueConstraint;
  10. /**
  11. * @ORM\Table(
  12. * uniqueConstraints={
  13. *
  14. * @UniqueConstraint(name="service_charge_type_unique",
  15. * columns={"service_charge_type_id", "origin_company_id"})
  16. * }
  17. * )
  18. *
  19. * @ORM\Entity(repositoryClass=ServiceChargeTypeRepository::class)
  20. */
  21. class ServiceChargeType
  22. {
  23. use LifecycleUserIdentifierTrait;
  24. /**
  25. * @ORM\Id
  26. *
  27. * @ORM\GeneratedValue
  28. *
  29. * @ORM\Column(type="integer")
  30. */
  31. private ?int $id = null;
  32. /**
  33. * @ORM\ManyToOne(targetEntity=Parameter::class)
  34. *
  35. * @ORM\JoinColumn(nullable=false)
  36. */
  37. private ?Parameter $serviceChargeType = null;
  38. /**
  39. * @ORM\ManyToOne(targetEntity=Company::class, inversedBy="serviceChargeTypes")
  40. *
  41. * @ORM\JoinColumn(nullable=false)
  42. */
  43. private ?Company $originCompany = null;
  44. public function getId(): ?int
  45. {
  46. return $this->id;
  47. }
  48. public function getServiceChargeType(): ?Parameter
  49. {
  50. return $this->serviceChargeType;
  51. }
  52. public function setServiceChargeType(?Parameter $serviceChargeType): self
  53. {
  54. $this->serviceChargeType = $serviceChargeType;
  55. return $this;
  56. }
  57. public function getOriginCompany(): ?Company
  58. {
  59. return $this->originCompany;
  60. }
  61. public function setOriginCompany(?Company $originCompany): self
  62. {
  63. $this->originCompany = $originCompany;
  64. return $this;
  65. }
  66. }