src/Entity/AnalysisServiceWeight.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\AnalysisServiceWeightRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Gedmo\Timestampable\Traits\TimestampableEntity;
  6. #[ORM\Entity(repositoryClass: AnalysisServiceWeightRepository::class)]
  7. class AnalysisServiceWeight
  8. {
  9. use TimestampableEntity;
  10. #[ORM\Id]
  11. #[ORM\GeneratedValue]
  12. #[ORM\Column(type: 'integer')]
  13. private $id;
  14. #[ORM\Column(type: 'integer')]
  15. private $weight;
  16. #[ORM\Column(type: 'integer')]
  17. private $analysisServiceId;
  18. #[ORM\JoinColumn(nullable: false)]
  19. #[ORM\ManyToOne(targetEntity: User::class, inversedBy: 'analysisServiceWeights')]
  20. private $user;
  21. public function getUser(): ?User
  22. {
  23. return $this->user;
  24. }
  25. public function setUser(?User $user): self
  26. {
  27. $this->user = $user;
  28. return $this;
  29. }
  30. public function getId(): ?int
  31. {
  32. return $this->id;
  33. }
  34. public function getWeight(): ?int
  35. {
  36. return $this->weight;
  37. }
  38. public function setWeight(int $weight): self
  39. {
  40. $this->weight = $weight;
  41. return $this;
  42. }
  43. public function getAnalysisServiceId(): ?int
  44. {
  45. return $this->analysisServiceId;
  46. }
  47. public function setAnalysisServiceId(int $analysisServiceId): self
  48. {
  49. $this->analysisServiceId = $analysisServiceId;
  50. return $this;
  51. }
  52. }