<?php
namespace App\Entity\Website;
use App\Entity\Website\Website\Website;
use App\Repository\Website\CostRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\IdGenerator\UuidGenerator;
use App\Entity\BaseEntity;
#[ORM\Entity(repositoryClass: CostRepository::class)]
class Cost extends BaseEntity
{
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'CUSTOM')]
#[ORM\CustomIdGenerator(class: UuidGenerator::class)]
#[ORM\Column(type: 'guid', unique: true)]
private ?string $id = null;
#[ORM\Column]
private ?int $price = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $description = null;
#[ORM\ManyToOne(inversedBy: 'costs')]
private ?CostCategory $costCategory = null;
#[ORM\ManyToOne(inversedBy: 'costs')]
#[ORM\JoinColumn(nullable: false)]
private ?Website $website = null;
public function getId(): ?string
{
return $this->id;
}
public function getPrice(): ?int
{
return $this->price;
}
public function setPrice(int $price): static
{
$this->price = $price;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(?string $description): static
{
$this->description = $description;
return $this;
}
public function getCostCategory(): ?CostCategory
{
return $this->costCategory;
}
public function setCostCategory(?CostCategory $costCategory): static
{
$this->costCategory = $costCategory;
return $this;
}
public function getWebsite(): ?Website
{
return $this->website;
}
public function setWebsite(?Website $website): static
{
$this->website = $website;
return $this;
}
}