* @version SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $ */ abstract class BaseJob extends sfDoctrineRecord { public function setTableDefinition() { $this->setTableName('job'); $this->hasColumn('profile_id', 'integer', null, array( 'type' => 'integer', 'notnull' => false, )); $this->hasColumn('category_id', 'integer', null, array( 'type' => 'integer', 'notnull' => true, )); $this->hasColumn('type_id', 'integer', null, array( 'type' => 'integer', 'notnull' => true, )); $this->hasColumn('style_id', 'integer', null, array( 'type' => 'integer', 'notnull' => true, )); $this->hasColumn('country_id', 'integer', null, array( 'type' => 'integer', 'notnull' => true, )); $this->hasColumn('name', 'string', 255, array( 'type' => 'string', 'notnull' => true, 'length' => 255, )); $this->hasColumn('city', 'string', 255, array( 'type' => 'string', 'notnull' => false, 'length' => 255, )); $this->hasColumn('street', 'string', 255, array( 'type' => 'string', 'notnull' => false, 'length' => 255, )); $this->hasColumn('zip', 'integer', null, array( 'type' => 'integer', 'notnull' => false, )); $this->hasColumn('text', 'clob', null, array( 'type' => 'clob', )); $this->hasColumn('valid_from', 'date', null, array( 'type' => 'date', 'notnull' => true, )); $this->hasColumn('valid_months', 'integer', null, array( 'type' => 'integer', 'notnull' => true, 'default' => 1, )); $this->hasColumn('valid_to', 'date', null, array( 'type' => 'date', 'notnull' => true, )); $this->hasColumn('is_active', 'boolean', null, array( 'type' => 'boolean', 'notnull' => true, 'default' => false, )); $this->hasColumn('price', 'float', null, array( 'type' => 'float', 'notnull' => true, 'default' => 0, )); $this->hasColumn('discount', 'float', null, array( 'type' => 'float', 'notnull' => true, 'default' => 1, )); $this->hasColumn('prepayment_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('JobCategory', array( 'local' => 'category_id', 'foreign' => 'id', 'onDelete' => 'CASCADE')); $this->hasOne('JobType', array( 'local' => 'type_id', 'foreign' => 'id', 'onDelete' => 'CASCADE')); $this->hasOne('JobStyle', array( 'local' => 'style_id', 'foreign' => 'id', 'onDelete' => 'CASCADE')); $this->hasOne('Country', array( 'local' => 'country_id', 'foreign' => 'id', 'onDelete' => 'CASCADE')); $this->hasMany('JobSpecialization as Specializations', array( 'refClass' => 'JobSpecializationRelation', 'local' => 'job_id', 'foreign' => 'specialization_id')); $this->hasMany('Region as Regions', array( 'refClass' => 'JobRegionRelation', 'local' => 'job_id', 'foreign' => 'region_id')); $this->hasOne('TopJob', array( 'local' => 'id', 'foreign' => 'job_id')); $this->hasMany('JobSpecializationRelation as JobSpecializationRelations', array( 'local' => 'id', 'foreign' => 'job_id')); $this->hasMany('JobRegionRelation as JobRegionRelations', array( 'local' => 'id', 'foreign' => 'job_id')); $this->hasMany('InvoiceItem as InoiceItems', array( 'local' => 'id', 'foreign' => 'job_id')); $timestampable0 = new Doctrine_Template_Timestampable(); $sluggable0 = new Doctrine_Template_Sluggable(array( 'fields' => array( 0 => 'name', ), 'unique' => true, 'builder' => array( 0 => 'saInflector', 1 => 'urlize', ), )); $this->actAs($timestampable0); $this->actAs($sluggable0); } }