Exemplo n.º 1
0
 /**
  * This constructor instantiates this class.
  *
  * @access public
  */
 public function __construct()
 {
     parent::__construct();
     $this->fields = array('id' => new DB_ORM_Field_Integer($this, array('max_length' => 11, 'nullable' => FALSE, 'unsigned' => TRUE)), 'email' => new DB_ORM_Field_String($this, array('max_length' => 254, 'nullable' => FALSE)), 'username' => new DB_ORM_Field_String($this, array('default' => '', 'max_length' => 32, 'nullable' => FALSE)), 'password' => new DB_ORM_Field_String($this, array('max_length' => 64, 'nullable' => FALSE)), 'firstname' => new DB_ORM_Field_String($this, array('default' => NULL, 'max_length' => 35, 'nullable' => TRUE)), 'lastname' => new DB_ORM_Field_String($this, array('default' => NULL, 'max_length' => 50, 'nullable' => TRUE)), 'activated' => new DB_ORM_Field_Boolean($this, array('default' => TRUE, 'nullable' => FALSE)), 'banned' => new DB_ORM_Field_Boolean($this, array('default' => FALSE, 'nullable' => FALSE)), 'ban_reason' => new DB_ORM_Field_String($this, array('default' => NULL, 'max_length' => 255, 'nullable' => TRUE)), 'new_password_key' => new DB_ORM_Field_String($this, array('default' => NULL, 'max_length' => 64, 'nullable' => TRUE)), 'new_password_requested' => new DB_ORM_Field_Integer($this, array('default' => NULL, 'max_length' => 11, 'nullable' => TRUE)), 'new_email' => new DB_ORM_Field_String($this, array('default' => NULL, 'max_length' => 254, 'nullable' => TRUE)), 'new_email_key' => new DB_ORM_Field_String($this, array('default' => NULL, 'max_length' => 64, 'nullable' => TRUE)), 'logins' => new DB_ORM_Field_Integer($this, array('default' => 0, 'max_length' => 10, 'nullable' => FALSE, 'unsigned' => TRUE)), 'last_login' => new DB_ORM_Field_Integer($this, array('default' => NULL, 'max_length' => 10, 'nullable' => TRUE, 'unsigned' => TRUE)), 'last_ip' => new DB_ORM_Field_String($this, array('default' => NULL, 'max_length' => 39, 'nullable' => TRUE)));
     $this->adaptors = array('last_login_formatted' => new DB_ORM_Field_Adaptor_DateTime($this, array('field' => 'last_login')), 'new_password_requested_formatted' => new DB_ORM_Field_Adaptor_DateTime($this, array('field' => 'new_password_requested')));
     $this->relations = array('user_roles' => new DB_ORM_Relation_HasMany($this, array('child_key' => array('user_id'), 'child_model' => 'User_Role', 'parent_key' => array('id'))), 'user_token' => new DB_ORM_Relation_HasMany($this, array('child_key' => array('user_id'), 'child_model' => 'User_Token', 'parent_key' => array('id'))));
 }
Exemplo n.º 2
0
 /**
  * This constructor instantiates this class.
  *
  * @access public
  */
 public function __construct()
 {
     parent::__construct();
     $this->fields = array('id' => new DB_ORM_Field_Integer($this, array('max_length' => 11, 'nullable' => FALSE, 'unsigned' => TRUE)), 'name' => new DB_ORM_Field_String($this, array('max_length' => 255, 'nullable' => FALSE)), 'description' => new DB_ORM_Field_String($this, array('max_length' => 255, 'nullable' => FALSE)));
     $this->relations = array('user_roles' => new DB_ORM_Relation_HasMany($this, array('child_key' => array('id'), 'child_model' => 'User_Role', 'parent_key' => array('id'))));
 }
Exemplo n.º 3
0
 /**
  * This constructor instantiates this class.
  *
  * @access public
  */
 public function __construct()
 {
     parent::__construct();
     $this->fields = array('id' => new DB_ORM_Field_String($this, array('max_length' => 24, 'nullable' => FALSE)), 'last_active' => new DB_ORM_Field_Integer($this, array('max_length' => 11, 'nullable' => FALSE)), 'contents' => new DB_ORM_Field_Text($this, array('nullable' => FALSE)));
 }
Exemplo n.º 4
0
 /**
  * This constructor instantiates this class.
  *
  * @access public
  */
 public function __construct()
 {
     parent::__construct();
     $this->fields = array('id' => new DB_ORM_Field_Integer($this, array('max_length' => 11, 'nullable' => FALSE, 'unsigned' => TRUE)), 'scope' => new DB_ORM_Field_Integer($this, array('max_length' => 11, 'nullable' => FALSE, 'unsigned' => TRUE)), 'name' => new DB_ORM_Field_String($this, array('max_length' => 70, 'nullable' => TRUE)), 'parent_id' => new DB_ORM_Field_Integer($this, array('max_length' => 11, 'nullable' => TRUE, 'unsigned' => TRUE)), 'lft' => new DB_ORM_Field_Integer($this, array('max_length' => 11, 'nullable' => FALSE, 'unsigned' => TRUE)), 'rgt' => new DB_ORM_Field_Integer($this, array('max_length' => 11, 'nullable' => FALSE, 'unsigned' => TRUE)));
 }
Exemplo n.º 5
0
 /**
  * This constructor instantiates this class.
  *
  * @access public
  */
 public function __construct()
 {
     parent::__construct();
     $this->fields = array('user_id' => new DB_ORM_Field_Integer($this, array('max_length' => 10, 'nullable' => FALSE, 'unsigned' => TRUE)), 'role_id' => new DB_ORM_Field_Integer($this, array('max_length' => 10, 'nullable' => FALSE, 'unsigned' => TRUE)));
     $this->relations = array('user' => new DB_ORM_Relation_BelongsTo($this, array('child_key' => array('user_id'), 'parent_key' => array('id'), 'parent_model' => 'User')), 'role' => new DB_ORM_Relation_BelongsTo($this, array('child_key' => array('role_id'), 'parent_key' => array('id'), 'parent_model' => 'Role')));
 }
Exemplo n.º 6
0
 /**
  * This constructor instantiates this class.
  *
  * @access public
  */
 public function __construct()
 {
     parent::__construct();
     $this->fields = array('id' => new DB_ORM_Field_Integer($this, array('max_length' => 11, 'nullable' => FALSE, 'unsigned' => TRUE)), 'user_id' => new DB_ORM_Field_Integer($this, array('max_length' => 11, 'nullable' => FALSE, 'unsigned' => TRUE)), 'user_agent' => new DB_ORM_Field_String($this, array('max_length' => 40, 'nullable' => FALSE)), 'token' => new DB_ORM_Field_String($this, array('max_length' => 40, 'nullable' => FALSE)), 'type' => new DB_ORM_Field_String($this, array('max_length' => 100, 'nullable' => FALSE)), 'created' => new DB_ORM_Field_Integer($this, array('max_length' => 11, 'nullable' => FALSE, 'unsigned' => TRUE)), 'expires' => new DB_ORM_Field_Integer($this, array('max_length' => 11, 'nullable' => FALSE, 'unsigned' => TRUE)));
     $this->relations = array('user' => new DB_ORM_Relation_BelongsTo($this, array('child_key' => array('user_id'), 'parent_key' => array('id'), 'parent_model' => 'User')));
 }