<?php
/**
* Created by PhpStorm.
* User: parcel
* Date: 10/19/18
* Time: 12:49 PM
*/
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use JMS\Serializer\Annotation as Serializer;
/**
* @ORM\Entity
* @ORM\Table(name="expense_type")
*/
class ExpenseType {
/**
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string")
*/
private $expenseName;
/**
* @ORM\Column(type="boolean")
*/
private $isAutomatic;
/**
* @var \App\Entity\AutomaticExpense
* @Serializer\Type("App\Entity\AutomaticExpense")
* @ORM\ManyToOne(targetEntity="App\Entity\AutomaticExpense")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="automatic_expense_id", referencedColumnName="id", nullable=true)
* })
*/
private $autoExpense;
/**
* @ORM\Column(type="boolean")
*/
private $isWayBill;
/**
* @ORM\Column(type="boolean")
*/
private $isActive;
/**
* @ORM\Column(type="datetime")
*/
private $createdAt;
/**
* @var \App\Entity\User
* @Serializer\Type("App\Entity\User")
* @ORM\ManyToOne(targetEntity="App\Entity\User")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="created_by", referencedColumnName="id")
* })
*/
private $createdBy;
/**
* @return mixed
*/
public function getId()
{
return $this->id;
}
/**
* @param mixed $id
*/
public function setId($id)
{
$this->id = $id;
}
/**
* @return mixed
*/
public function getExpenseName()
{
return $this->expenseName;
}
/**
* @param mixed $expenseName
*/
public function setExpenseName($expenseName)
{
$this->expenseName = $expenseName;
}
/**
* @return mixed
*/
public function getisAutomatic()
{
return $this->isAutomatic;
}
/**
* @param mixed $isAutomatic
*/
public function setIsAutomatic($isAutomatic)
{
$this->isAutomatic = $isAutomatic;
}
/**
* @return AutomaticExpense
*/
public function getAutoExpense()
{
return $this->autoExpense;
}
/**
* @param AutomaticExpense $autoExpense
*/
public function setAutoExpense($autoExpense)
{
$this->autoExpense = $autoExpense;
}
/**
* @return mixed
*/
public function getisWayBill()
{
return $this->isWayBill;
}
/**
* @param mixed $isWayBill
*/
public function setIsWayBill($isWayBill)
{
$this->isWayBill = $isWayBill;
}
/**
* @return mixed
*/
public function getisActive()
{
return $this->isActive;
}
/**
* @param mixed $isActive
*/
public function setIsActive($isActive)
{
$this->isActive = $isActive;
}
/**
* @return mixed
*/
public function getCreatedAt()
{
return $this->createdAt;
}
/**
* @param mixed $createdAt
*/
public function setCreatedAt($createdAt)
{
$this->createdAt = $createdAt;
}
/**
* @return User
*/
public function getCreatedBy()
{
return $this->createdBy;
}
/**
* @param User $createdBy
*/
public function setCreatedBy($createdBy)
{
$this->createdBy = $createdBy;
}
public function __toString()
{
// TODO: Implement __toString() method.
return $this->expenseName;
}
}