BaseExport.class.php 2.88 KB
Newer Older
Игорь's avatar
init    
Игорь 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
<?php

/**
 * BaseExport
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property enum $logic_type
 * @property integer $cat_id
 * @property float $weight
 * @property float $sum
 * @property integer $user_id
 * @property Cat $Cat
 * @property User $User
 * 
 * @method enum    getLogicType()  Returns the current record's "logic_type" value
 * @method integer getCatId()      Returns the current record's "cat_id" value
 * @method float   getWeight()     Returns the current record's "weight" value
 * @method float   getSum()        Returns the current record's "sum" value
 * @method integer getUserId()     Returns the current record's "user_id" value
 * @method Cat     getCat()        Returns the current record's "Cat" value
 * @method User    getUser()       Returns the current record's "User" value
 * @method Export  setLogicType()  Sets the current record's "logic_type" value
 * @method Export  setCatId()      Sets the current record's "cat_id" value
 * @method Export  setWeight()     Sets the current record's "weight" value
 * @method Export  setSum()        Sets the current record's "sum" value
 * @method Export  setUserId()     Sets the current record's "user_id" value
 * @method Export  setCat()        Sets the current record's "Cat" value
 * @method Export  setUser()       Sets the current record's "User" value
 * 
 * @package    sf
 * @subpackage model
 * @author     Atma
 * @version    SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $
 */
abstract class BaseExport extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('export');
        $this->hasColumn('logic_type', 'enum', null, array(
             'type' => 'enum',
             'values' => 
             array(
              0 => 'bid',
              1 => 'wait',
              2 => 'bid_after_wait',
             ),
             'notnull' => true,
             ));
        $this->hasColumn('cat_id', 'integer', null, array(
             'type' => 'integer',
             ));
        $this->hasColumn('weight', 'float', 10, array(
             'type' => 'float',
             'length' => 10,
             'scale' => '3',
             ));
        $this->hasColumn('sum', 'float', 10, array(
             'type' => 'float',
             'length' => 10,
             'scale' => '2',
             ));
        $this->hasColumn('user_id', 'integer', null, array(
             'type' => 'integer',
             ));
    }

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

        $this->hasOne('User', array(
             'local' => 'user_id',
             'foreign' => 'id',
             'onDelete' => 'CASCADE'));

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