BaseUserLog.class.php 2.74 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
86
<?php

/**
 * BaseUserLog
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $user_id
 * @property string $log_type
 * @property string $model
 * @property integer $model_id
 * @property string $log
 * @property User $User
 * 
 * @method integer getUserId()   Returns the current record's "user_id" value
 * @method string  getLogType()  Returns the current record's "log_type" value
 * @method string  getModel()    Returns the current record's "model" value
 * @method integer getModelId()  Returns the current record's "model_id" value
 * @method string  getLog()      Returns the current record's "log" value
 * @method User    getUser()     Returns the current record's "User" value
 * @method UserLog setUserId()   Sets the current record's "user_id" value
 * @method UserLog setLogType()  Sets the current record's "log_type" value
 * @method UserLog setModel()    Sets the current record's "model" value
 * @method UserLog setModelId()  Sets the current record's "model_id" value
 * @method UserLog setLog()      Sets the current record's "log" value
 * @method UserLog 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 BaseUserLog extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('user_log');
        $this->hasColumn('user_id', 'integer', null, array(
             'type' => 'integer',
             'notnull' => true,
             ));
        $this->hasColumn('log_type', 'string', 50, array(
             'type' => 'string',
             'notnull' => true,
             'length' => 50,
             ));
        $this->hasColumn('model', 'string', 50, array(
             'type' => 'string',
             'notnull' => true,
             'length' => 50,
             ));
        $this->hasColumn('model_id', 'integer', null, array(
             'type' => 'integer',
             'notnull' => true,
             ));
        $this->hasColumn('log', 'string', null, array(
             'type' => 'string',
             ));


        $this->index('model_idx', array(
             'fields' => 
             array(
              0 => 'model',
             ),
             ));
        $this->index('model_id_idx', array(
             'fields' => 
             array(
              0 => 'model_id',
             ),
             ));
    }

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

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