setTableName('supplier'); $this->hasColumn('id', 'integer', null, array( 'type' => 'integer', 'primary' => true, 'autoincrement' => true, )); $this->hasColumn('name', 'string', 100, array( 'type' => 'string', 'length' => '100', )); $this->hasColumn('template_report', 'clob', null, array( 'type' => 'clob', )); $this->hasColumn('code', 'string', 20, array( 'type' => 'string', 'length' => '20', )); $this->hasColumn('tax_code', 'string', 20, array( 'type' => 'string', 'length' => '20', )); $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', 20, array( 'type' => 'string', 'length' => '20', )); $this->option('collate', 'utf8_unicode_ci'); $this->option('charset', 'utf8'); } public function setUp() { $this->hasMany('Supplier_state_def as State_defs', array( 'local' => 'id', 'foreign' => 'supplier_id')); $this->hasMany('Card as Cards', array( 'local' => 'id', 'foreign' => 'supplier_id')); $this->hasMany('Invoice as Invoices', array( 'local' => 'id', 'foreign' => 'supplier_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); } }