PageRenderTime 45ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/lib/model/doctrine/sfDoctrineGuardPlugin/base/BasesfGuardUser.class.php

https://github.com/arturolinares/asandbox
PHP | 199 lines | 103 code | 18 blank | 78 comment | 0 complexity | 0c3929491888718aa9dd10545c38c934 MD5 | raw file
  1. <?php
  2. /**
  3. * BasesfGuardUser
  4. *
  5. * This class has been auto-generated by the Doctrine ORM Framework
  6. *
  7. * @property integer $id
  8. * @property string $username
  9. * @property string $algorithm
  10. * @property string $salt
  11. * @property string $password
  12. * @property boolean $is_active
  13. * @property boolean $is_super_admin
  14. * @property timestamp $last_login
  15. * @property Doctrine_Collection $groups
  16. * @property Doctrine_Collection $permissions
  17. * @property Doctrine_Collection $aPage
  18. * @property Doctrine_Collection $aAreaVersion
  19. * @property Doctrine_Collection $Accesses
  20. * @property Doctrine_Collection $MediaItems
  21. * @property Doctrine_Collection $BlogAuthorItems
  22. * @property Doctrine_Collection $BlogEditorItems
  23. * @property Doctrine_Collection $BlogItemEditors
  24. * @property Doctrine_Collection $BlogCategories
  25. * @property Doctrine_Collection $BlogCategoryUsers
  26. * @property Doctrine_Collection $sfGuardUserPermission
  27. * @property Doctrine_Collection $sfGuardUserGroup
  28. * @property sfGuardRememberKey $RememberKeys
  29. *
  30. * @method integer getId() Returns the current record's "id" value
  31. * @method string getUsername() Returns the current record's "username" value
  32. * @method string getAlgorithm() Returns the current record's "algorithm" value
  33. * @method string getSalt() Returns the current record's "salt" value
  34. * @method string getPassword() Returns the current record's "password" value
  35. * @method boolean getIsActive() Returns the current record's "is_active" value
  36. * @method boolean getIsSuperAdmin() Returns the current record's "is_super_admin" value
  37. * @method timestamp getLastLogin() Returns the current record's "last_login" value
  38. * @method Doctrine_Collection getGroups() Returns the current record's "groups" collection
  39. * @method Doctrine_Collection getPermissions() Returns the current record's "permissions" collection
  40. * @method Doctrine_Collection getAPage() Returns the current record's "aPage" collection
  41. * @method Doctrine_Collection getAAreaVersion() Returns the current record's "aAreaVersion" collection
  42. * @method Doctrine_Collection getAccesses() Returns the current record's "Accesses" collection
  43. * @method Doctrine_Collection getMediaItems() Returns the current record's "MediaItems" collection
  44. * @method Doctrine_Collection getBlogAuthorItems() Returns the current record's "BlogAuthorItems" collection
  45. * @method Doctrine_Collection getBlogEditorItems() Returns the current record's "BlogEditorItems" collection
  46. * @method Doctrine_Collection getBlogItemEditors() Returns the current record's "BlogItemEditors" collection
  47. * @method Doctrine_Collection getBlogCategories() Returns the current record's "BlogCategories" collection
  48. * @method Doctrine_Collection getBlogCategoryUsers() Returns the current record's "BlogCategoryUsers" collection
  49. * @method Doctrine_Collection getSfGuardUserPermission() Returns the current record's "sfGuardUserPermission" collection
  50. * @method Doctrine_Collection getSfGuardUserGroup() Returns the current record's "sfGuardUserGroup" collection
  51. * @method sfGuardRememberKey getRememberKeys() Returns the current record's "RememberKeys" value
  52. * @method sfGuardUser setId() Sets the current record's "id" value
  53. * @method sfGuardUser setUsername() Sets the current record's "username" value
  54. * @method sfGuardUser setAlgorithm() Sets the current record's "algorithm" value
  55. * @method sfGuardUser setSalt() Sets the current record's "salt" value
  56. * @method sfGuardUser setPassword() Sets the current record's "password" value
  57. * @method sfGuardUser setIsActive() Sets the current record's "is_active" value
  58. * @method sfGuardUser setIsSuperAdmin() Sets the current record's "is_super_admin" value
  59. * @method sfGuardUser setLastLogin() Sets the current record's "last_login" value
  60. * @method sfGuardUser setGroups() Sets the current record's "groups" collection
  61. * @method sfGuardUser setPermissions() Sets the current record's "permissions" collection
  62. * @method sfGuardUser setAPage() Sets the current record's "aPage" collection
  63. * @method sfGuardUser setAAreaVersion() Sets the current record's "aAreaVersion" collection
  64. * @method sfGuardUser setAccesses() Sets the current record's "Accesses" collection
  65. * @method sfGuardUser setMediaItems() Sets the current record's "MediaItems" collection
  66. * @method sfGuardUser setBlogAuthorItems() Sets the current record's "BlogAuthorItems" collection
  67. * @method sfGuardUser setBlogEditorItems() Sets the current record's "BlogEditorItems" collection
  68. * @method sfGuardUser setBlogItemEditors() Sets the current record's "BlogItemEditors" collection
  69. * @method sfGuardUser setBlogCategories() Sets the current record's "BlogCategories" collection
  70. * @method sfGuardUser setBlogCategoryUsers() Sets the current record's "BlogCategoryUsers" collection
  71. * @method sfGuardUser setSfGuardUserPermission() Sets the current record's "sfGuardUserPermission" collection
  72. * @method sfGuardUser setSfGuardUserGroup() Sets the current record's "sfGuardUserGroup" collection
  73. * @method sfGuardUser setRememberKeys() Sets the current record's "RememberKeys" value
  74. *
  75. * @package asandbox
  76. * @subpackage model
  77. * @author Your name here
  78. * @version SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $
  79. */
  80. abstract class BasesfGuardUser extends sfDoctrineRecord
  81. {
  82. public function setTableDefinition()
  83. {
  84. $this->setTableName('sf_guard_user');
  85. $this->hasColumn('id', 'integer', 4, array(
  86. 'type' => 'integer',
  87. 'primary' => true,
  88. 'autoincrement' => true,
  89. 'length' => 4,
  90. ));
  91. $this->hasColumn('username', 'string', 128, array(
  92. 'type' => 'string',
  93. 'notnull' => true,
  94. 'unique' => true,
  95. 'length' => 128,
  96. ));
  97. $this->hasColumn('algorithm', 'string', 128, array(
  98. 'type' => 'string',
  99. 'default' => 'sha1',
  100. 'notnull' => true,
  101. 'length' => 128,
  102. ));
  103. $this->hasColumn('salt', 'string', 128, array(
  104. 'type' => 'string',
  105. 'length' => 128,
  106. ));
  107. $this->hasColumn('password', 'string', 128, array(
  108. 'type' => 'string',
  109. 'length' => 128,
  110. ));
  111. $this->hasColumn('is_active', 'boolean', null, array(
  112. 'type' => 'boolean',
  113. 'default' => 1,
  114. ));
  115. $this->hasColumn('is_super_admin', 'boolean', null, array(
  116. 'type' => 'boolean',
  117. 'default' => false,
  118. ));
  119. $this->hasColumn('last_login', 'timestamp', null, array(
  120. 'type' => 'timestamp',
  121. ));
  122. $this->index('is_active_idx', array(
  123. 'fields' =>
  124. array(
  125. 0 => 'is_active',
  126. ),
  127. ));
  128. }
  129. public function setUp()
  130. {
  131. parent::setUp();
  132. $this->hasMany('sfGuardGroup as groups', array(
  133. 'refClass' => 'sfGuardUserGroup',
  134. 'local' => 'user_id',
  135. 'foreign' => 'group_id'));
  136. $this->hasMany('sfGuardPermission as permissions', array(
  137. 'refClass' => 'sfGuardUserPermission',
  138. 'local' => 'user_id',
  139. 'foreign' => 'permission_id'));
  140. $this->hasMany('aPage', array(
  141. 'local' => 'id',
  142. 'foreign' => 'author_id'));
  143. $this->hasMany('aAreaVersion', array(
  144. 'local' => 'id',
  145. 'foreign' => 'author_id'));
  146. $this->hasMany('aAccess as Accesses', array(
  147. 'local' => 'id',
  148. 'foreign' => 'user_id'));
  149. $this->hasMany('aMediaItem as MediaItems', array(
  150. 'local' => 'id',
  151. 'foreign' => 'owner_id'));
  152. $this->hasMany('aBlogItem as BlogAuthorItems', array(
  153. 'local' => 'id',
  154. 'foreign' => 'author_id'));
  155. $this->hasMany('aBlogItem as BlogEditorItems', array(
  156. 'refClass' => 'aBlogEditor',
  157. 'local' => 'user_id',
  158. 'foreign' => 'blog_item_id'));
  159. $this->hasMany('aBlogEditor as BlogItemEditors', array(
  160. 'local' => 'id',
  161. 'foreign' => 'user_id'));
  162. $this->hasMany('aBlogCategory as BlogCategories', array(
  163. 'refClass' => 'aBlogCategoryUser',
  164. 'local' => 'user_id',
  165. 'foreign' => 'blog_category_id'));
  166. $this->hasMany('aBlogCategoryUser as BlogCategoryUsers', array(
  167. 'local' => 'id',
  168. 'foreign' => 'user_id'));
  169. $this->hasMany('sfGuardUserPermission', array(
  170. 'local' => 'id',
  171. 'foreign' => 'user_id'));
  172. $this->hasMany('sfGuardUserGroup', array(
  173. 'local' => 'id',
  174. 'foreign' => 'user_id'));
  175. $this->hasOne('sfGuardRememberKey as RememberKeys', array(
  176. 'local' => 'id',
  177. 'foreign' => 'user_id'));
  178. $timestampable0 = new Doctrine_Template_Timestampable();
  179. $this->actAs($timestampable0);
  180. }
  181. }