<?php
namespace App\Entity\Web;
use App\Repository\Web\CareerRepository;
use Doctrine\ORM\Mapping as ORM;
use App\Entity\Behaviors\TranslatableTrait;
use Knp\DoctrineBehaviors\Contract\Entity\TranslatableInterface;
/**
* @ORM\Table(name="web_career")
* @ORM\Entity(repositoryClass=CareerRepository::class)
* @ORM\EntityListeners({"App\Listener\EntityListener"})
*/
class Career implements TranslatableInterface
{
use TranslatableTrait;
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private int $id;
/**
* @ORM\Column(type="datetime")
*/
private $datePublic;
/**
* @ORM\Column(type="string", nullable=false)
*/
private $type;
/**
* @ORM\Column(type="string", nullable=false)
*/
private $contactName;
/**
* @ORM\Column(type="string", nullable=false)
*/
private $email;
/**
* @ORM\Column(type="string", nullable=false)
*/
private $phone;
/**
* @ORM\Column(type="boolean")
*/
private $isActive;
/**
* @ORM\Column(type="datetime")
*/
private $createts;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\User")
* @ORM\JoinColumn(nullable=false)
*/
private $createUser;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $editts;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\User")
*/
private $editUser;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Application\Store", inversedBy="careers")
*/
private $store;
public function __construct()
{
$this->setDefaultLocale(\Locale::getDefault());
$trans = new CareerTranslation($this->getDefaultLocale());
$this->addTranslation($trans);
if($this->getDatePublic() === null){$this->setDatePublic(new \DateTime());}
}
public function getId(): ?int
{
return $this->id;
}
/**
* @return mixed
*/
public function getDatePublic()
{
return $this->datePublic;
}
/**
* @param mixed $datePublic
*/
public function setDatePublic($datePublic): void
{
$this->datePublic = $datePublic;
}
public function isIsActive(): ?bool
{
return $this->isActive;
}
public function setIsActive(bool $isActive): self
{
$this->isActive = $isActive;
return $this;
}
public function __call($method, $arguments)
{
$ret = $this->proxyCurrentLocaleTranslation($method, $arguments);
if(empty($ret)) {
$ret = call_user_func_array( [ $this->translate( \Locale::getDefault() ), $method ], $arguments );
}
return $ret;
}
/**
* @return mixed
*/
public function getCreatets()
{
return $this->createts;
}
/**
* @param mixed $createts
*/
public function setCreatets($createts): void
{
$this->createts = $createts;
}
/**
* @return mixed
*/
public function getCreateUser()
{
return $this->createUser;
}
/**
* @param mixed $createUser
*/
public function setCreateUser($createUser): void
{
$this->createUser = $createUser;
}
/**
* @return mixed
*/
public function getEditts()
{
return $this->editts;
}
/**
* @param mixed $editts
*/
public function setEditts($editts): void
{
$this->editts = $editts;
}
/**
* @return mixed
*/
public function getEditUser()
{
return $this->editUser;
}
/**
* @param mixed $editUser
*/
public function setEditUser($editUser): void
{
$this->editUser = $editUser;
}
/**
* @return mixed
*/
public function getStore()
{
return $this->store;
}
/**
* @param mixed $store
*/
public function setStore($store): void
{
$this->store = $store;
}
/**
* @return mixed
*/
public function getType()
{
return $this->type;
}
/**
* @param mixed $type
*/
public function setType($type): void
{
$this->type = $type;
}
/**
* @return mixed
*/
public function getContactName()
{
return $this->contactName;
}
/**
* @param mixed $contactName
*/
public function setContactName($contactName): void
{
$this->contactName = $contactName;
}
/**
* @return mixed
*/
public function getEmail()
{
return $this->email;
}
/**
* @param mixed $email
*/
public function setEmail($email): void
{
$this->email = $email;
}
/**
* @return mixed
*/
public function getPhone()
{
return $this->phone;
}
/**
* @param mixed $phone
*/
public function setPhone($phone): void
{
$this->phone = $phone;
}
}