<?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use App\Entity\CurrencyHistory;
/**
* @ORM\Entity(repositoryClass="App\Repository\CurrencyPairRepository")
*/
class CurrencyPair {
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", unique=true, length=255)
*/
private $name;
/**
* @ORM\Column(type="boolean")
*/
private $status;
/**
* @ORM\Column(type="decimal", precision=8, scale=5)
*/
private $pip;
/**
* @ORM\Column(type="string", length=10, nullable=true)
*/
private $trendVolatile;
/**
* @ORM\Column(type="string", length=10, nullable=true)
*/
private $trendUp;
/**
* @ORM\Column(type="string", length=10, nullable=true)
*/
private $trendDown;
/**
* @ORM\Column(type="string", length=10, nullable=true)
*/
private $ppp;
/**
* @ORM\Column(type="string", length=10, nullable=true)
*/
private $volatility;
public function __construct() {
$this->forwards = new ArrayCollection();
}
public function getId(): ?int {
return $this->id;
}
public function getName(): ?string {
return $this->name;
}
public function setName(string $name): self {
$this->name = $name;
return $this;
}
public function getStatus(): ?bool {
return $this->status;
}
public function setStatus(bool $status): self {
$this->status = $status;
return $this;
}
public function __toString() {
return $this->getName();
}
public function getCurrencyNameByNumber($nr) {
$nameList = explode('/', $this->getName());
return $nameList[$nr - 1];
}
/**
* @return mixed
*/
public function getPip() {
return $this->pip;
}
/**
* @param mixed $pip
*/
public function setPip($pip): void {
$this->pip = $pip;
}
public function getTrendVolatile(): ?string
{
return $this->trendVolatile;
}
public function setTrendVolatile(?string $trendVolatile): self
{
$this->trendVolatile = $trendVolatile;
return $this;
}
public function getTrendUp(): ?string
{
return $this->trendUp;
}
public function setTrendUp(?string $trendUp): self
{
$this->trendUp = $trendUp;
return $this;
}
public function getTrendDown(): ?string
{
return $this->trendDown;
}
public function setTrendDown(?string $trendDown): self
{
$this->trendDown = $trendDown;
return $this;
}
/**
* @return mixed
*/
public function getPpp() {
return $this->ppp;
}
/**
* @param mixed $ppp
*/
public function setPpp($ppp): void {
$this->ppp = $ppp;
}
/**
* @return mixed
*/
public function getVolatility() {
return $this->volatility;
}
/**
* @param mixed $volatility
*/
public function setVolatility($volatility): void {
$this->volatility = $volatility;
}
}