setTableName('card'); $this->hasColumn('id', 'integer', null, array( 'type' => 'integer', 'primary' => true, 'autoincrement' => true, )); $this->hasColumn('user_id', 'integer', null, array( 'type' => 'integer', )); $this->hasColumn('state', 'string', 50, array( 'type' => 'string', 'length' => '50', )); $this->hasColumn('state_date', 'timestamp', null, array( 'type' => 'timestamp', )); $this->hasColumn('supplier_id', 'integer', null, array( 'type' => 'integer', 'notnull' => true, )); $this->hasColumn('days_to_solve', 'integer', null, array( 'type' => 'integer', 'notnull' => true, 'default' => '30', )); $this->hasColumn('due_day', 'integer', 2, array( 'type' => 'integer', 'length' => '2', )); $this->hasColumn('refund_numbers', 'string', 100, array( 'type' => 'string', 'length' => '100', )); $this->hasColumn('user_finished', 'boolean', null, array( 'type' => 'boolean', 'default' => false, )); $this->hasColumn('salary_percent', 'integer', 2, array( 'type' => 'integer', 'length' => '2', )); $this->hasColumn('case_end_date', 'date', null, array( 'type' => 'date', )); $this->hasColumn('case_income', 'decimal', 10, array( 'type' => 'decimal', 'scale' => '2', 'length' => '10', )); $this->hasColumn('case_penalty', 'decimal', 10, array( 'type' => 'decimal', 'scale' => '2', 'length' => '10', )); $this->hasColumn('regal_connected', 'boolean', null, array( 'type' => 'boolean', 'default' => false, )); $this->hasColumn('regal_note', 'clob', null, array( 'type' => 'clob', )); $this->hasColumn('client_code', 'string', 20, array( 'type' => 'string', 'length' => '20', )); $this->hasColumn('client_name', 'string', 255, array( 'type' => 'string', 'length' => '255', )); $this->hasColumn('cell', 'string', 20, array( 'type' => 'string', 'length' => '20', )); $this->hasColumn('phone', 'string', 20, array( 'type' => 'string', 'length' => '20', )); $this->hasColumn('phone_note', 'clob', null, array( 'type' => 'clob', )); $this->hasColumn('address_street', 'string', 200, array( 'type' => 'string', 'length' => '200', )); $this->hasColumn('address_city', 'string', 200, array( 'type' => 'string', 'length' => '200', )); $this->hasColumn('address_zipcode', 'string', 200, array( 'type' => 'string', 'length' => '200', )); $this->hasColumn('address_cell', 'string', 200, array( 'type' => 'string', 'length' => '200', )); $this->hasColumn('address_phone', 'string', 200, array( 'type' => 'string', 'length' => '200', )); $this->hasColumn('address_phone2', 'string', 200, array( 'type' => 'string', 'length' => '200', )); $this->hasColumn('altaddress_street', 'string', 200, array( 'type' => 'string', 'length' => '200', )); $this->hasColumn('altaddress_city', 'string', 200, array( 'type' => 'string', 'length' => '200', )); $this->hasColumn('altaddress_zipcode', 'string', 200, array( 'type' => 'string', 'length' => '200', )); $this->hasColumn('altaddress_cell', 'string', 200, array( 'type' => 'string', 'length' => '200', )); $this->hasColumn('altaddress_phone', 'string', 200, array( 'type' => 'string', 'length' => '200', )); $this->hasColumn('altaddress_phone2', 'string', 200, array( 'type' => 'string', 'length' => '200', )); $this->hasColumn('income', 'decimal', 10, array( 'type' => 'decimal', 'scale' => '2', 'length' => '10', )); $this->hasColumn('income_other', 'decimal', 10, array( 'type' => 'decimal', 'scale' => '2', 'length' => '10', )); $this->hasColumn('income_partner', 'decimal', 10, array( 'type' => 'decimal', 'scale' => '2', 'length' => '10', )); $this->hasColumn('employer', 'string', 255, array( 'type' => 'string', 'length' => '255', )); $this->hasColumn('employer_position', 'string', 200, array( 'type' => 'string', 'length' => '200', )); $this->hasColumn('employer_phone', 'string', 200, array( 'type' => 'string', 'length' => '200', )); $this->hasColumn('employer_street', 'string', 200, array( 'type' => 'string', 'length' => '200', )); $this->hasColumn('employer_city', 'string', 200, array( 'type' => 'string', 'length' => '200', )); $this->hasColumn('employer_zipcode', 'string', 200, array( 'type' => 'string', 'length' => '200', )); $this->option('collate', 'utf8_unicode_ci'); $this->option('charset', 'utf8'); } public function setUp() { $this->hasOne('Supplier', array( 'local' => 'supplier_id', 'foreign' => 'id')); $this->hasMany('sfGuardUserProfile as User', array( 'local' => 'user_id', 'foreign' => 'id', 'onDelete' => 'CASCADE')); $this->hasMany('Attachment as Attachments', array( 'local' => 'id', 'foreign' => 'card_id')); $this->hasMany('Message as Messages', array( 'local' => 'id', 'foreign' => 'card_id')); $this->hasMany('Card_regal as Regal', array( 'local' => 'id', 'foreign' => 'card_id')); $this->hasMany('Invoice_item', array( 'local' => 'id', 'foreign' => 'card_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); } }