src/Entity/ProductWarranty.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ProductWarrantyRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClass: ProductWarrantyRepository::class)]
  7. class ProductWarranty
  8. {
  9. #[ORM\Id]
  10. #[ORM\GeneratedValue]
  11. #[ORM\Column(type: 'integer')]
  12. private ?int $id = null;
  13. #[ORM\ManyToOne(inversedBy: 'productWarranties')]
  14. private ?ProjectProducts $projectProduct = null;
  15. #[ORM\ManyToOne]
  16. private ?Projects $project = null;
  17. #[ORM\ManyToOne]
  18. private ?Customers $customer = null;
  19. #[ORM\Column(type: 'datetime', nullable: true)]
  20. private ?\DateTimeInterface $createdAt = null;
  21. #[ORM\Column(type: Types::DATE_MUTABLE)]
  22. private ?\DateTimeInterface $startDate = null;
  23. #[ORM\Column(type: Types::DATE_MUTABLE)]
  24. private ?\DateTimeInterface $endDate = null;
  25. #[ORM\Column(type: Types::TEXT, nullable: true)]
  26. private ?string $comment = null;
  27. #[ORM\Column(type: Types::TEXT, nullable: true)]
  28. private ?string $description = null;
  29. public function getId(): ?int
  30. {
  31. return $this->id;
  32. }
  33. public function getCreatedAt(): ?\DateTimeInterface
  34. {
  35. return $this->createdAt;
  36. }
  37. public function setCreatedAt(?\DateTimeInterface $createdAt): static
  38. {
  39. if($createdAt == null) {
  40. $createdAt = new \DateTime();
  41. }
  42. $this->createdAt = $createdAt;
  43. return $this;
  44. }
  45. public function getProjectProduct(): ?ProjectProducts
  46. {
  47. return $this->projectProduct;
  48. }
  49. public function setProjectProduct(?ProjectProducts $projectProduct): static
  50. {
  51. $this->projectProduct = $projectProduct;
  52. return $this;
  53. }
  54. public function getProject(): ?Projects
  55. {
  56. return $this->project;
  57. }
  58. public function setProject(?Projects $project): static
  59. {
  60. $this->project = $project;
  61. return $this;
  62. }
  63. public function getCustomer(): ?Customers
  64. {
  65. return $this->customer;
  66. }
  67. public function setCustomer(?Customers $customer): static
  68. {
  69. $this->customer = $customer;
  70. return $this;
  71. }
  72. public function getStartDate(): ?\DateTimeInterface
  73. {
  74. return $this->startDate;
  75. }
  76. public function setStartDate(\DateTimeInterface $startDate): static
  77. {
  78. $this->startDate = $startDate;
  79. return $this;
  80. }
  81. public function getEndDate(): ?\DateTimeInterface
  82. {
  83. return $this->endDate;
  84. }
  85. public function setEndDate(\DateTimeInterface $endDate): static
  86. {
  87. $this->endDate = $endDate;
  88. return $this;
  89. }
  90. public function getComment(): ?string
  91. {
  92. return $this->comment;
  93. }
  94. public function setComment(?string $comment): static
  95. {
  96. $this->comment = $comment;
  97. return $this;
  98. }
  99. public function getDescription(): ?string
  100. {
  101. return $this->description;
  102. }
  103. public function setDescription(?string $description): static
  104. {
  105. $this->description = $description;
  106. return $this;
  107. }
  108. }