1: <?php
2:
3: namespace cli_db\propel\map;
4:
5: use \RelationMap;
6: use \TableMap;
7:
8:
9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20:
21: class FeatureTableMap extends TableMap
22: {
23:
24: 25: 26:
27: const CLASS_NAME = 'cli_db.map.FeatureTableMap';
28:
29: 30: 31: 32: 33: 34: 35:
36: public function initialize()
37: {
38:
39: $this->setName('feature');
40: $this->setPhpName('Feature');
41: $this->setClassname('cli_db\\propel\\Feature');
42: $this->setPackage('cli_db');
43: $this->setUseIdGenerator(true);
44: $this->setPrimaryKeyMethodInfo('feature_feature_id_seq');
45:
46: $this->addPrimaryKey('feature_id', 'FeatureId', 'INTEGER', true, null, null);
47: $this->addForeignKey('dbxref_id', 'DbxrefId', 'INTEGER', 'dbxref', 'dbxref_id', false, null, null);
48: $this->addForeignKey('organism_id', 'OrganismId', 'INTEGER', 'organism', 'organism_id', true, null, null);
49: $this->addColumn('name', 'Name', 'VARCHAR', false, 255, null);
50: $this->addColumn('uniquename', 'Uniquename', 'LONGVARCHAR', true, null, null);
51: $this->addColumn('residues', 'Residues', 'LONGVARCHAR', false, null, null);
52: $this->addColumn('seqlen', 'Seqlen', 'INTEGER', false, null, null);
53: $this->addColumn('md5checksum', 'Md5checksum', 'CHAR', false, 32, null);
54: $this->addForeignKey('type_id', 'TypeId', 'INTEGER', 'cvterm', 'cvterm_id', true, null, null);
55: $this->addColumn('is_analysis', 'IsAnalysis', 'BOOLEAN', true, null, false);
56: $this->addColumn('is_obsolete', 'IsObsolete', 'BOOLEAN', true, null, false);
57: $this->addColumn('timeaccessioned', 'Timeaccessioned', 'TIMESTAMP', true, null, 'now()');
58: $this->addColumn('timelastmodified', 'Timelastmodified', 'TIMESTAMP', true, null, 'now()');
59:
60: }
61:
62: 63: 64:
65: public function buildRelations()
66: {
67: $this->addRelation('Dbxref', 'cli_db\\propel\\Dbxref', RelationMap::MANY_TO_ONE, array('dbxref_id' => 'dbxref_id', ), 'SET NULL', null);
68: $this->addRelation('Organism', 'cli_db\\propel\\Organism', RelationMap::MANY_TO_ONE, array('organism_id' => 'organism_id', ), 'CASCADE', null);
69: $this->addRelation('Cvterm', 'cli_db\\propel\\Cvterm', RelationMap::MANY_TO_ONE, array('type_id' => 'cvterm_id', ), 'CASCADE', null);
70: $this->addRelation('FeatureCvterm', 'cli_db\\propel\\FeatureCvterm', RelationMap::ONE_TO_MANY, array('feature_id' => 'feature_id', ), 'CASCADE', null, 'FeatureCvterms');
71: $this->addRelation('FeatureDbxref', 'cli_db\\propel\\FeatureDbxref', RelationMap::ONE_TO_MANY, array('feature_id' => 'feature_id', ), 'CASCADE', null, 'FeatureDbxrefs');
72: $this->addRelation('FeaturePub', 'cli_db\\propel\\FeaturePub', RelationMap::ONE_TO_MANY, array('feature_id' => 'feature_id', ), 'CASCADE', null, 'FeaturePubs');
73: $this->addRelation('FeatureSynonym', 'cli_db\\propel\\FeatureSynonym', RelationMap::ONE_TO_MANY, array('feature_id' => 'feature_id', ), 'CASCADE', null, 'FeatureSynonyms');
74: }
75:
76: }
77: