setTableName('item'); $this->hasColumn('id', 'integer', null, array( 'type' => 'integer', 'primary' => true, 'autoincrement' => true, )); $this->hasColumn('category_id', 'integer', null, array( 'type' => 'integer', )); $this->hasColumn('author_id', 'integer', null, array( 'type' => 'integer', )); $this->hasColumn('kind_id', 'integer', null, array( 'type' => 'integer', )); $this->hasColumn('name', 'string', 255, array( 'type' => 'string', 'notnull' => true, 'length' => '255', )); $this->hasColumn('description', 'clob', null, array( 'type' => 'clob', )); $this->hasColumn('image', 'string', 255, array( 'type' => 'string', 'length' => '255', )); $this->hasColumn('code', 'string', 255, array( 'type' => 'string', 'length' => '255', )); $this->hasColumn('year', 'string', 4, array( 'type' => 'string', 'length' => '4', )); $this->hasColumn('size', 'string', 255, array( 'type' => 'string', 'length' => '255', )); $this->hasColumn('price_start', 'decimal', 10, array( 'type' => 'decimal', 'notnull' => true, 'length' => '10', 'scale' => '2', )); $this->hasColumn('price_actual', 'decimal', 10, array( 'type' => 'decimal', 'length' => '10', 'scale' => '2', )); $this->hasColumn('price_bid', 'decimal', 10, array( 'type' => 'decimal', 'notnull' => true, 'length' => '10', 'scale' => '2', )); $this->hasColumn('is_published', 'boolean', null, array( 'type' => 'boolean', 'default' => 0, )); $this->hasColumn('time_start', 'timestamp', null, array( 'type' => 'timestamp', )); $this->hasColumn('time_end', 'timestamp', null, array( 'type' => 'timestamp', )); $this->hasColumn('continuation', 'boolean', null, array( 'type' => 'boolean', )); $this->hasColumn('is_finished', 'boolean', null, array( 'type' => 'boolean', )); $this->hasColumn('status', 'integer', null, array( 'type' => 'integer', )); $this->option('type', 'InnoDB'); $this->option('collate', 'utf8_unicode_ci'); $this->option('charset', 'utf8'); } public function setUp() { parent::setUp(); $this->hasOne('Category', array( 'local' => 'category_id', 'foreign' => 'id')); $this->hasOne('Author', array( 'local' => 'author_id', 'foreign' => 'id')); $this->hasOne('Kind', array( 'local' => 'kind_id', 'foreign' => 'id')); $this->hasMany('Bid as Bids', array( 'local' => 'id', 'foreign' => 'item_id')); $sluggable0 = new Doctrine_Template_Sluggable(); $timestampable0 = new Doctrine_Template_Timestampable(); $auditable0 = new Doctrine_Template_Auditable(array( 'user_id' => array( 'expression' => array( 'symfony_context' => 'getUser()->getAttribute(\'user\')->id', ), ), )); $archivable0 = new Doctrine_Template_Archivable(array( 'expression' => array( 'symfony_context' => 'getUser()->getAttribute(\'archive_level\')', ), )); $this->actAs($sluggable0); $this->actAs($timestampable0); $this->actAs($auditable0); $this->actAs($archivable0); } }