src/Entity/Website/Cost.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Website;
  3. use App\Entity\Website\Website\Website;
  4. use App\Repository\Website\CostRepository;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Symfony\Bridge\Doctrine\IdGenerator\UuidGenerator;
  8. use App\Entity\BaseEntity;
  9. #[ORM\Entity(repositoryClassCostRepository::class)]
  10. class Cost extends BaseEntity
  11. {
  12.     #[ORM\Id]
  13.     #[ORM\GeneratedValue(strategy'CUSTOM')]
  14.     #[ORM\CustomIdGenerator(class: UuidGenerator::class)]
  15.     #[ORM\Column(type'guid'uniquetrue)]
  16.     private ?string $id null;
  17.     #[ORM\Column]
  18.     private ?int $price null;
  19.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  20.     private ?string $description null;
  21.     #[ORM\ManyToOne(inversedBy'costs')]
  22.     private ?CostCategory $costCategory null;
  23.     #[ORM\ManyToOne(inversedBy'costs')]
  24.     #[ORM\JoinColumn(nullablefalse)]
  25.     private ?Website $website null;
  26.     public function getId(): ?string
  27.     {
  28.         return $this->id;
  29.     }
  30.     public function getPrice(): ?int
  31.     {
  32.         return $this->price;
  33.     }
  34.     public function setPrice(int $price): static
  35.     {
  36.         $this->price $price;
  37.         return $this;
  38.     }
  39.     public function getDescription(): ?string
  40.     {
  41.         return $this->description;
  42.     }
  43.     public function setDescription(?string $description): static
  44.     {
  45.         $this->description $description;
  46.         return $this;
  47.     }
  48.     public function getCostCategory(): ?CostCategory
  49.     {
  50.         return $this->costCategory;
  51.     }
  52.     public function setCostCategory(?CostCategory $costCategory): static
  53.     {
  54.         $this->costCategory $costCategory;
  55.         return $this;
  56.     }
  57.     public function getWebsite(): ?Website
  58.     {
  59.         return $this->website;
  60.     }
  61.     public function setWebsite(?Website $website): static
  62.     {
  63.         $this->website $website;
  64.         return $this;
  65.     }
  66. }