<?php/** * Created by PhpStorm. * User: parcel * Date: 11/12/18 * Time: 12:49 PM */namespace App\Entity;use Doctrine\ORM\Mapping as ORM;use JMS\Serializer\Annotation as Serializer;use Symfony\Component\Validator\Constraints as Assert;/** * @ORM\Entity(repositoryClass="App\Repository\DailyAccountRepository") * @ORM\Table(name="daily_account") */class DailyAccount { /** * @ORM\Id * @ORM\GeneratedValue(strategy="AUTO") * @ORM\Column(type="integer") */ private $id; /** * @Serializer\Type("ArrayCollection<App\Entity\StationExpense>") * @ORM\OneToMany(targetEntity="App\Entity\StationExpense",mappedBy="dailyAccount", cascade={"persist", "remove"}) */ private $expensesDetails; /** * @Assert\NotBlank(message="Please Enter An amount") * @ORM\Column(type="float") */ private $drawerCash; /** * @Serializer\Type("DateTime<'l jS F Y'>") * @ORM\Column(type="date") */ private $accountDate; /** * @var \App\Entity\User * @Serializer\Type("App\Entity\User") * @ORM\ManyToOne(targetEntity="App\Entity\User") * @ORM\JoinColumns({ * @ORM\JoinColumn(name="user_id", referencedColumnName="id") * }) */ private $user; /** * @var \App\Entity\StationDailyAccount * @Serializer\Type("App\Entity\StationDailyAccount") * @ORM\ManyToOne(targetEntity="App\Entity\StationDailyAccount") * @ORM\JoinColumns({ * @ORM\JoinColumn(name="station_daily_account", referencedColumnName="id", nullable=false) * }) */ private $stationDailyAccount; /** * @Serializer\Type("boolean") * @ORM\Column(type="boolean") */ private $isClosed; /** * @var \App\Entity\User * @Serializer\Type("App\Entity\User") * @ORM\ManyToOne(targetEntity="App\Entity\User") * @ORM\JoinColumns({ * @ORM\JoinColumn(name="closed_by", referencedColumnName="id", nullable=true) * }) */ private $closedBy; /** * @Serializer\Type("DateTime<'l jS F Y'>") * @ORM\Column(type="datetime") */ private $createdAt; /** * @return mixed */ public function getId() { return $this->id; } /** * @param mixed $id */ public function setId($id) { $this->id = $id; } /** * @return mixed */ public function getAccountDate() { return $this->accountDate; } /** * @param mixed $accountDate */ public function setAccountDate($accountDate) { $this->accountDate = $accountDate; } /** * @return User */ public function getUser() { return $this->user; } /** * @param User $user */ public function setUser($user) { $this->user = $user; } /** * @return StationDailyAccount */ public function getStationDailyAccount() { return $this->stationDailyAccount; } /** * @param StationDailyAccount $stationDailyAccount */ public function setStationDailyAccount($stationDailyAccount) { $this->stationDailyAccount = $stationDailyAccount; } /** * @return mixed */ public function getisClosed() { return $this->isClosed; } /** * @param mixed $isClosed */ public function setIsClosed($isClosed) { $this->isClosed = $isClosed; } /** * @return User */ public function getClosedBy() { return $this->closedBy; } /** * @param User $closedBy */ public function setClosedBy($closedBy) { $this->closedBy = $closedBy; } /** * @return mixed */ public function getCreatedAt() { return $this->createdAt; } /** * @param mixed $createdAt */ public function setCreatedAt($createdAt) { $this->createdAt = $createdAt; } /** * @return mixed */ public function getDrawerCash() { return $this->drawerCash; } /** * @param mixed $drawerCash */ public function setDrawerCash($drawerCash) { $this->drawerCash = $drawerCash; }}