src/Entity/DailyAccount.php line 20

Open in your IDE?
  1. <?php
  2. /**
  3.  * Created by PhpStorm.
  4.  * User: parcel
  5.  * Date: 11/12/18
  6.  * Time: 12:49 PM
  7.  */
  8. namespace App\Entity;
  9. use Doctrine\ORM\Mapping as ORM;
  10. use JMS\Serializer\Annotation as Serializer;
  11. use Symfony\Component\Validator\Constraints as Assert;
  12. /**
  13.  * @ORM\Entity(repositoryClass="App\Repository\DailyAccountRepository")
  14.  * @ORM\Table(name="daily_account")
  15.  */
  16. class DailyAccount {
  17.     /**
  18.      * @ORM\Id
  19.      * @ORM\GeneratedValue(strategy="AUTO")
  20.      * @ORM\Column(type="integer")
  21.      */
  22.     private $id;
  23.     /**
  24.      * @Serializer\Type("ArrayCollection<App\Entity\StationExpense>")
  25.      * @ORM\OneToMany(targetEntity="App\Entity\StationExpense",mappedBy="dailyAccount", cascade={"persist", "remove"})
  26.      */
  27.     private $expensesDetails;
  28.     /**
  29.      * @Assert\NotBlank(message="Please Enter An amount")
  30.      * @ORM\Column(type="float")
  31.      */
  32.     private $drawerCash;
  33.     /**
  34.      *  @Serializer\Type("DateTime<'l jS F  Y'>")
  35.      * @ORM\Column(type="date")
  36.      */
  37.     private $accountDate;
  38.     /**
  39.      * @var \App\Entity\User
  40.      * @Serializer\Type("App\Entity\User")
  41.      * @ORM\ManyToOne(targetEntity="App\Entity\User")
  42.      * @ORM\JoinColumns({
  43.      *   @ORM\JoinColumn(name="user_id", referencedColumnName="id")
  44.      * })
  45.      */
  46.     private $user;
  47.     /**
  48.      * @var \App\Entity\StationDailyAccount
  49.      * @Serializer\Type("App\Entity\StationDailyAccount")
  50.      * @ORM\ManyToOne(targetEntity="App\Entity\StationDailyAccount")
  51.      * @ORM\JoinColumns({
  52.      *   @ORM\JoinColumn(name="station_daily_account", referencedColumnName="id", nullable=false)
  53.      * })
  54.      */
  55.     private $stationDailyAccount;
  56.     /**
  57.      * @Serializer\Type("boolean")
  58.      * @ORM\Column(type="boolean")
  59.      */
  60.     private $isClosed;
  61.     /**
  62.      * @var \App\Entity\User
  63.      * @Serializer\Type("App\Entity\User")
  64.      * @ORM\ManyToOne(targetEntity="App\Entity\User")
  65.      * @ORM\JoinColumns({
  66.      *   @ORM\JoinColumn(name="closed_by", referencedColumnName="id", nullable=true)
  67.      * })
  68.      */
  69.     private $closedBy;
  70.     /**
  71.      *  @Serializer\Type("DateTime<'l jS F  Y'>")
  72.      * @ORM\Column(type="datetime")
  73.      */
  74.     private $createdAt;
  75.     /**
  76.      * @return mixed
  77.      */
  78.     public function getId()
  79.     {
  80.         return $this->id;
  81.     }
  82.     /**
  83.      * @param mixed $id
  84.      */
  85.     public function setId($id)
  86.     {
  87.         $this->id $id;
  88.     }
  89.     /**
  90.      * @return mixed
  91.      */
  92.     public function getAccountDate()
  93.     {
  94.         return $this->accountDate;
  95.     }
  96.     /**
  97.      * @param mixed $accountDate
  98.      */
  99.     public function setAccountDate($accountDate)
  100.     {
  101.         $this->accountDate $accountDate;
  102.     }
  103.     /**
  104.      * @return User
  105.      */
  106.     public function getUser()
  107.     {
  108.         return $this->user;
  109.     }
  110.     /**
  111.      * @param User $user
  112.      */
  113.     public function setUser($user)
  114.     {
  115.         $this->user $user;
  116.     }
  117.     /**
  118.      * @return StationDailyAccount
  119.      */
  120.     public function getStationDailyAccount()
  121.     {
  122.         return $this->stationDailyAccount;
  123.     }
  124.     /**
  125.      * @param StationDailyAccount $stationDailyAccount
  126.      */
  127.     public function setStationDailyAccount($stationDailyAccount)
  128.     {
  129.         $this->stationDailyAccount $stationDailyAccount;
  130.     }
  131.     /**
  132.      * @return mixed
  133.      */
  134.     public function getisClosed()
  135.     {
  136.         return $this->isClosed;
  137.     }
  138.     /**
  139.      * @param mixed $isClosed
  140.      */
  141.     public function setIsClosed($isClosed)
  142.     {
  143.         $this->isClosed $isClosed;
  144.     }
  145.     /**
  146.      * @return User
  147.      */
  148.     public function getClosedBy()
  149.     {
  150.         return $this->closedBy;
  151.     }
  152.     /**
  153.      * @param User $closedBy
  154.      */
  155.     public function setClosedBy($closedBy)
  156.     {
  157.         $this->closedBy $closedBy;
  158.     }
  159.     /**
  160.      * @return mixed
  161.      */
  162.     public function getCreatedAt()
  163.     {
  164.         return $this->createdAt;
  165.     }
  166.     /**
  167.      * @param mixed $createdAt
  168.      */
  169.     public function setCreatedAt($createdAt)
  170.     {
  171.         $this->createdAt $createdAt;
  172.     }
  173.     /**
  174.      * @return mixed
  175.      */
  176.     public function getDrawerCash()
  177.     {
  178.         return $this->drawerCash;
  179.     }
  180.     /**
  181.      * @param mixed $drawerCash
  182.      */
  183.     public function setDrawerCash($drawerCash)
  184.     {
  185.         $this->drawerCash $drawerCash;
  186.     }
  187. }