src/Uniski/ResourceBundle/Entity/Shop.php line 11

Open in your IDE?
  1. <?php
  2. namespace Uniski\ResourceBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5. * @ORM\Entity
  6. * @ORM\Table("shop")
  7. */
  8. class Shop {
  9.   /**
  10.    * @var integer
  11.    *
  12.    * @ORM\Id
  13.    * @ORM\Column(name="id", type="integer")
  14.    * @ORM\GeneratedValue(strategy="IDENTITY")
  15.    */
  16.   protected $id;
  17.   /**
  18.    * @var  string
  19.    * @ORM\Column(name="name", type="string")
  20.    */
  21.   protected $name;
  22.   /**
  23.    * @var RentingRate
  24.    * @ORM\ManyToOne(targetEntity="RentingRate", cascade={"persist"})
  25.    */
  26.   protected $rate;
  27.   /**
  28.    * @var Address
  29.    * @ORM\ManyToOne(targetEntity="Address", cascade={"all"})
  30.    */
  31.   protected $address;
  32.   /**
  33.    * @var  string
  34.    * @ORM\Column(name="phone", type="string", length=30, nullable=true)
  35.    */
  36.   protected $phone;
  37.   /**
  38.    * @var  string
  39.    * @ORM\Column(name="comments", type="text", nullable=true)
  40.    */
  41.   protected $comments;
  42.   /**
  43.    * @var boolean
  44.    * @ORM\Column(type="boolean")
  45.    */
  46.   protected $active;
  47.     function __construct()
  48.     {
  49.       $this->active true;
  50.     }
  51.     /**
  52.      * Get id
  53.      *
  54.      * @return integer
  55.      */
  56.     public function getId()
  57.     {
  58.         return $this->id;
  59.     }
  60.     /**
  61.      * Set name
  62.      *
  63.      * @param string $name
  64.      *
  65.      * @return Shop
  66.      */
  67.     public function setName($name)
  68.     {
  69.         $this->name $name;
  70.         return $this;
  71.     }
  72.     /**
  73.      * Get name
  74.      *
  75.      * @return string
  76.      */
  77.     public function getName()
  78.     {
  79.         return $this->name;
  80.     }
  81.     /**
  82.      * Set rate
  83.      *
  84.      * @param \Uniski\ResourceBundle\Entity\RentingRate $rate
  85.      *
  86.      * @return Shop
  87.      */
  88.     public function setRate(\Uniski\ResourceBundle\Entity\RentingRate $rate null)
  89.     {
  90.         $this->rate $rate;
  91.         return $this;
  92.     }
  93.     /**
  94.      * Get rate
  95.      *
  96.      * @return \Uniski\ResourceBundle\Entity\RentingRate
  97.      */
  98.     public function getRate()
  99.     {
  100.         return $this->rate;
  101.     }
  102.     /**
  103.      * Set address
  104.      *
  105.      * @param \Uniski\ResourceBundle\Entity\Address $address
  106.      *
  107.      * @return Shop
  108.      */
  109.     public function setAddress(\Uniski\ResourceBundle\Entity\Address $address null)
  110.     {
  111.         $this->address $address;
  112.         return $this;
  113.     }
  114.     /**
  115.      * Get address
  116.      *
  117.      * @return \Uniski\ResourceBundle\Entity\Address
  118.      */
  119.     public function getAddress()
  120.     {
  121.         return $this->address;
  122.     }
  123.     /**
  124.      * Set comments
  125.      *
  126.      * @param string $comments
  127.      *
  128.      * @return Shop
  129.      */
  130.     public function setComments($comments)
  131.     {
  132.         $this->comments $comments;
  133.         return $this;
  134.     }
  135.     /**
  136.      * Get comments
  137.      *
  138.      * @return string
  139.      */
  140.     public function getComments()
  141.     {
  142.         return $this->comments;
  143.     }
  144.     /**
  145.      * Gets the value of phone.
  146.      *
  147.      * @return  string
  148.      */
  149.     public function getPhone()
  150.     {
  151.         return $this->phone;
  152.     }
  153.     /**
  154.      * Sets the value of phone.
  155.      *
  156.      * @param  string $phone the phone
  157.      *
  158.      * @return self
  159.      */
  160.     public function setPhone($phone)
  161.     {
  162.         $this->phone $phone;
  163.         return $this;
  164.     }
  165.     /**
  166.      * @return boolean
  167.      */
  168.     public function isActive()
  169.     {
  170.         return $this->active;
  171.     }
  172.     /**
  173.      * @param boolean $active
  174.      *
  175.      * @return self
  176.      */
  177.     public function setActive($active)
  178.     {
  179.         $this->active $active;
  180.         return $this;
  181.     }
  182. }