<?php
namespace App\Entity;
use App\Repository\ReductionItemRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=ReductionItemRepository::class)
*/
class ReductionItem
{
const TYPE_PERCENT = "pourcentage";
const TYPE_FIXE = "valeurFixe";
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity=ComptaType::class)
*/
private $comptaType;
/**
* @ORM\Column(type="string", length=20)
*/
private $type;
/**
* @ORM\Column(type="float")
*/
private $value;
/**
* @ORM\ManyToOne(targetEntity=Reduction::class, inversedBy="reductionItems")
* @ORM\JoinColumn(nullable=false)
*/
private $reduction;
public function getId(): ?int
{
return $this->id;
}
public function getComptaType(): ?ComptaType
{
return $this->comptaType;
}
public function setComptaType(?ComptaType $comptaType): self
{
$this->comptaType = $comptaType;
return $this;
}
public function getType(): ?string
{
return $this->type;
}
public function setType(string $type): self
{
$this->type = $type;
return $this;
}
public function getValue(): ?float
{
return $this->value;
}
public function setValue(float $value): self
{
$this->value = $value;
return $this;
}
public function getReduction(): ?Reduction
{
return $this->reduction;
}
public function setReduction(?Reduction $reduction): self
{
$this->reduction = $reduction;
return $this;
}
}