<?php
namespace App\Entity;
use App\Repository\ReporterPartnerRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=ReporterPartnerRepository::class)
*/
class ReporterPartner
{
public const MOST_RELEVANT_COUNTRIES = [
'Australia',
'Brazil',
'Canada',
'China',
'EU-28',
'Guinea',
'India',
'Japan',
'Qatar',
'Russian Federation',
'Saudi Arabia',
'United Arab Emirates',
'USA',
];
public const MOST_RELEVANT_PARTNERS = [
'Australia',
'Brazil',
'Canada',
'China',
'EU-28',
'Guinea',
'India',
'Japan',
'Qatar',
'Russian Federation',
'Saudi Arabia',
'United Arab Emirates',
'USA',
'World',
];
public const COMMODITY_CODE = [
2606 => 'Bauxite',
2818 => 'Alumina',
7601 => 'Aluminium',
7602 => 'Scrap',
7604 => 'Extrusions',
7606 => 'Rolled Products',
7607 => 'Foil',
];
public const BACKGROUNDCOLOR = [
2606 => '#7F301B',
2818 => '#A293AB',
7601 => '#AAB4C4',
7602 => '#7DAA9D',
7604 => '#9C9E9C',
7606 => '#2988A5',
7607 => '#688C50',
];
public const BACKGROUNDCOLOR_DARKER = [
2606 => '#592213',
2818 => '#73617d',
7601 => '#697b97',
7602 => '#527d70',
7604 => '#6d6f6d',
7606 => '#1d5f73',
7607 => '#496238',
];
public const ICONCLASS = [
2606 => 'bauxite',
2818 => 'alumina',
7601 => 'aluminium',
7602 => 'scrap',
7604 => 'extrusion',
7606 => 'rolled_products',
7607 => 'foil',
];
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $reporter;
/**
* @ORM\Column(type="string", length=255)
*/
private $partner;
/**
* @ORM\Column(type="string", length=255)
*/
private $tradeFlow;
/**
* @ORM\Column(type="integer")
*/
private $commodityCode;
/**
* @ORM\OneToMany(targetEntity=Period::class, mappedBy="reporterPartner", cascade={"persist", "remove"}, orphanRemoval=true)
*/
private $periods;
public function __construct()
{
$this->periods = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getReporter(): ?string
{
return $this->reporter;
}
public function setReporter(string $reporter): self
{
$this->reporter = $reporter;
return $this;
}
public function getPartner(): ?string
{
return $this->partner;
}
public function setPartner(string $partner): self
{
$this->partner = $partner;
return $this;
}
public function getTradeFlow(): ?string
{
return $this->tradeFlow;
}
public function setTradeFlow(string $tradeFlow): self
{
$this->tradeFlow = $tradeFlow;
return $this;
}
public function getCommodityCode(): ?int
{
return $this->commodityCode;
}
public function setCommodityCode(int $commodityCode): self
{
$this->commodityCode = $commodityCode;
return $this;
}
/**
* @return Collection|Period[]
*/
public function getPeriods(): Collection
{
return $this->periods;
}
public function addPeriod(Period $period): self
{
if (!$this->periods->contains($period)) {
$this->periods[] = $period;
}
return $this;
}
public function removePeriod(Period $period): self
{
$this->periods->removeElement($period);
return $this;
}
}