src/Entity/DnsitStoredRequest.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * DnsitStoredRequest
  8.  *
  9.  * @ORM\Table(name="dnsit_stored_request")
  10.  * @ORM\Entity(repositoryClass="App\Repository\DnsitStoredRequestRepository")
  11.  */
  12. class DnsitStoredRequest
  13. {
  14.     /**
  15.      * @var string
  16.      *
  17.      * @ORM\Column(name="dnsit_name", type="string", nullable=false)
  18.      */
  19.     private $name;
  20.     /**
  21.      * @var float|null
  22.      *
  23.      * @ORM\Column(name="reduce_from_distance", type="float", nullable=true)
  24.      */
  25.     private $reduceFromDistance;
  26.     /**
  27.      * @var float|null
  28.      *
  29.      * @ORM\Column(name="reduce_until_distance", type="float", nullable=true)
  30.      */
  31.     private $reduceUntilDistance;
  32.     /**
  33.      * @var float|null
  34.      *
  35.      * @ORM\Column(name="reduce", type="float", nullable=true)
  36.      */
  37.     private $reduce;
  38.     /**
  39.      * @var \DateTime|null
  40.      *
  41.      * @ORM\Column(name="created_at", type="datetime", nullable=true)
  42.      */
  43.     private $createdAt;
  44.     /**
  45.      * @var int|null
  46.      *
  47.      * @ORM\Column(name="created_by", type="bigint", nullable=true)
  48.      */
  49.     private $createdBy;
  50.     /**
  51.      * @var \DateTime|null
  52.      *
  53.      * @ORM\Column(name="updated_at", type="datetime", nullable=true)
  54.      */
  55.     private $updatedAt;
  56.     /**
  57.      * @var int|null
  58.      *
  59.      * @ORM\Column(name="updated_by", type="bigint", nullable=true)
  60.      */
  61.     private $updatedBy;
  62.     /**
  63.      * @var int
  64.      *
  65.      * @ORM\Column(name="id", type="bigint")
  66.      * @ORM\Id
  67.      * @ORM\GeneratedValue(strategy="IDENTITY")
  68.      */
  69.     private $id;
  70.     /**
  71.      * @var \Doctrine\Common\Collections\Collection
  72.      *
  73.      * @ORM\OneToMany(targetEntity="App\Entity\DnsitStoredRequestLine", mappedBy="storedRequest", cascade={"persist","remove"})
  74.      */
  75.     private $lines;
  76.     /**
  77.      * @var \App\Entity\DnsitScoringProfile
  78.      *
  79.      * @ORM\ManyToOne(targetEntity="App\Entity\DnsitScoringProfile", inversedBy="requests")
  80.      * @ORM\JoinColumns({
  81.      *   @ORM\JoinColumn(name="scoring_profile_id", referencedColumnName="id")
  82.      * })
  83.      */
  84.     private $scoringProfile;
  85.     /**
  86.      * Constructor
  87.      */
  88.     public function __construct()
  89.     {
  90.         $this->lines = new \Doctrine\Common\Collections\ArrayCollection();
  91.     }
  92.     public function getName(): ?string
  93.     {
  94.         return $this->name;
  95.     }
  96.     public function setName(string $name): self
  97.     {
  98.         $this->name $name;
  99.         return $this;
  100.     }
  101.     public function getReduceFromDistance(): ?float
  102.     {
  103.         return $this->reduceFromDistance;
  104.     }
  105.     public function setReduceFromDistance(?float $reduceFromDistance): self
  106.     {
  107.         $this->reduceFromDistance $reduceFromDistance;
  108.         return $this;
  109.     }
  110.     public function getReduceUntilDistance(): ?float
  111.     {
  112.         return $this->reduceUntilDistance;
  113.     }
  114.     public function setReduceUntilDistance(?float $reduceUntilDistance): self
  115.     {
  116.         $this->reduceUntilDistance $reduceUntilDistance;
  117.         return $this;
  118.     }
  119.     public function getReduce(): ?float
  120.     {
  121.         return $this->reduce;
  122.     }
  123.     public function setReduce(?float $reduce): self
  124.     {
  125.         $this->reduce $reduce;
  126.         return $this;
  127.     }
  128.     public function getCreatedAt(): ?\DateTimeInterface
  129.     {
  130.         return $this->createdAt;
  131.     }
  132.     public function setCreatedAt(?\DateTimeInterface $createdAt): self
  133.     {
  134.         $this->createdAt $createdAt;
  135.         return $this;
  136.     }
  137.     public function getCreatedBy(): ?int
  138.     {
  139.         return $this->createdBy;
  140.     }
  141.     public function setCreatedBy(?int $createdBy): self
  142.     {
  143.         $this->createdBy $createdBy;
  144.         return $this;
  145.     }
  146.     public function getUpdatedAt(): ?\DateTimeInterface
  147.     {
  148.         return $this->updatedAt;
  149.     }
  150.     public function setUpdatedAt(?\DateTimeInterface $updatedAt): self
  151.     {
  152.         $this->updatedAt $updatedAt;
  153.         return $this;
  154.     }
  155.     public function getUpdatedBy(): ?int
  156.     {
  157.         return $this->updatedBy;
  158.     }
  159.     public function setUpdatedBy(?int $updatedBy): self
  160.     {
  161.         $this->updatedBy $updatedBy;
  162.         return $this;
  163.     }
  164.     public function getId(): ?int
  165.     {
  166.         return $this->id;
  167.     }
  168.     /**
  169.      * @return Collection|DnsitStoredRequestLine[]
  170.      */
  171.     public function getLines(): Collection
  172.     {
  173.         return $this->lines;
  174.     }
  175.     public function addLine(DnsitStoredRequestLine $line): self
  176.     {
  177.         if (!$this->lines->contains($line)) {
  178.             $this->lines[] = $line;
  179.             $line->setStoredRequest($this);
  180.         }
  181.         return $this;
  182.     }
  183.     public function removeLine(DnsitStoredRequestLine $line): self
  184.     {
  185.         if ($this->lines->contains($line)) {
  186.             $this->lines->removeElement($line);
  187.             // set the owning side to null (unless already changed)
  188.             if ($line->getStoredRequest() === $this) {
  189.                 $line->setStoredRequest(null);
  190.             }
  191.         }
  192.         return $this;
  193.     }
  194.     public function getScoringProfile(): ?DnsitScoringProfile
  195.     {
  196.         return $this->scoringProfile;
  197.     }
  198.     public function setScoringProfile(?DnsitScoringProfile $scoringProfile): self
  199.     {
  200.         $this->scoringProfile $scoringProfile;
  201.         return $this;
  202.     }
  203. }