setTableName('sf_guard_user'); $this->hasColumn('first_name', 'string', 255, array( 'type' => 'string', 'length' => 255, )); $this->hasColumn('last_name', 'string', 255, array( 'type' => 'string', 'length' => 255, )); $this->hasColumn('email_address', 'string', 255, array( 'type' => 'string', 'notnull' => true, 'unique' => true, 'length' => 255, )); $this->hasColumn('tel', 'string', 255, array( 'type' => 'string', 'notnull' => false, 'length' => 255, )); $this->hasColumn('username', 'string', 128, array( 'type' => 'string', 'notnull' => true, 'unique' => true, 'length' => 128, )); $this->hasColumn('algorithm', 'string', 128, array( 'type' => 'string', 'default' => 'sha1', 'notnull' => true, 'length' => 128, )); $this->hasColumn('salt', 'string', 128, array( 'type' => 'string', 'length' => 128, )); $this->hasColumn('password', 'string', 128, array( 'type' => 'string', 'length' => 128, )); $this->hasColumn('is_active', 'boolean', null, array( 'type' => 'boolean', 'default' => 1, )); $this->hasColumn('is_super_admin', 'boolean', null, array( 'type' => 'boolean', 'default' => false, )); $this->hasColumn('last_login', 'timestamp', null, array( 'type' => 'timestamp', )); $this->index('is_active_idx', array( 'fields' => array( 0 => 'is_active', ), )); $this->option('collate', 'utf8_czech_ci'); $this->option('charset', 'utf8'); } public function setUp() { parent::setUp(); $this->hasMany('sfGuardGroup as Groups', array( 'refClass' => 'sfGuardUserGroup', 'local' => 'user_id', 'foreign' => 'group_id')); $this->hasMany('sfGuardPermission as Permissions', array( 'refClass' => 'sfGuardUserPermission', 'local' => 'user_id', 'foreign' => 'permission_id')); $this->hasMany('sfGuardUser as Users', array( 'refClass' => 'RepresentantUser', 'local' => 'representant_id', 'foreign' => 'user_id')); $this->hasMany('sfGuardUser as Representants', array( 'refClass' => 'RepresentantUser', 'local' => 'user_id', 'foreign' => 'representant_id')); $this->hasMany('sfGuardUserPermission', array( 'local' => 'id', 'foreign' => 'user_id')); $this->hasMany('sfGuardUserGroup', array( 'local' => 'id', 'foreign' => 'user_id')); $this->hasOne('sfGuardRememberKey as RememberKeys', array( 'local' => 'id', 'foreign' => 'user_id')); $this->hasOne('sfGuardForgotPassword as ForgotPassword', array( 'local' => 'id', 'foreign' => 'user_id')); $this->hasOne('Address', array( 'local' => 'id', 'foreign' => 'user_id')); $this->hasMany('Invoice as Invoices', array( 'local' => 'id', 'foreign' => 'user_id')); $this->hasMany('Invoice as RepresentantInvoices', array( 'local' => 'id', 'foreign' => 'representant_id')); $timestampable0 = new Doctrine_Template_Timestampable(array( )); $this->actAs($timestampable0); } }