<?php
namespace App\Entity;
use App\Repository\CampaignStatRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=CampaignStatRepository::class)
*/
class CampaignStat
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="bigint")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity=Campaign::class, inversedBy="campaignStats")
* @ORM\JoinColumn(nullable=false)
*/
private $campaign;
/**
* @ORM\Column(type="string", length=10)
*/
private $date;
/**
* @ORM\Column(type="string", length=255, unique=true)
*/
private $stat_id;
/**
* @ORM\Column(type="integer", options={"default":0})
*/
private $impression;
/**
* @ORM\Column(type="integer", options={"default":0})
*/
private $click;
/**
* @ORM\Column(type="decimal", scale=3, options={"default":0})
*/
private $ctr;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $created_at;
public function getId(): ?int
{
return $this->id;
}
public function getCampaign(): ?Campaign
{
return $this->campaign;
}
public function setCampaign(?Campaign $campaign): self
{
$this->campaign = $campaign;
return $this;
}
public function getDate(): ?string
{
return $this->date;
}
public function setDate(string $date): self
{
$this->date = $date;
return $this;
}
public function getStatId(): ?string
{
return $this->stat_id;
}
public function setStatId(string $stat_id): self
{
$this->stat_id = $stat_id;
return $this;
}
public function getImpression(): ?int
{
return $this->impression;
}
public function setImpression(int $impression = 0): self
{
$this->impression = $impression;
return $this;
}
public function getClick(): ?int
{
return $this->click;
}
public function setClick(int $click = 0): self
{
$this->click = $click;
return $this;
}
public function getCtr(): ?float
{
return $this->ctr;
}
public function setCtr(float $ctr = 0): self
{
$this->ctr = $ctr;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->created_at;
}
public function setCreatedAt(?\DateTimeInterface $created_at): self
{
$this->created_at = $created_at;
return $this;
}
}