Advertisement
Guest User

Untitled

a guest
Feb 26th, 2014
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.98 KB | None | 0 0
  1. <?php
  2.  
  3. namespace TMS\OpenBundle\Entity;
  4.  
  5. /**
  6.  * @Doctrine\ORM\Mapping\Entity
  7.  * @Doctrine\ORM\Mapping\Table(name="parent_table")
  8.  * @Doctrine\ORM\Mapping\InheritanceType("JOINED")
  9.  * @Doctrine\ORM\Mapping\DiscriminatorColumn(name="type_id", type="integer")
  10.  * @Doctrine\ORM\Mapping\DiscriminatorMap({
  11.  *  "1" = "ChildClass",
  12.  * })
  13.  *
  14.  */
  15. abstract class ParentClass {
  16.  
  17.     /**
  18.      * @Doctrine\ORM\Mapping\Id
  19.      * @Doctrine\ORM\Mapping\Column(type="integer")
  20.      * @Doctrine\ORM\Mapping\GeneratedValue
  21.      */
  22.     protected $id;
  23.  
  24.     /**
  25.      * @Doctrine\ORM\Mapping\Column(type="boolean", nullable=false, name="is_active")
  26.      */
  27.     protected $isActive = false;
  28.  
  29.     public function getId() {
  30.         return $this->id;
  31.     }
  32.  
  33.     public function getIsActive() {
  34.         return $this->isActive;
  35.     }
  36.  
  37.     public function setId($id) {
  38.         $this->id = $id;
  39.     }
  40.  
  41.     public function setIsActive($isActive) {
  42.         $this->isActive = $isActive;
  43.     }
  44.  
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement