<?phpdeclare(strict_types=1);namespace Croisiland\CommonBundle\Entity\Price;use Crea\ParameterBundle\Entity\Parameter;use Crea\ToolsBundle\Entity\LifecycleUserIdentifierTrait;use Croisiland\CommonBundle\Annotation\Price\PriceCostTypeFormValidator;use Croisiland\CommonBundle\Entity\Company\Company;use Croisiland\CommonBundle\Repository\Price\PriceCostTypeRepository;use Doctrine\ORM\Mapping as ORM;use Doctrine\ORM\Mapping\UniqueConstraint;/** * @ORM\Table( * uniqueConstraints={ * * @UniqueConstraint(name="price_cost_type_unique", * columns={"cost_type_id", "origin_company_id"}) * } * ) * * @PriceCostTypeFormValidator(groups="price_cost_type_form_validator") * * @ORM\Entity(repositoryClass=PriceCostTypeRepository::class) */class PriceCostType{ use LifecycleUserIdentifierTrait; /** * @ORM\Id * * @ORM\GeneratedValue * * @ORM\Column(type="integer") */ private ?int $id = null; /** * @ORM\ManyToOne(targetEntity=Parameter::class) * * @ORM\JoinColumn(nullable=false) */ private ?Parameter $costType = null; /** * @ORM\ManyToOne(targetEntity=Company::class, inversedBy="priceCostTypes") * * @ORM\JoinColumn(nullable=false) */ private ?Company $originCompany = null; /** * @ORM\Column(type="boolean") */ private bool $computed = false; public function getId(): ?int { return $this->id; } public function getCostType(): ?Parameter { return $this->costType; } public function setCostType(?Parameter $costType): self { $this->costType = $costType; return $this; } public function getOriginCompany(): ?Company { return $this->originCompany; } public function setOriginCompany(?Company $originCompany): self { $this->originCompany = $originCompany; return $this; } public function isComputed(): ?bool { return $this->computed; } public function setComputed(bool $computed): self { $this->computed = $computed; return $this; }}