This commit is contained in:
parent
858c1c0767
commit
d9b9a5af70
31
models/Blog.php
Normal file
31
models/Blog.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
class Blog extends Doctrine_Record
|
||||
{
|
||||
public function setTableDefinition()
|
||||
{
|
||||
|
||||
}
|
||||
public function setUp()
|
||||
{
|
||||
$this->loadTemplate('Taggable');
|
||||
}
|
||||
}
|
||||
class Taggable extends Doctrine_Template
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
$this->hasMany('[Component]Tag as Tag');
|
||||
}
|
||||
}
|
||||
class TagTemplate extends Doctrine_Template
|
||||
{
|
||||
public function setTableDefinition()
|
||||
{
|
||||
$this->hasColumn('name', 'string', 100);
|
||||
$this->hasColumn('description', 'string');
|
||||
}
|
||||
public function setUp()
|
||||
{
|
||||
$this->hasOne('[Component]', array('onDelete' => 'CASCADE'));
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user