* @version SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $ */ abstract class BasePrepaymentCount extends sfDoctrineRecord { public function setTableDefinition() { $this->setTableName('prepayment_count'); $this->hasColumn('profile_id', 'integer', null, array( 'type' => 'integer', 'notnull' => true, )); $this->hasColumn('style_id', 'integer', null, array( 'type' => 'integer', 'notnull' => true, )); $this->hasColumn('count', 'integer', null, array( 'type' => 'integer', 'notnull' => true, 'default' => 0, )); $this->hasColumn('discount', 'float', null, array( 'type' => 'float', 'notnull' => true, 'default' => 1, )); $this->hasColumn('request_count', 'integer', null, array( 'type' => 'integer', 'notnull' => true, 'default' => 0, )); $this->hasColumn('request_discount', 'float', null, array( 'type' => 'float', 'notnull' => true, 'default' => 1, )); $this->hasColumn('rows', 'integer', null, array( 'type' => 'integer', 'notnull' => true, 'default' => 0, )); $this->hasColumn('rows_discount', 'float', null, array( 'type' => 'float', 'notnull' => true, 'default' => 1, )); $this->hasColumn('request_rows', 'integer', null, array( 'type' => 'integer', 'notnull' => true, 'default' => 0, )); $this->option('collate', 'utf8_czech_ci'); $this->option('charset', 'utf8'); } public function setUp() { parent::setUp(); $this->hasOne('Profile', array( 'local' => 'profile_id', 'foreign' => 'id', 'onDelete' => 'CASCADE')); $this->hasOne('JobStyle', array( 'local' => 'style_id', 'foreign' => 'id', 'onDelete' => 'CASCADE')); } }