setTableName('payment'); $this->hasColumn('id', 'integer', null, array( 'type' => 'integer', 'primary' => true, 'autoincrement' => true, )); $this->hasColumn('attachment_id', 'integer', null, array( 'type' => 'integer', 'notnull' => true, )); $this->hasColumn('update_date', 'date', null, array( 'type' => 'date', )); $this->hasColumn('price', 'decimal', 10, array( 'type' => 'decimal', 'scale' => '2', 'length' => '10', )); $this->hasColumn('code', 'string', 50, array( 'type' => 'string', 'length' => '50', )); $this->hasColumn('bank_code', 'string', 50, array( 'type' => 'string', 'length' => '50', )); $this->hasColumn('payment_date', 'date', null, array( 'type' => 'date', )); $this->hasColumn('payment_type', 'string', 50, array( 'type' => 'string', 'length' => '50', )); $this->hasColumn('handover_date', 'date', null, array( 'type' => 'date', )); $this->hasColumn('note', 'clob', null, array( 'type' => 'clob', )); $this->index('one_price_per_day', array( 'fields' => array( 0 => 'attachment_id', 1 => 'price', 2 => 'bank_code', 3 => 'payment_date', 4 => 'payment_type', ), 'type' => 'unique', )); $this->option('collate', 'utf8_unicode_ci'); $this->option('charset', 'utf8'); } public function setUp() { $this->hasOne('Attachment', array( 'local' => 'attachment_id', 'foreign' => 'id')); $timestampable0 = new Doctrine_Template_Timestampable(); $auditable0 = new Doctrine_Template_Auditable(array( 'user_id' => array( 'expression' => array( 'symfony_context' => 'getUser()->getGuardUser()->id', ), ), )); $this->actAs($timestampable0); $this->actAs($auditable0); } }