src/OfficeBrain/Bundle/EcatalogueBundle/Entity/Ecatalogue.php line 22

Open in your IDE?
  1. <?php
  2. namespace App\OfficeBrain\Bundle\EcatalogueBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Gedmo\Mapping\Annotation as Gedmo;
  5. use Symfony\Component\Validator\Constraints as Assert;
  6. use Doctrine\Common\Collections\ArrayCollection;
  7. use JMS\Serializer\Annotation\ExclusionPolicy;
  8. use JMS\Serializer\Annotation\Exclude;
  9. use Doctrine\Common\Collections\Collection;
  10. /**
  11.  * Ecatalogue
  12.  *
  13.  * @Gedmo\SoftDeleteable(fieldName="deletedAt", timeAware=false)
  14.  * @ORM\Table("tbl_virtual_catalogues")
  15.  * @ORM\Entity(repositoryClass="App\OfficeBrain\Bundle\EcatalogueBundle\Entity\EcatalogueRepository")
  16.  * @ORM\HasLifecycleCallbacks
  17.  */
  18. class Ecatalogue
  19. {
  20.     /**
  21.      * @var integer
  22.      *
  23.      * @ORM\Column(name="id", type="integer")
  24.      * @ORM\Id
  25.      * @ORM\GeneratedValue(strategy="AUTO")
  26.      */
  27.     private $id;
  28.     
  29.     /**
  30.      * @var integer
  31.      *
  32.      * @ORM\Column(name="country_id", type="integer")
  33.      * @Assert\NotBlank(message="Country Can not Blank")
  34.      */
  35.     private $countryId;
  36.     
  37.     /**
  38.      * @ORM\Column(type="text", name="category")
  39.      */
  40.     protected $category;
  41.     
  42.     /**
  43.      * Bidirectional (OWNING SIDE - FK)
  44.      *
  45.      * @ORM\ManyToOne(targetEntity="\App\OfficeBrain\Bundle\UserBundle\Entity\User", inversedBy="ecatalogueUser")
  46.      * @ORM\JoinColumn(name="user_id", nullable=true)
  47.      */
  48.     protected $user;
  49.     
  50.     /**
  51.      * Bidirectional (OWNING SIDE - FK)
  52.      *
  53.      * @ORM\ManyToOne(targetEntity="\App\OfficeBrain\Bundle\UserBundle\Entity\User", inversedBy="ecatalogueSupplier")
  54.      * @ORM\JoinColumn(name="supplier_id", nullable=true)
  55.      * @Assert\NotBlank(message = "admin.eatalogue.supplier.not_blank")
  56.      */
  57.     protected $supplier;
  58.     
  59.     /**
  60.      * @ORM\Column(type="string", name="user_type", length=50)
  61.      */
  62.     protected $userType;
  63.     
  64.     /**
  65.      * @ORM\OneToMany(targetEntity="EcatalogueLanguage", mappedBy="ecatalogueId", cascade={"all"})
  66.      */
  67.     protected $ecatalogueLanguage;
  68.     
  69.     
  70.     /**
  71.      * @ORM\Column(type="string", name="status", length=50, options={"default" = "0"})
  72.      * @Assert\NotBlank(message="admin.not_blank")
  73.      */
  74.     protected $status;
  75.     
  76.     /**
  77.      * @var datetime
  78.      *
  79.      * @Gedmo\Timestampable()
  80.      * @ORM\Column(name="created_at",type="datetime",nullable=true)
  81.      */
  82.     protected $createdAt;
  83.     
  84.     /**
  85.      * @var datetime
  86.      *
  87.      * @Gedmo\Timestampable()
  88.      * @ORM\Column( name="updated_at", type="datetime",nullable=true)
  89.      */
  90.     protected $updatedAt;
  91.     
  92.     
  93.     /**
  94.      * @var datetime
  95.      *
  96.      * @ORM\Column(name="deleted_at",type="datetime",  nullable=true)
  97.      */
  98.     protected $deletedAt;
  99.     
  100.     /**
  101.      * @var integer
  102.      * @ORM\Column(name="created_uid", type="bigint" ,length=20 ,options={"unsigned"=true},nullable=true)
  103.      */
  104.     private $createdUid;
  105.     
  106.     /**
  107.      * @var integer
  108.      * @ORM\Column(name="updated_uid", type="bigint" ,length=20 ,options={"unsigned"=true},nullable=true)
  109.      */
  110.     private $updatedUid;
  111.     
  112.     /**
  113.      * @var integer
  114.      * @ORM\Column(name="deleted_uid", type="bigint" ,length=20 ,options={"unsigned"=true},nullable=true)
  115.      */
  116.     private $deletedUid;
  117.     
  118.     /**
  119.      * @var integer
  120.      *
  121.      * @ORM\Column(name="instance_id", type="integer")
  122.      */
  123.     private $instanceId;
  124.     
  125.     /**
  126.      * @var string
  127.      *
  128.      * @ORM\Column(name="instance_type", type="string", length=255)
  129.      */
  130.     private $instanceType;
  131.     
  132.     /**
  133.      * @var \DateTime
  134.      *
  135.      * @ORM\Column(name="start_date", type="datetime", nullable=true)
  136.      */
  137.     private $startDate;
  138.     
  139.     /**
  140.      * @var \DateTime
  141.      *
  142.      * @ORM\Column(name="end_date", type="datetime", nullable=true)
  143.      */
  144.     private $endDate;
  145.     
  146.     /**
  147.      * Bidirectional (INVERSE SIDE)
  148.      *
  149.      * @ORM\OneToMany(targetEntity="PrioritizeCatalogue", mappedBy="catalogue", cascade={"persist", "remove"})
  150.      * 
  151.      */
  152.     private $prioritizeCatalogue;
  153.     
  154.     
  155.     /**
  156.      * Get id
  157.      *
  158.      * @return integer 
  159.      */
  160.     public function getId()
  161.     {
  162.         return $this->id;
  163.     }
  164.     /**
  165.      * Set id
  166.      *
  167.      * @param integer $id
  168.      * @return EcatalogueId
  169.      */
  170.     public function setId($id)
  171.     {
  172.         $this->id $id;
  173.     
  174.         return $this;
  175.     }
  176.     
  177.     public function getCountryId() {
  178.         return $this->countryId;
  179.     }
  180.     public function setCountryId($countryId) {
  181.         $this->countryId $countryId;
  182.         return $this;
  183.     }
  184.     public function getCategory() {
  185.         return $this->category;
  186.     }
  187.     public function setCategory($category) {
  188.         $this->category $category;
  189.         return $this;
  190.     }
  191.     public function getUser() {
  192.         return $this->user;
  193.     }
  194.     /**
  195.      * Set userc
  196.      *
  197.      * @param \App\OfficeBrain\Bundle\UserBundle\Entity\User $user
  198.      * @return User
  199.      */
  200.     public function setUser($user) {
  201.         $this->user $user;
  202.         return $this;
  203.     }
  204.     public function getSupplier() {
  205.         return $this->supplier;
  206.     }
  207.     /**
  208.      * Set supplier
  209.      *
  210.      * @param \App\OfficeBrain\Bundle\UserBundle\Entity\User $supplier
  211.      * @return supplier
  212.      */
  213.     public function setSupplier($supplier) {
  214.         $this->supplier $supplier;
  215.         return $this;
  216.     }
  217.     public function getUserType() {
  218.         return $this->userType;
  219.     }
  220.     public function setUserType($userType) {
  221.         $this->userType $userType;
  222.         return $this;
  223.     }
  224.     public function getEcatalogueLanguage() {
  225.         return $this->ecatalogueLanguage;
  226.     }
  227.     public function setEcatalogueLanguage($ecatalogueLanguage) {
  228.         $this->ecatalogueLanguage $ecatalogueLanguage;
  229.         return $this;
  230.     }
  231.     public function getStatus() {
  232.         return $this->status;
  233.     }
  234.     public function setStatus($status) {
  235.         $this->status $status;
  236.         return $this;
  237.     }
  238.     public function getCreatedAt() {
  239.         return $this->createdAt;
  240.     }
  241.     public function setCreatedAt($createdAt) {
  242.         $this->createdAt $createdAt;
  243.         return $this;
  244.     }
  245.     public function getUpdatedAt() {
  246.         return $this->updatedAt;
  247.     }
  248.     public function setUpdatedAt($updatedAt) {
  249.         $this->updatedAt $updatedAt;
  250.         return $this;
  251.     }
  252.     public function getDeletedAt() {
  253.         return $this->deletedAt;
  254.     }
  255.     public function setDeletedAt($deletedAt) {
  256.         $this->deletedAt $deletedAt;
  257.         return $this;
  258.     }
  259.     public function getCreatedUid() {
  260.         return $this->createdUid;
  261.     }
  262.     public function setCreatedUid($createdUid) {
  263.         $this->createdUid $createdUid;
  264.         return $this;
  265.     }
  266.     public function getUpdatedUid() {
  267.         return $this->updatedUid;
  268.     }
  269.     public function setUpdatedUid($updatedUid) {
  270.         $this->updatedUid $updatedUid;
  271.         return $this;
  272.     }
  273.     public function getDeletedUid() {
  274.         return $this->deletedUid;
  275.     }
  276.     public function setDeletedUid($deletedUid) {
  277.         $this->deletedUid $deletedUid;
  278.         return $this;
  279.     }
  280.     public function getInstanceId() {
  281.         return $this->instanceId;
  282.     }
  283.     public function setInstanceId($instanceId) {
  284.         $this->instanceId $instanceId;
  285.         return $this;
  286.     }
  287.     public function getInstanceType() {
  288.         return $this->instanceType;
  289.     }
  290.     public function setInstanceType($instanceType) {
  291.         $this->instanceType $instanceType;
  292.         return $this;
  293.     }
  294.     
  295.     
  296.     
  297.     /**
  298.      * Constructor
  299.      */
  300.     public function __construct()
  301.     {
  302.         $this->ecatalogueLanguage = new \Doctrine\Common\Collections\ArrayCollection();
  303.     }
  304.     /**
  305.      * Add ecatalogueLanguage
  306.      *
  307.      * @param \App\OfficeBrain\Bundle\EcatalogueBundle\Entity\EcatalogueLanguage $ecatalogueLanguage
  308.      * @return Ecatalogue
  309.      */
  310.     public function addEcatalogueLanguage$ecatalogueLanguage)
  311.     {
  312.         $this->ecatalogueLanguage[] = $ecatalogueLanguage;
  313.         return $this;
  314.     }
  315.     /**
  316.      * Remove ecatalogueLanguage
  317.      *
  318.      * @param \App\OfficeBrain\Bundle\EcatalogueBundle\Entity\EcatalogueLanguage $ecatalogueLanguage
  319.      */
  320.     public function removeEcatalogueLanguage$ecatalogueLanguage)
  321.     {
  322.         $this->ecatalogueLanguage->removeElement($ecatalogueLanguage);
  323.     }
  324.     public function getStartDate() {
  325.         return $this->startDate;
  326.     }
  327.     public function setStartDate(\DateTime $startDate null) {
  328.         $this->startDate $startDate;
  329.         return $this;
  330.     }
  331.     public function getEndDate() {
  332.         return $this->endDate;
  333.     }
  334.     public function setEndDate(\DateTime $endDate null) {
  335.         $this->endDate $endDate;
  336.         return $this;
  337.     }     
  338.     
  339.     /**
  340.      * Add prioritizeCatalogue
  341.      *
  342.      * @param \App\OfficeBrain\Bundle\EcatalogueBundle\Entity\PrioritizeCatalogue $prioritizeCatalogue
  343.      *
  344.      * @return Ecatalogue
  345.      */
  346.     public function addPrioritizeCatalogue(\App\OfficeBrain\Bundle\EcatalogueBundle\Entity\PrioritizeCatalogue $prioritizeCatalogue)
  347.     {
  348.         $this->prioritizeCatalogue[] = $prioritizeCatalogue;
  349.         return $this;
  350.     }
  351.     /**
  352.      * Remove prioritizeCatalogue
  353.      *
  354.      * @param \App\OfficeBrain\Bundle\EcatalogueBundle\Entity\PrioritizeCatalogue $prioritizeCatalogue
  355.      */
  356.     public function removePrioritizeCatalogue(\App\OfficeBrain\Bundle\EcatalogueBundle\Entity\PrioritizeCatalogue $prioritizeCatalogue)
  357.     {
  358.         $this->prioritizeCatalogue->removeElement($prioritizeCatalogue);
  359.     }
  360.     /**
  361.      * Get prioritizeCatalogue
  362.      *
  363.      * @return \Doctrine\Common\Collections\Collection
  364.      */
  365.     public function getPrioritizeCatalogue()
  366.     {
  367.         return $this->prioritizeCatalogue;
  368.     }
  369. }