<?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* DnsitStoredRequest
*
* @ORM\Table(name="dnsit_stored_request")
* @ORM\Entity(repositoryClass="App\Repository\DnsitStoredRequestRepository")
*/
class DnsitStoredRequest
{
/**
* @var string
*
* @ORM\Column(name="dnsit_name", type="string", nullable=false)
*/
private $name;
/**
* @var float|null
*
* @ORM\Column(name="reduce_from_distance", type="float", nullable=true)
*/
private $reduceFromDistance;
/**
* @var float|null
*
* @ORM\Column(name="reduce_until_distance", type="float", nullable=true)
*/
private $reduceUntilDistance;
/**
* @var float|null
*
* @ORM\Column(name="reduce", type="float", nullable=true)
*/
private $reduce;
/**
* @var \DateTime|null
*
* @ORM\Column(name="created_at", type="datetime", nullable=true)
*/
private $createdAt;
/**
* @var int|null
*
* @ORM\Column(name="created_by", type="bigint", nullable=true)
*/
private $createdBy;
/**
* @var \DateTime|null
*
* @ORM\Column(name="updated_at", type="datetime", nullable=true)
*/
private $updatedAt;
/**
* @var int|null
*
* @ORM\Column(name="updated_by", type="bigint", nullable=true)
*/
private $updatedBy;
/**
* @var int
*
* @ORM\Column(name="id", type="bigint")
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $id;
/**
* @var \Doctrine\Common\Collections\Collection
*
* @ORM\OneToMany(targetEntity="App\Entity\DnsitStoredRequestLine", mappedBy="storedRequest", cascade={"persist","remove"})
*/
private $lines;
/**
* @var \App\Entity\DnsitScoringProfile
*
* @ORM\ManyToOne(targetEntity="App\Entity\DnsitScoringProfile", inversedBy="requests")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="scoring_profile_id", referencedColumnName="id")
* })
*/
private $scoringProfile;
/**
* Constructor
*/
public function __construct()
{
$this->lines = new \Doctrine\Common\Collections\ArrayCollection();
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
public function getReduceFromDistance(): ?float
{
return $this->reduceFromDistance;
}
public function setReduceFromDistance(?float $reduceFromDistance): self
{
$this->reduceFromDistance = $reduceFromDistance;
return $this;
}
public function getReduceUntilDistance(): ?float
{
return $this->reduceUntilDistance;
}
public function setReduceUntilDistance(?float $reduceUntilDistance): self
{
$this->reduceUntilDistance = $reduceUntilDistance;
return $this;
}
public function getReduce(): ?float
{
return $this->reduce;
}
public function setReduce(?float $reduce): self
{
$this->reduce = $reduce;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->createdAt;
}
public function setCreatedAt(?\DateTimeInterface $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function getCreatedBy(): ?int
{
return $this->createdBy;
}
public function setCreatedBy(?int $createdBy): self
{
$this->createdBy = $createdBy;
return $this;
}
public function getUpdatedAt(): ?\DateTimeInterface
{
return $this->updatedAt;
}
public function setUpdatedAt(?\DateTimeInterface $updatedAt): self
{
$this->updatedAt = $updatedAt;
return $this;
}
public function getUpdatedBy(): ?int
{
return $this->updatedBy;
}
public function setUpdatedBy(?int $updatedBy): self
{
$this->updatedBy = $updatedBy;
return $this;
}
public function getId(): ?int
{
return $this->id;
}
/**
* @return Collection|DnsitStoredRequestLine[]
*/
public function getLines(): Collection
{
return $this->lines;
}
public function addLine(DnsitStoredRequestLine $line): self
{
if (!$this->lines->contains($line)) {
$this->lines[] = $line;
$line->setStoredRequest($this);
}
return $this;
}
public function removeLine(DnsitStoredRequestLine $line): self
{
if ($this->lines->contains($line)) {
$this->lines->removeElement($line);
// set the owning side to null (unless already changed)
if ($line->getStoredRequest() === $this) {
$line->setStoredRequest(null);
}
}
return $this;
}
public function getScoringProfile(): ?DnsitScoringProfile
{
return $this->scoringProfile;
}
public function setScoringProfile(?DnsitScoringProfile $scoringProfile): self
{
$this->scoringProfile = $scoringProfile;
return $this;
}
}