BaseOffer.class.php 5.77 KB
Newer Older
Яков's avatar
first  
Яков committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?php

/**
 * BaseOffer
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property text $inner_id
 * @property string $title
 * @property string $quantity_type
 * @property enum $quantity_type_select
 * @property integer $price
 * @property integer $product_id
 * @property text $img
 * @property boolean $is_delete
 * @property boolean $is_wholesale
 * @property integer $sort
Яков's avatar
test    
Яков committed
18
 * @property boolean $discount_available
Яков's avatar
first  
Яков committed
19
20
21
22
23
24
25
26
27
28
29
30
31
 * @property Product $Product
 * @property Doctrine_Collection $BasketOffer
 * 
 * @method text                getInnerId()              Returns the current record's "inner_id" value
 * @method string              getTitle()                Returns the current record's "title" value
 * @method string              getQuantityType()         Returns the current record's "quantity_type" value
 * @method enum                getQuantityTypeSelect()   Returns the current record's "quantity_type_select" value
 * @method integer             getPrice()                Returns the current record's "price" value
 * @method integer             getProductId()            Returns the current record's "product_id" value
 * @method text                getImg()                  Returns the current record's "img" value
 * @method boolean             getIsDelete()             Returns the current record's "is_delete" value
 * @method boolean             getIsWholesale()          Returns the current record's "is_wholesale" value
 * @method integer             getSort()                 Returns the current record's "sort" value
Яков's avatar
test    
Яков committed
32
 * @method boolean             getDiscountAvailable()    Returns the current record's "discount_available" value
Яков's avatar
first  
Яков committed
33
34
35
36
37
38
39
40
41
42
43
44
 * @method Product             getProduct()              Returns the current record's "Product" value
 * @method Doctrine_Collection getBasketOffer()          Returns the current record's "BasketOffer" collection
 * @method Offer               setInnerId()              Sets the current record's "inner_id" value
 * @method Offer               setTitle()                Sets the current record's "title" value
 * @method Offer               setQuantityType()         Sets the current record's "quantity_type" value
 * @method Offer               setQuantityTypeSelect()   Sets the current record's "quantity_type_select" value
 * @method Offer               setPrice()                Sets the current record's "price" value
 * @method Offer               setProductId()            Sets the current record's "product_id" value
 * @method Offer               setImg()                  Sets the current record's "img" value
 * @method Offer               setIsDelete()             Sets the current record's "is_delete" value
 * @method Offer               setIsWholesale()          Sets the current record's "is_wholesale" value
 * @method Offer               setSort()                 Sets the current record's "sort" value
Яков's avatar
test    
Яков committed
45
 * @method Offer               setDiscountAvailable()    Sets the current record's "discount_available" value
Яков's avatar
first  
Яков committed
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
 * @method Offer               setProduct()              Sets the current record's "Product" value
 * @method Offer               setBasketOffer()          Sets the current record's "BasketOffer" collection
 * 
 * @package    sf
 * @subpackage model
 * @author     Atma
 * @version    SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $
 */
abstract class BaseOffer extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('offer');
        $this->hasColumn('inner_id', 'text', null, array(
             'type' => 'text',
             ));
        $this->hasColumn('title', 'string', 255, array(
             'type' => 'string',
             'notnull' => true,
             'length' => 255,
             ));
        $this->hasColumn('quantity_type', 'string', 255, array(
             'type' => 'string',
             'notnull' => true,
             'length' => 255,
             ));
        $this->hasColumn('quantity_type_select', 'enum', null, array(
             'type' => 'enum',
             'values' => 
             array(
              0 => 'm2',
              1 => 'sheet',
              2 => 'piece',
             ),
             ));
        $this->hasColumn('price', 'integer', null, array(
             'type' => 'integer',
             'notnull' => true,
             ));
        $this->hasColumn('product_id', 'integer', null, array(
             'type' => 'integer',
             'notnull' => true,
             ));
        $this->hasColumn('img', 'text', null, array(
             'type' => 'text',
             ));
        $this->hasColumn('is_delete', 'boolean', null, array(
             'type' => 'boolean',
             'notnull' => true,
             'default' => false,
             ));
        $this->hasColumn('is_wholesale', 'boolean', null, array(
             'type' => 'boolean',
             'notnull' => true,
             'default' => false,
             ));
        $this->hasColumn('sort', 'integer', null, array(
             'type' => 'integer',
             'default' => 0,
             ));
Яков's avatar
test    
Яков committed
106
107
108
109
        $this->hasColumn('discount_available', 'boolean', null, array(
             'type' => 'boolean',
             'default' => false,
             ));
Яков's avatar
first  
Яков committed
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
    }

    public function setUp()
    {
        parent::setUp();
        $this->hasOne('Product', array(
             'local' => 'product_id',
             'foreign' => 'id',
             'onDelete' => 'CASCADE'));

        $this->hasMany('BasketOffer', array(
             'local' => 'id',
             'foreign' => 'offer_id'));

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