<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use App\Traits\CreatedUpdatedTrait;
use JMS\Serializer\Annotation as Serializer;
use JMS\Serializer\Annotation\Expose;
use App\Repository\PictureRepository;
/**
* @ORM\Table(name="v_picture")
* @ORM\Entity(repositoryClass=PictureRepository::class)
*/
class Picture
{
const VIEW_FRONT = 'FRONT';
const VIEW_TOP = 'TOP';
const VIEW_RIGHT = 'RIGHT';
const VIEW_LEFT = 'LEFT';
const VIEW_BACK = 'BACK';
public static function getViewDefinitions(){
return [
self::VIEW_FRONT => 'Front',
self::VIEW_TOP => 'Top',
self::VIEW_RIGHT => 'Right',
self::VIEW_LEFT => 'Left',
self::VIEW_BACK => 'Back',
];
}
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Expose
*
* @var string
*/
private $batchId;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Expose
*
* @var string
*/
private $imageName;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Expose
*/
private $view;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\User")
* @Serializer\Type("Relation")
*/
private $user;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\TreatmentActivity")
* @Serializer\Type("Relation")
*/
private $treatmentActivity;
use CreatedUpdatedTrait;
public function getId(): ?int
{
return $this->id;
}
public function setBatchId($batchId)
{
$this->batchId = $batchId;
}
public function getBatchId()
{
return $this->batchId;
}
/**
* @param string $imageName
*/
public function setImageName($imageName)
{
$this->imageName = $imageName;
}
/**
* @return string
*/
public function getImageName()
{
return $this->imageName;
}
/**
* @return mixed
*/
public function getUser()
{
return $this->user;
}
/**
* @param mixed $user
*/
public function setUser($user): void
{
$this->user = $user;
}
/**
* @return mixed
*/
public function getTreatmentActivity()
{
return $this->treatmentActivity;
}
/**
* @param mixed $treatmentActivity
*/
public function setTreatmentActivity($treatmentActivity): void
{
$this->treatmentActivity = $treatmentActivity;
}
/**
* @return mixed
*/
public function getView()
{
return $this->view;
}
/**
* @param mixed $view
*/
public function setView($view): void
{
$this->view = $view;
}
}