<?php
namespace AdminBundle\Entity;
use DateTime;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Table(name: 'client_change_requests')]
#[ORM\Entity(repositoryClass: \AdminBundle\Repository\ClientChangeRequestRepository::class)]
class ClientChangeRequest extends BaseEntity
{
const PURPOSE_BADGE_PROOF_PICTURE = 1;
public static $purposeList = [
self::PURPOSE_BADGE_PROOF_PICTURE => 'BADGE_PROOF_PICTURE',
];
const STATUS_PENDING = 1;
const STATUS_APPROVED = 2;
const STATUS_DECLINED = 3;
const STATUS_CANCELED = 4;
public static $statusList = [
self::STATUS_PENDING => 'PENDING',
self::STATUS_APPROVED => 'APPROVED',
self::STATUS_DECLINED => 'DECLINED',
self::STATUS_CANCELED => 'CANCELED',
];
const TYPE_FILE = 1;
const TYPE_STRING = 2;
public static $typeList = [
self::TYPE_FILE => 'FILE',
self::TYPE_STRING => 'STRING',
];
/**
* @var integer
*/
#[ORM\Column(name: 'id', type: 'integer', nullable: false)]
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'IDENTITY')]
protected $id;
/**
* @var \DateTime
*/
#[ORM\Column(name: 'created_at', type: 'datetime')]
protected $createdAt;
/**
* @var string
*/
#[ORM\Column(name: 'purpose', type: 'integer')]
protected $purpose;
/**
* @var string
*/
#[ORM\Column(name: 'value', type: 'string', length: 255)]
protected $value;
/**
* @var string
*/
#[ORM\Column(name: '`class`', type: 'string', length: 255)]
protected $class;
/**
* @var string
*/
#[ORM\Column(name: 'type', type: 'integer')]
protected $type;
/**
* @var string
*/
#[ORM\Column(name: 'destination_id', type: 'integer', nullable: true)]
protected $destinationId;
/**
* @var string
*/
#[ORM\Column(name: 'destination_path', type: 'string', length: 255)]
protected $destinationPath;
/**
* @var string
*/
#[ORM\Column(name: 'origin_path', type: 'string', length: 255)]
protected $originPath;
/**
* @var string
*/
#[ORM\Column(name: 'web_path', type: 'string', length: 255)]
protected $webPath;
/**
* @var string
*/
#[ORM\Column(name: 'setter_field', type: 'string', length: 255)]
protected $setterField;
/**
* @var string
*/
#[ORM\Column(name: 'status', type: 'integer')]
protected $status = self::STATUS_PENDING;
/**
* @var Driver
*/
#[ORM\JoinColumn(name: 'from_user_id', referencedColumnName: 'id')]
#[ORM\ManyToOne(targetEntity: \AdminBundle\Entity\User::class, inversedBy: 'clientChangeRequests')]
protected $fromUser;
/**
* @return int
*/
public function getId()
{
return $this->id;
}
public static function getPurposeFromString($purpose)
{
switch ($purpose) {
case 'PURPOSE_BADGE_PROOF_PICTURE':
return self::PURPOSE_BADGE_PROOF_PICTURE;
default:
return null;
}
}
public static function getStaticStringPurpose($purpose)
{
return self::$purposeList[$purpose];
}
public function getStringStatus($status)
{
return self::$statusList[$status];
}
public function getStringPurpose($purpose)
{
return self::$purposeList[$purpose];
}
public function getStringType($type)
{
return self::$typeList[$type];
}
/**
* @param DateTime $createdAt
*
* @return ClientChangeRequest
*/
public function setCreatedAt($createdAt)
{
$this->createdAt = $createdAt;
return $this;
}
/**
* @return DateTime
*/
public function getCreatedAt()
{
return $this->createdAt;
}
/**
* Set purpose
*
* @param int $purpose
*
* @return ClientChangeRequest
*/
public function setPurpose($purpose)
{
$this->purpose = $purpose;
return $this;
}
/**
* Get purpose
*
* @return int
*/
public function getPurpose()
{
return $this->purpose;
}
/**
* Set value
*
* @param string $value
*
* @return ClientChangeRequest
*/
public function setValue($value)
{
$this->value = $value;
return $this;
}
/**
* Get value
*
* @return string
*/
public function getValue()
{
return $this->value;
}
/**
* Set class
*
* @param string $class
*
* @return ClientChangeRequest
*/
public function setClass($class)
{
$this->class = $class;
return $this;
}
/**
* Get class
*
* @return string
*/
public function getClass()
{
return $this->class;
}
/**
* @return integer
*/
public function getType()
{
return $this->type;
}
/**
* @param integer $type
*
* @return ClientChangeRequest
*/
public function setType($type)
{
$this->type = $type;
return $this;
}
/**
* Set destination
*
* @param integer $destination
*
* @return ClientChangeRequest
*/
public function setDestination($destination)
{
$this->destination = $destination;
return $this;
}
/**
* Get destination
*
* @return integer
*/
public function getDestination()
{
return $this->destination;
}
/**
* Set status
*
* @param int $status
*
* @return ClientChangeRequest
*/
public function setStatus($status)
{
$this->status = $status;
return $this;
}
/**
* Get status
*
* @return int
*/
public function getStatus()
{
return $this->status;
}
/**
* Set fromUser
*
* @param User $fromUser
*
* @return ClientChangeRequest
*/
public function setFromUser(User $fromUser = null)
{
$this->fromUser = $fromUser;
return $this;
}
/**
* Get fromUser
*
* @return User
*/
public function getFromUser()
{
return $this->fromUser;
}
/**
* @return string
*/
public function getDestinationId()
{
return $this->destinationId;
}
/**
* @param string $destinationId
*
* @return ClientChangeRequest
*/
public function setDestinationId($destinationId)
{
$this->destinationId = $destinationId;
return $this;
}
/**
* @return string
*/
public function getDestinationPath()
{
return $this->destinationPath;
}
/**
* @param string $destinationPath
*
* @return ClientChangeRequest
*/
public function setDestinationPath($destinationPath)
{
$this->destinationPath = $destinationPath;
return $this;
}
/**
* @return string
*/
public function getOriginPath()
{
return $this->originPath;
}
/**
* @param string $originPath
*
* @return ClientChangeRequest
*/
public function setOriginPath($originPath)
{
$this->originPath = $originPath;
return $this;
}
/**
* @return string
*/
public function getWebPath()
{
return $this->webPath;
}
/**
* @param string $webPath
*
* @return ClientChangeRequest
*/
public function setWebPath($webPath)
{
$this->webPath = $webPath;
return $this;
}
/**
* @return string
*/
public function getSetterField()
{
return $this->setterField;
}
/**
* @param string $setterField
*
* @return ClientChangeRequest
*/
public function setSetterField($setterField)
{
$this->setterField = $setterField;
return $this;
}
}