<?phpnamespace Roothirsch\Tuer24Bundle\Entity;use Doctrine\ORM\Mapping as ORM;use Symfony\Component\Validator\Constraints as Assert;use Gedmo\Timestampable\Traits\TimestampableEntity;use Roothirsch\PimBundle\Entity\Product;#[ORM\Entity]#[ORM\Table(name: 'tuer24_product_price')]class Tuer24ProductPrice{ use TimestampableEntity; #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column(type: 'integer')] private $id; #[ORM\ManyToOne(targetEntity: Product::class)] #[ORM\JoinColumn(nullable: false)] private $product; #[ORM\Column(type: 'integer')] private $companyId; #[ORM\Column(type: 'decimal', precision: 15, scale: 2)] #[Assert\NotBlank] #[Assert\PositiveOrZero] private $price; #[ORM\Column(type: 'decimal', precision: 5, scale: 2, nullable: true)] #[Assert\Range(min: 0, max: 100)] private $discountPercent; /** * Get id * * @return int|null */ public function getId(): ?int { return $this->id; } /** * Get product * * @return Product|null */ public function getProduct(): ?Product { return $this->product; } /** * Set product * * @param Product|null $product * @return $this */ public function setProduct(?Product $product): self { $this->product = $product; return $this; } /** * Get company * * @return int|null */ public function getCompanyId(): ?int { return $this->companyId; } /** * Set company * * @param int $companyId * @return $this */ public function setCompanyId(int $companyId): self { $this->companyId = $companyId; return $this; } /** * Get price * * @return float|null */ public function getPrice(): ?float { return $this->price; } /** * Set price * * @param float $price * @return $this */ public function setPrice(float $price): self { $this->price = $price; return $this; } /** * Get discount percent * * @return float|null */ public function getDiscountPercent(): ?float { return $this->discountPercent; } /** * Set discount percent * * @param float|null $discountPercent * @return $this */ public function setDiscountPercent(?float $discountPercent): self { $this->discountPercent = $discountPercent; return $this; }}