BaseReview.class.php 3.41 KB
Newer Older
Яков's avatar
first  
Яков committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<?php

/**
 * BaseReview
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property string $name
 * @property string $phone
 * @property text $body
 * @property string $file
 * @property string $lang
 * @property boolean $is_activated
 * @property Doctrine_Collection $Tags
 * @property Doctrine_Collection $ReviewTags
 * 
 * @method string              getName()         Returns the current record's "name" value
 * @method string              getPhone()        Returns the current record's "phone" value
 * @method text                getBody()         Returns the current record's "body" value
 * @method string              getFile()         Returns the current record's "file" value
 * @method string              getLang()         Returns the current record's "lang" value
 * @method boolean             getIsActivated()  Returns the current record's "is_activated" value
 * @method Doctrine_Collection getTags()         Returns the current record's "Tags" collection
 * @method Doctrine_Collection getReviewTags()   Returns the current record's "ReviewTags" collection
 * @method Review              setName()         Sets the current record's "name" value
 * @method Review              setPhone()        Sets the current record's "phone" value
 * @method Review              setBody()         Sets the current record's "body" value
 * @method Review              setFile()         Sets the current record's "file" value
 * @method Review              setLang()         Sets the current record's "lang" value
 * @method Review              setIsActivated()  Sets the current record's "is_activated" value
 * @method Review              setTags()         Sets the current record's "Tags" collection
 * @method Review              setReviewTags()   Sets the current record's "ReviewTags" collection
 * 
 * @package    sf
 * @subpackage model
 * @author     Atma
 * @version    SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $
 */
abstract class BaseReview extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('review');
        $this->hasColumn('name', 'string', 255, array(
             'type' => 'string',
             'notnull' => true,
             'length' => 255,
             ));
        $this->hasColumn('phone', 'string', 255, array(
             'type' => 'string',
             'notnull' => true,
             'length' => 255,
             ));
        $this->hasColumn('body', 'text', null, array(
             'type' => 'text',
             ));
        $this->hasColumn('file', 'string', 255, array(
             'type' => 'string',
             'length' => 255,
             ));
        $this->hasColumn('lang', 'string', 2, array(
             'type' => 'string',
             'length' => 2,
             ));
        $this->hasColumn('is_activated', 'boolean', null, array(
             'type' => 'boolean',
             'notnull' => true,
             'default' => false,
             ));
    }

    public function setUp()
    {
        parent::setUp();
        $this->hasMany('Tag as Tags', array(
             'refClass' => 'ReviewTags',
             'local' => 'review_id',
             'foreign' => 'tag_id',
             'onDelete' => 'CASCADE'));

        $this->hasMany('ReviewTags', array(
             'local' => 'id',
             'foreign' => 'review_id'));

        $timestampable0 = new Doctrine_Template_Timestampable();
        $this->actAs($timestampable0);
    }
}