Advertisement
Guest User

Person entity

a guest
Sep 6th, 2010
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.56 KB | None | 0 0
  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;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement