src/Entity/Operacje.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\OperacjeRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=OperacjeRepository::class)
  7.  * @ORM\Table(name="operacje")
  8.  * @ORM\HasLifecycleCallbacks()
  9.  */
  10. class Operacje
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="date", nullable=true, name="data_operacji")
  20.      */
  21.     private $dataOperacji;
  22.     /**
  23.      * @ORM\Column(type="text", nullable=true)
  24.      */
  25.     private $opis;
  26.     /**
  27.      * @ORM\Column(type="datetime", nullable=true)
  28.      */
  29.     private $created;
  30.     /**
  31.      * @ORM\Column(type="datetime", nullable=true)
  32.      */
  33.     private $updated;
  34.     /**
  35.      * @ORM\Column(type="string", length=45, nullable=true)
  36.      */
  37.     private $kto;
  38.     /**
  39.      * @ORM\Column(type="decimal", precision=10, scale=2, nullable=true)
  40.      */
  41.     private $kwota;
  42.     /**
  43.      * @ORM\ManyToOne(targetEntity=Rodzaje::class)
  44.      * @ORM\JoinColumn(name="rodzaj_id", referencedColumnName="id", nullable=false)
  45.      */
  46.     private $rodzaj;
  47.     /**
  48.      * @ORM\ManyToOne(targetEntity=Przychody::class)
  49.      * @ORM\JoinColumn(name="przychody_idprzychody", referencedColumnName="id", nullable=true)
  50.      */
  51.     private $przychod;
  52.     /**
  53.      * @ORM\ManyToOne(targetEntity=Rozchody::class)
  54.      * @ORM\JoinColumn(name="rozchody_idrozchody", referencedColumnName="id", nullable=true)
  55.      */
  56.     private $rozchod;
  57.     public function __construct()
  58.     {
  59.         $this->created = new \DateTime();
  60.         $this->updated = new \DateTime();
  61.     }
  62.     /**
  63.      * @ORM\PreUpdate
  64.      */
  65.     public function setUpdatedValue()
  66.     {
  67.         $this->updated = new \DateTime();
  68.     }
  69.     // Gettery i settery
  70.     public function getId(): ?int
  71.     {
  72.         return $this->id;
  73.     }
  74.     public function getDataOperacji(): ?\DateTimeInterface
  75.     {
  76.         return $this->dataOperacji;
  77.     }
  78.     public function setDataOperacji(?\DateTimeInterface $dataOperacji): self
  79.     {
  80.         $this->dataOperacji $dataOperacji;
  81.         return $this;
  82.     }
  83.     public function getOpis(): ?string
  84.     {
  85.         return $this->opis;
  86.     }
  87.     public function setOpis(?string $opis): self
  88.     {
  89.         $this->opis $opis;
  90.         return $this;
  91.     }
  92.     public function getCreated(): ?\DateTimeInterface
  93.     {
  94.         return $this->created;
  95.     }
  96.     public function setCreated(\DateTimeInterface $created): self
  97.     {
  98.         $this->created $created;
  99.         return $this;
  100.     }
  101.     public function getUpdated(): ?\DateTimeInterface
  102.     {
  103.         return $this->updated;
  104.     }
  105.     public function setUpdated(\DateTimeInterface $updated): self
  106.     {
  107.         $this->updated $updated;
  108.         return $this;
  109.     }
  110.     public function getKto(): ?string
  111.     {
  112.         return $this->kto;
  113.     }
  114.     public function setKto(?string $kto): self
  115.     {
  116.         $this->kto $kto;
  117.         return $this;
  118.     }
  119.     public function getKwota(): ?string
  120.     {
  121.         return $this->kwota;
  122.     }
  123.     public function setKwota(?string $kwota): self
  124.     {
  125.         $this->kwota $kwota;
  126.         return $this;
  127.     }
  128.     public function getRodzaj(): ?Rodzaje
  129.     {
  130.         return $this->rodzaj;
  131.     }
  132.     public function setRodzaj(?Rodzaje $rodzaj): self
  133.     {
  134.         $this->rodzaj $rodzaj;
  135.         return $this;
  136.     }
  137.     public function getPrzychod(): ?Przychody
  138.     {
  139.         return $this->przychod;
  140.     }
  141.     public function setPrzychod(?Przychody $przychod): self
  142.     {
  143.         $this->przychod $przychod;
  144.         return $this;
  145.     }
  146.     public function getRozchod(): ?Rozchody
  147.     {
  148.         return $this->rozchod;
  149.     }
  150.     public function setRozchod(?Rozchody $rozchod): self
  151.     {
  152.         $this->rozchod $rozchod;
  153.         return $this;
  154.     }
  155. }