<?php
namespace App\Entity;
use App\Entity\SuperClass\BaseEntity;
use App\Repository\SourceRepository;
use App\Validator\IsValidOwner;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=SourceRepository::class)
*/
class Source extends BaseEntity
{
/**
* @ORM\Column(type="string", length=255)
*/
private $source_id;
/**
* @ORM\Column(type="json")
*/
private $response = [];
/**
* @ORM\ManyToOne(targetEntity=User::class, inversedBy="sources")
* @ORM\JoinColumn(nullable=false)
* @IsValidOwner()
*/
private $owner;
public function getSourceId(): ?string
{
return $this->source_id;
}
public function setSourceId(string $source_id): self
{
$this->source_id = $source_id;
return $this;
}
public function getResponse(): ?array
{
return $this->response;
}
public function setResponse(array $response): self
{
$this->response = $response;
return $this;
}
public function getOwner(): ?User
{
return $this->owner;
}
public function setOwner(?User $owner): self
{
$this->owner = $owner;
return $this;
}
}