setTableName('bid'); $this->hasColumn('id', 'integer', null, array( 'type' => 'integer', 'primary' => true, 'autoincrement' => true, )); $this->hasColumn('user_id', 'integer', null, array( 'type' => 'integer', )); $this->hasColumn('item_id', 'integer', null, array( 'type' => 'integer', )); $this->hasColumn('price_bid', 'decimal', 10, array( 'type' => 'decimal', 'length' => '10', 'scale' => ' 2', )); $this->hasColumn('time_bid', 'timestamp', null, array( 'type' => 'timestamp', 'notnull' => true, )); $this->option('type', 'InnoDB'); $this->option('collate', 'utf8_unicode_ci'); $this->option('charset', 'utf8'); } public function setUp() { parent::setUp(); $this->hasOne('Item', array( 'local' => 'item_id', 'foreign' => 'id')); $this->hasOne('User', array( 'local' => 'user_id', 'foreign' => 'id')); } }