src/Entity/CashIn.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Base\AbstractTimestampableEntity;
  4. use App\Repository\CashInRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * @ORM\Entity(repositoryClass=CashInRepository::class)
  8.  */
  9. class CashIn extends AbstractTimestampableEntity
  10. {
  11.     /**
  12.      * @ORM\ManyToOne(targetEntity=Company::class, inversedBy="cashIns")
  13.      */
  14.     private $company;
  15.     /**
  16.      * @ORM\ManyToOne(targetEntity=Project::class, inversedBy="cashIns")
  17.      */
  18.     private $project;
  19.     /**
  20.      * @ORM\ManyToOne(targetEntity=CashInType::class, inversedBy="cashIns")
  21.      * @ORM\JoinColumn(nullable=false)
  22.      */
  23.     private $cashInType;
  24.     /**
  25.      * @ORM\Column(type="date")
  26.      */
  27.     private $date;
  28.     /**
  29.      * @ORM\Column(type="decimal", precision=10, scale=2)
  30.      */
  31.     private $value;
  32.     /**
  33.      * @ORM\Column(type="string", length=255)
  34.      */
  35.     private $docNr;
  36.     /**
  37.      * @ORM\Column(type="text", nullable=true)
  38.      */
  39.     private $description;
  40.     /**
  41.      * @ORM\OneToOne(targetEntity=Payment::class, inversedBy="cashIn", cascade={"persist", "remove"})
  42.      */
  43.     private $payment;
  44.     public function getCompany(): ?Company
  45.     {
  46.         return $this->company;
  47.     }
  48.     public function setCompany(?Company $company): self
  49.     {
  50.         $this->company $company;
  51.         return $this;
  52.     }
  53.     public function getProject(): ?Project
  54.     {
  55.         return $this->project;
  56.     }
  57.     public function setProject(?Project $project): self
  58.     {
  59.         $this->project $project;
  60.         return $this;
  61.     }
  62.     public function getCashInType(): ?CashInType
  63.     {
  64.         return $this->cashInType;
  65.     }
  66.     public function setCashInType(?CashInType $cashInType): self
  67.     {
  68.         $this->cashInType $cashInType;
  69.         return $this;
  70.     }
  71.     public function getDate(): ?\DateTimeInterface
  72.     {
  73.         return $this->date;
  74.     }
  75.     public function setDate(\DateTimeInterface $date): self
  76.     {
  77.         $this->date $date;
  78.         return $this;
  79.     }
  80.     public function getValue(): ?string
  81.     {
  82.         return $this->value;
  83.     }
  84.     public function setValue(string $value): self
  85.     {
  86.         $this->value $value;
  87.         return $this;
  88.     }
  89.     public function getDocNr(): ?string
  90.     {
  91.         return $this->docNr;
  92.     }
  93.     public function setDocNr(string $docNr): self
  94.     {
  95.         $this->docNr $docNr;
  96.         return $this;
  97.     }
  98.     public function getDescription(): ?string
  99.     {
  100.         return $this->description;
  101.     }
  102.     public function setDescription(?string $description): self
  103.     {
  104.         $this->description $description;
  105.         return $this;
  106.     }
  107.     public function getPayment(): ?Payment
  108.     {
  109.         return $this->payment;
  110.     }
  111.     public function setPayment(?Payment $payment): self
  112.     {
  113.         $this->payment $payment;
  114.         return $this;
  115.     }
  116. }