BaseUser.orm.xml 2.7 KB

12345678910111213141516171819202122232425262728293031323334
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
  3. <mapped-superclass name="Sonata\UserBundle\Entity\BaseUser">
  4. <field name="createdAt" type="datetime" column="created_at"/>
  5. <field name="updatedAt" type="datetime" column="updated_at"/>
  6. <!-- Profile fields -->
  7. <field name="dateOfBirth" type="datetime" column="date_of_birth" nullable="true"/>
  8. <field name="firstname" type="string" column="firstname" length="64" nullable="true"/>
  9. <field name="lastname" type="string" column="lastname" length="64" nullable="true"/>
  10. <field name="website" type="string" column="website" length="64" nullable="true"/>
  11. <field name="biography" type="string" column="biography" length="1000" nullable="true"/>
  12. <field name="gender" type="string" column="gender" length="1" nullable="true"/>
  13. <field name="locale" type="string" column="locale" length="8" nullable="true"/>
  14. <field name="timezone" type="string" column="timezone" length="64" nullable="true"/>
  15. <field name="phone" type="string" column="phone" length="64" nullable="true"/>
  16. <!-- social fields -->
  17. <field name="facebookUid" type="string" column="facebook_uid" length="255" nullable="true"/>
  18. <field name="facebookName" type="string" column="facebook_name" length="255" nullable="true"/>
  19. <field name="facebookData" type="json" column="facebook_data" nullable="true"/>
  20. <field name="twitterUid" type="string" column="twitter_uid" length="255" nullable="true"/>
  21. <field name="twitterName" type="string" column="twitter_name" length="255" nullable="true"/>
  22. <field name="twitterData" type="json" column="twitter_data" nullable="true"/>
  23. <field name="gplusUid" type="string" column="gplus_uid" length="255" nullable="true"/>
  24. <field name="gplusName" type="string" column="gplus_name" length="255" nullable="true"/>
  25. <field name="gplusData" type="json" column="gplus_data" nullable="true"/>
  26. <!-- extra security fields -->
  27. <field name="token" type="string" length="255" column="token" nullable="true"/>
  28. <field name="twoStepVerificationCode" type="string" length="255" column="two_step_code" nullable="true"/>
  29. <lifecycle-callbacks>
  30. <lifecycle-callback type="prePersist" method="prePersist"/>
  31. <lifecycle-callback type="preUpdate" method="preUpdate"/>
  32. </lifecycle-callbacks>
  33. </mapped-superclass>
  34. </doctrine-mapping>