BaseProductProp.class.php 2.96 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
<?php

/**
 * BaseProductProp
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property text $inner_id
 * @property string $title
 * @property boolean $isList
 * @property Doctrine_Collection $Product
 * @property Doctrine_Collection $ProductPropList
 * @property Doctrine_Collection $ProductPropValue
 * 
 * @method text                getInnerId()          Returns the current record's "inner_id" value
 * @method string              getTitle()            Returns the current record's "title" value
 * @method boolean             getIsList()           Returns the current record's "isList" value
 * @method Doctrine_Collection getProduct()          Returns the current record's "Product" collection
 * @method Doctrine_Collection getProductPropList()  Returns the current record's "ProductPropList" collection
 * @method Doctrine_Collection getProductPropValue() Returns the current record's "ProductPropValue" collection
 * @method ProductProp         setInnerId()          Sets the current record's "inner_id" value
 * @method ProductProp         setTitle()            Sets the current record's "title" value
 * @method ProductProp         setIsList()           Sets the current record's "isList" value
 * @method ProductProp         setProduct()          Sets the current record's "Product" collection
 * @method ProductProp         setProductPropList()  Sets the current record's "ProductPropList" collection
 * @method ProductProp         setProductPropValue() Sets the current record's "ProductPropValue" collection
 * 
 * @package    sf
 * @subpackage model
 * @author     Atma
 * @version    SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $
 */
abstract class BaseProductProp extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('product_prop');
        $this->hasColumn('inner_id', 'text', null, array(
             'type' => 'text',
             ));
        $this->hasColumn('title', 'string', 255, array(
             'type' => 'string',
             'notnull' => true,
             'length' => 255,
             ));
        $this->hasColumn('isList', 'boolean', null, array(
             'type' => 'boolean',
             'default' => 0,
             ));
    }

    public function setUp()
    {
        parent::setUp();
        $this->hasMany('Product', array(
             'refClass' => 'ProductPropValue',
             'local' => 'product_id',
             'foreign' => 'id'));

        $this->hasMany('ProductPropList', array(
             'local' => 'id',
             'foreign' => 'product_prop_id'));

        $this->hasMany('ProductPropValue', array(
             'local' => 'id',
             'foreign' => 'prop_id'));

        $timestampable0 = new Doctrine_Template_Timestampable();
        $i18n0 = new Doctrine_Template_I18n(array(
             'fields' => 
             array(
              0 => 'title',
             ),
             ));
        $this->actAs($timestampable0);
        $this->actAs($i18n0);
    }
}