setTableName('attachment'); $this->hasColumn('id', 'integer', null, array( 'type' => 'integer', 'primary' => true, 'autoincrement' => true, )); $this->hasColumn('card_id', 'integer', null, array( 'type' => 'integer', 'notnull' => true, )); $this->hasColumn('supplier_code', 'string', 50, array( 'type' => 'string', 'length' => '50', )); $this->hasColumn('contract_type', 'integer', 4, array( 'type' => 'integer', 'length' => '4', )); $this->hasColumn('logic_state', 'string', 2, array( 'type' => 'string', 'length' => '2', )); $this->hasColumn('logic_state_date', 'timestamp', null, array( 'type' => 'timestamp', )); $this->hasColumn('refund_type', 'string', 50, array( 'type' => 'string', 'length' => '50', )); $this->hasColumn('item', 'string', 255, array( 'type' => 'string', 'length' => '255', )); $this->hasColumn('dealer_name', 'string', 255, array( 'type' => 'string', 'length' => '255', )); $this->hasColumn('color', 'string', 200, array( 'type' => 'string', 'length' => '200', )); $this->hasColumn('price', 'decimal', 10, array( 'type' => 'decimal', 'scale' => '2', 'length' => '10', )); $this->hasColumn('numberplate', 'string', 200, array( 'type' => 'string', 'length' => '200', )); $this->hasColumn('serialnumber', 'string', 200, array( 'type' => 'string', 'length' => '200', )); $this->hasColumn('vintage', 'integer', 4, array( 'type' => 'integer', 'length' => '4', )); $this->hasColumn('cert_info', 'string', 200, array( 'type' => 'string', 'length' => '200', )); $this->hasColumn('cert_taken', 'boolean', null, array( 'type' => 'boolean', 'default' => false, )); $this->hasColumn('deposit', 'decimal', 10, array( 'type' => 'decimal', 'scale' => '2', 'length' => '10', )); $this->hasColumn('price_funding', 'decimal', 10, array( 'type' => 'decimal', 'scale' => '2', 'length' => '10', )); $this->hasColumn('price_payment', 'decimal', 10, array( 'type' => 'decimal', 'scale' => '2', 'length' => '10', )); $this->hasColumn('lease_period', 'integer', 4, array( 'type' => 'integer', 'length' => '4', )); $this->hasColumn('lease_date', 'date', null, array( 'type' => 'date', )); $this->hasColumn('requisition_date', 'date', null, array( 'type' => 'date', )); $this->hasColumn('update_date', 'date', null, array( 'type' => 'date', )); $this->hasColumn('agency_name', 'string', 255, array( 'type' => 'string', 'length' => '255', )); $this->hasColumn('agency_person', 'string', 255, array( 'type' => 'string', 'length' => '255', )); $this->hasColumn('guarantee_code', 'string', 200, array( 'type' => 'string', 'length' => '200', )); $this->hasColumn('guarantee_name', 'string', 255, array( 'type' => 'string', 'length' => '255', )); $this->hasColumn('guarantee_cell', 'string', 200, array( 'type' => 'string', 'length' => '200', )); $this->hasColumn('guarantee_address_street', 'string', 200, array( 'type' => 'string', 'length' => '200', )); $this->hasColumn('guarantee_address_city', 'string', 200, array( 'type' => 'string', 'length' => '200', )); $this->hasColumn('guarantee_address_zipcode', 'string', 200, array( 'type' => 'string', 'length' => '200', )); $this->hasColumn('guarantee_address_cell', 'string', 200, array( 'type' => 'string', 'length' => '200', )); $this->hasColumn('guarantee_address_phone', 'string', 200, array( 'type' => 'string', 'length' => '200', )); $this->hasColumn('guarantee_address_phone2', 'string', 200, array( 'type' => 'string', 'length' => '200', )); $this->hasColumn('guarantee_altaddress_street', 'string', 200, array( 'type' => 'string', 'length' => '200', )); $this->hasColumn('guarantee_altaddress_city', 'string', 200, array( 'type' => 'string', 'length' => '200', )); $this->hasColumn('guarantee_altaddress_zipcode', 'string', 200, array( 'type' => 'string', 'length' => '200', )); $this->hasColumn('guarantee_altaddress_cell', 'string', 200, array( 'type' => 'string', 'length' => '200', )); $this->hasColumn('guarantee_altaddress_phone', 'string', 200, array( 'type' => 'string', 'length' => '200', )); $this->hasColumn('guarantee_altaddress_phone2', 'string', 200, array( 'type' => 'string', 'length' => '200', )); $this->option('collate', 'utf8_unicode_ci'); $this->option('charset', 'utf8'); } public function setUp() { $this->hasOne('Card', array( 'local' => 'card_id', 'foreign' => 'id')); $this->hasMany('Debt as Debts', array( 'local' => 'id', 'foreign' => 'attachment_id')); $this->hasMany('Payment as Payments', array( 'local' => 'id', 'foreign' => 'attachment_id')); $this->hasMany('Attachment_file as Files', array( 'local' => 'id', 'foreign' => 'attachment_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); } }