Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Person entity

By: a guest on Sep 6th, 2010  |  syntax: PHP  |  size: 1.56 KB  |  views: 76  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. /**
  2.  * Person
  3.  * @author kraken
  4.  */
  5.  
  6. /**
  7.  * @entity
  8.  * @inheritanceType("JOINED")
  9.  * @discriminatorColumn(name="role_discr", type="string")
  10.  * @discriminatorMap({"Developer" = "Entities\Developer", "Superadmin" = "Entities\Superadmin", "Admin" = "Entities\Admin", "Installer" = "Entities\Installer", "User" = "Entities\User"})
  11.  * @table(name="persons")
  12.  * @hasLifecycleCallbacks
  13.  * @abstract
  14.  */
  15. abstract class Person extends \DannaxTools\BaseEntity {
  16.  
  17.     /**
  18.      * @id
  19.      * @column(type="integer")
  20.      * @generatedValue(strategy="SEQUENCE")
  21.      */
  22.     private $id;
  23.     /**
  24.      * @ManyToOne(targetEntity="Person")
  25.      * @JoinColumn(name="id_creator", referencedColumnName="id", nullable=true)
  26.      */
  27.     private $creator;
  28.     /**
  29.      * @ManyToOne(targetEntity="Role")
  30.      * @JoinColumn(name="id_role", referencedColumnName="id", nullable=false)
  31.      */
  32.     private $role;
  33.     /**
  34.      * @column(type="string", length=200, nullable=false, unique=true)
  35.      */
  36.     private $email;
  37.     /**
  38.      * @column(type="string", length=200, nullable=false)
  39.      */
  40.     private $firstName;
  41.     /**
  42.      * @column(type="string", length=200, nullable=false)
  43.      */
  44.     private $password;
  45.     /**
  46.      * @column(type="string", length=200, nullable=false)
  47.      */
  48.     private $lastName;
  49.     /**
  50.      * @column(type="boolean", nullable=false)
  51.      */
  52.     private $active;
  53.     /**
  54.      * @column(type="datetime", nullable=false)
  55.      */
  56.     private $modified;
  57.     /**
  58.      * @column(type="datetime", nullable=false)
  59.      */
  60.     private $created;
clone this paste RAW Paste Data