Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
 
3
 
4
/**
5
 * This class defines the structure of the 'article' table.
6
 *
7
 *
8
 * This class was autogenerated by Propel 1.4.2 on:
9
 *
10
 * Fri Aug  5 09:39:36 2011
11
 *
12
 *
13
 * This map class is used by Propel to do runtime db structure discovery.
14
 * For example, the createSelectSql() method checks the type of a given column used in an
15
 * ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
16
 * (i.e. if it's a text column type).
17
 *
18
 * @package    lib.model.map
19
 */
20
class ArticleTableMap extends TableMap {
21
 
22
	/**
23
	 * The (dot-path) name of this class
24
	 */
25
	const CLASS_NAME = 'lib.model.map.ArticleTableMap';
26
 
27
	/**
28
	 * Initialize the table attributes, columns and validators
29
	 * Relations are not initialized by this method since they are lazy loaded
30
	 *
31
	 * @return     void
32
	 * @throws     PropelException
33
	 */
34
	public function initialize()
35
	{
36
	  // attributes
37
		$this->setName('article');
38
		$this->setPhpName('Article');
39
		$this->setClassname('Article');
40
		$this->setPackage('lib.model');
41
		$this->setUseIdGenerator(true);
42
		// columns
43
		$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
44
		$this->addColumn('TITLE', 'Title', 'VARCHAR', true, 255, null);
45
		$this->addColumn('BODY', 'Body', 'LONGVARCHAR', false, null, null);
46
		$this->addColumn('ONLINE', 'Online', 'BOOLEAN', false, null, null);
47
		$this->addColumn('EXCERPT', 'Excerpt', 'VARCHAR', false, 255, null);
48
		$this->addForeignKey('CATEGORY_ID', 'CategoryId', 'INTEGER', 'category', 'ID', true, null, null);
49
		$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
50
		$this->addColumn('END_DATE', 'EndDate', 'TIMESTAMP', false, null, null);
51
		$this->addForeignKey('BOOK_ID', 'BookId', 'INTEGER', 'book', 'ID', false, null, null);
52
		// validators
53
	} // initialize()
54
 
55
	/**
56
	 * Build the RelationMap objects for this table relationships
57
	 */
58
	public function buildRelations()
59
	{
60
    $this->addRelation('Category', 'Category', RelationMap::MANY_TO_ONE, array('category_id' => 'id', ), null, null);
61
    $this->addRelation('Book', 'Book', RelationMap::MANY_TO_ONE, array('book_id' => 'id', ), null, null);
62
    $this->addRelation('AuthorArticle', 'AuthorArticle', RelationMap::ONE_TO_MANY, array('id' => 'article_id', ), null, null);
63
    $this->addRelation('Attachment', 'Attachment', RelationMap::ONE_TO_MANY, array('id' => 'article_id', ), null, null);
64
	} // buildRelations()
65
 
66
	/**
67
	 *
68
	 * Gets the list of behaviors registered for this table
69
	 *
70
	 * @return array Associative array (name => parameters) of behaviors
71
	 */
72
	public function getBehaviors()
73
	{
74
		return array(
75
			'symfony' => array('form' => 'true', 'filter' => 'true', ),
76
			'symfony_behaviors' => array(),
77
			'symfony_timestampable' => array('create_column' => 'created_at', ),
78
		);
79
	} // getBehaviors()
80
 
81
} // ArticleTableMap